android Programming Glossary: color.parsecolor
How to change background color of selected items in ListView? http://stackoverflow.com/questions/10447238/how-to-change-background-color-of-selected-items-in-listview convertView.setPressed true convertView.setBackgroundColor Color.parseColor #FF9912 else convertView.setSelected false convertView.setPressed.. false convertView.setBackgroundColor Color.parseColor #000000 This checks if the position is storred in the ArrayList...
Multiple selection in custom ListView with CAB http://stackoverflow.com/questions/10598348/multiple-selection-in-custom-listview-with-cab handle setting up the row views v.setBackgroundColor Color.parseColor #99cc00 default color if mSelection.get position null v.setBackgroundColor..
using asynctask to speed up android app launch time http://stackoverflow.com/questions/15455858/using-asynctask-to-speed-up-android-app-launch-time mWebView.setBackgroundColor Color.parseColor #000000 mWebView.loadUrl file android_asset game.swf AdView..
create circular image view in android [duplicate] http://stackoverflow.com/questions/16208365/create-circular-image-view-in-android true canvas.drawARGB 0 0 0 0 paint.setColor Color.parseColor #BAB399 canvas.drawCircle sbmp.getWidth 2 0.7f sbmp.getHeight..
How to draw a path on a map using kml file? http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file color color correction for dining make it darker if color Color.parseColor #add331 color Color.parseColor #6C8715 Log.d myapp.APP map color.. make it darker if color Color.parseColor #add331 color Color.parseColor #6C8715 Log.d myapp.APP map color after color Collection overlaysToAddAgain.. point2 paint.setStrokeWidth 5 paint.setAlpha defaultColor Color.parseColor #6C8715 220 120 canvas.drawLine point.x point.y point2.x point2.y..
Custom style for Android's TabWidget http://stackoverflow.com/questions/4127446/custom-style-for-androids-tabwidget Unselected Tabs if tv null tv.setTextColor Color.parseColor #ffffff TextView tv2 TextView tabHost.getCurrentTabView .findViewById.. Selected Tab if tv2 null tv2.setTextColor Color.parseColor #000000 catch ClassCastException e A precaution in case Google..
How to set text color of TextView in code? http://stackoverflow.com/questions/4602902/how-to-set-text-color-of-textview-in-code from the Color class to get the same effect of course. Color.parseColor Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF.. Color.parseColor Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like..
focusable row inside table android http://stackoverflow.com/questions/4873556/focusable-row-inside-table-android Draw separator tv new TextView this tv.setBackgroundColor Color.parseColor #80808080 tv.setHeight height of separaor line. 2dip will be..
Changing gradient background colors on Android at runtime http://stackoverflow.com/questions/4941606/changing-gradient-background-colors-on-android-at-runtime mDrawable.getPaint .setShader new LinearGradient 0 0 0 h Color.parseColor #330000FF Color.parseColor #110000FF Shader.TileMode.REPEAT.. new LinearGradient 0 0 0 h Color.parseColor #330000FF Color.parseColor #110000FF Shader.TileMode.REPEAT v.setBackgroundDrawable mDrawable..
Android: Change Tab Text Color Programmatically http://stackoverflow.com/questions/5577688/android-change-tab-text-color-programmatically i tabHost.getTabWidget .getChildAt i .setBackgroundColor Color.parseColor #121312 tabHost.getTabWidget .setCurrentTab 0 tabHost.getTabWidget.. 0 tabHost.getTabWidget .getChildAt 0 .setBackgroundColor Color.parseColor #f1a026 And here is onTabChanged Event public void onTabChanged.. i tabHost.getTabWidget .getChildAt i .setBackgroundColor Color.parseColor #121312 tabHost.getTabWidget .getChildAt tabHost.getCurrentTab..
How to change background color of selected items in ListView? http://stackoverflow.com/questions/10447238/how-to-change-background-color-of-selected-items-in-listview selectedIds.contains position convertView.setSelected true convertView.setPressed true convertView.setBackgroundColor Color.parseColor #FF9912 else convertView.setSelected false convertView.setPressed false convertView.setBackgroundColor Color.parseColor.. #FF9912 else convertView.setSelected false convertView.setPressed false convertView.setBackgroundColor Color.parseColor #000000 This checks if the position is storred in the ArrayList. if it does paint it as selected. if not the opposite...
Multiple selection in custom ListView with CAB http://stackoverflow.com/questions/10598348/multiple-selection-in-custom-listview-with-cab View v super.getView position convertView parent let the adapter handle setting up the row views v.setBackgroundColor Color.parseColor #99cc00 default color if mSelection.get position null v.setBackgroundColor Color.RED this is a selected position so make..
using asynctask to speed up android app launch time http://stackoverflow.com/questions/15455858/using-asynctask-to-speed-up-android-app-launch-time .setPluginsEnabled true mWebView.setScrollBarStyle WebView.SCROLLBARS_OUTSIDE_OVERLAY mWebView.setBackgroundColor Color.parseColor #000000 mWebView.loadUrl file android_asset game.swf AdView adView AdView this.findViewById R.id.adView adView.loadAd new..
create circular image view in android [duplicate] http://stackoverflow.com/questions/16208365/create-circular-image-view-in-android paint.setAntiAlias true paint.setFilterBitmap true paint.setDither true canvas.drawARGB 0 0 0 0 paint.setColor Color.parseColor #BAB399 canvas.drawCircle sbmp.getWidth 2 0.7f sbmp.getHeight 2 0.7f sbmp.getWidth 2 0.1f paint paint.setXfermode new PorterDuffXfermode..
How to draw a path on a map using kml file? http://stackoverflow.com/questions/3109158/how-to-draw-a-path-on-a-map-using-kml-file color MapView mMapView01 Log.d myapp.APP map color before color color correction for dining make it darker if color Color.parseColor #add331 color Color.parseColor #6C8715 Log.d myapp.APP map color after color Collection overlaysToAddAgain new ArrayList.. myapp.APP map color before color color correction for dining make it darker if color Color.parseColor #add331 color Color.parseColor #6C8715 Log.d myapp.APP map color after color Collection overlaysToAddAgain new ArrayList for Iterator iter mMapView01.getOverlays.. defaultColor Point point2 new Point projection.toPixels gp2 point2 paint.setStrokeWidth 5 paint.setAlpha defaultColor Color.parseColor #6C8715 220 120 canvas.drawLine point.x point.y point2.x point2.y paint mode 3 #65306 end else if mode 3 the last path..
Custom style for Android's TabWidget http://stackoverflow.com/questions/4127446/custom-style-for-androids-tabwidget tabHost.getTabWidget .getChildAt i .findViewById android.R.id.title Unselected Tabs if tv null tv.setTextColor Color.parseColor #ffffff TextView tv2 TextView tabHost.getCurrentTabView .findViewById android.R.id.title Selected Tab if tv2 null tv2.setTextColor.. tv2 TextView tabHost.getCurrentTabView .findViewById android.R.id.title Selected Tab if tv2 null tv2.setTextColor Color.parseColor #000000 catch ClassCastException e A precaution in case Google changes from a TextView on the tabs. Add the following..
How to set text color of TextView in code? http://stackoverflow.com/questions/4602902/how-to-set-text-color-of-textview-in-code answer as complete as possible You can use various functions from the Color class to get the same effect of course. Color.parseColor Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy.. from the Color class to get the same effect of course. Color.parseColor Manual like LEX uses text.setTextColor Color.parseColor #FFFFFF Color.rgb and Color.argb Manual rgb Manual argb like Ganapathy uses holder.text.setTextColor Color.rgb 200 0 0 holder.text.setTextColor..
focusable row inside table android http://stackoverflow.com/questions/4873556/focusable-row-inside-table-android tr.findViewById R.id.cell_N tv.setText ... table.addView tr Draw separator tv new TextView this tv.setBackgroundColor Color.parseColor #80808080 tv.setHeight height of separaor line. 2dip will be enough table.addView tv If you use context menu it should be..
Changing gradient background colors on Android at runtime http://stackoverflow.com/questions/4941606/changing-gradient-background-colors-on-android-at-runtime ShapeDrawable mDrawable new ShapeDrawable new RectShape mDrawable.getPaint .setShader new LinearGradient 0 0 0 h Color.parseColor #330000FF Color.parseColor #110000FF Shader.TileMode.REPEAT v.setBackgroundDrawable mDrawable And that gave me the same.. new ShapeDrawable new RectShape mDrawable.getPaint .setShader new LinearGradient 0 0 0 h Color.parseColor #330000FF Color.parseColor #110000FF Shader.TileMode.REPEAT v.setBackgroundDrawable mDrawable And that gave me the same result as the XML background..
Android: Change Tab Text Color Programmatically http://stackoverflow.com/questions/5577688/android-change-tab-text-color-programmatically for int i 0 i tabHost.getTabWidget .getChildCount i tabHost.getTabWidget .getChildAt i .setBackgroundColor Color.parseColor #121312 tabHost.getTabWidget .setCurrentTab 0 tabHost.getTabWidget .getChildAt 0 .setBackgroundColor Color.parseColor #f1a026.. Color.parseColor #121312 tabHost.getTabWidget .setCurrentTab 0 tabHost.getTabWidget .getChildAt 0 .setBackgroundColor Color.parseColor #f1a026 And here is onTabChanged Event public void onTabChanged String tabId TODO Auto generated method stub for int i 0.. stub for int i 0 i tabHost.getTabWidget .getChildCount i tabHost.getTabWidget .getChildAt i .setBackgroundColor Color.parseColor #121312 tabHost.getTabWidget .getChildAt tabHost.getCurrentTab .setBackgroundColor Color.parseColor #f1a026 In onTabChanged..
|