mjtaryan Active Member Licensed User Longtime User Aug 18, 2012 #1 In the main activity of an app I'm working on I have the following line 58 lstMenu.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD When I attempt to compile the app I get the following error message. Compiling code. 0.03 Compiling layouts code. 0.02 Generating R file. 0.00 Compiling generated Java code. Error B4A line: 58 lstMenu.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD javac 1.6.0_26 src\com\chirhomedia\dmnovena\main.java:411: inconvertible types found : int required: android.graphics.Typeface mostCurrent._lstmenu.getTwoLinesLayout().Label.setTypeface((android.graphics.Typeface)(anywheresoftware.b4a.keywords.Common.Typeface.STYLE_BOLD)); ^ 1 error Why and how do I correct it? Note the offending line was created following sample code in this post -- http://www.b4x.com/forum/basic4android-updates-questions/15875-how-set-view-text-bold.html#post90227 Thanks.
In the main activity of an app I'm working on I have the following line 58 lstMenu.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD When I attempt to compile the app I get the following error message. Compiling code. 0.03 Compiling layouts code. 0.02 Generating R file. 0.00 Compiling generated Java code. Error B4A line: 58 lstMenu.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD javac 1.6.0_26 src\com\chirhomedia\dmnovena\main.java:411: inconvertible types found : int required: android.graphics.Typeface mostCurrent._lstmenu.getTwoLinesLayout().Label.setTypeface((android.graphics.Typeface)(anywheresoftware.b4a.keywords.Common.Typeface.STYLE_BOLD)); ^ 1 error Why and how do I correct it? Note the offending line was created following sample code in this post -- http://www.b4x.com/forum/basic4android-updates-questions/15875-how-set-view-text-bold.html#post90227 Thanks.
margret Well-Known Member Licensed User Longtime User Aug 18, 2012 #2 Please post the code for this section that defines the list. Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD Is lstMenu Dimmed as a ListView? Of course kickaha is right: The sample you have linked to shows this: Code: View.Typeface = Typeface.DEFAULT_BOLD Last edited: Aug 18, 2012 Upvote 0
Please post the code for this section that defines the list. Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.STYLE_BOLD Is lstMenu Dimmed as a ListView? Of course kickaha is right: The sample you have linked to shows this: Code: View.Typeface = Typeface.DEFAULT_BOLD
K kickaha Well-Known Member Licensed User Longtime User Aug 18, 2012 #3 Try using Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD as STYLE_BOLD is an integer, whereas DEFAULT_BOLD is a Typeface. Upvote 0
Try using Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD as STYLE_BOLD is an integer, whereas DEFAULT_BOLD is a Typeface.
mjtaryan Active Member Licensed User Longtime User Aug 19, 2012 #4 kickaha said: Try using Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD as STYLE_BOLD is an integer, whereas DEFAULT_BOLD is a Typeface. Click to expand... That seems rather confusing as well as inconsistent, particularly since DEFAULT_BOLD and STYLE_BOLD both are listed in the same properties list from which the latter was selected. However, I will try what you suggest. Upvote 0
kickaha said: Try using Code: ListView1.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD as STYLE_BOLD is an integer, whereas DEFAULT_BOLD is a Typeface. Click to expand... That seems rather confusing as well as inconsistent, particularly since DEFAULT_BOLD and STYLE_BOLD both are listed in the same properties list from which the latter was selected. However, I will try what you suggest.