android Programming Glossary: setting
Why retrieving Google Directions for Android using KML data is not working anymore? [duplicate] http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo Colour to paint routePoints. private int colour Alpha setting for route overlay. private static final int ALPHA 120 Stroke..
Application Skeleton to support multiple screen http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen additionally scaled for the user's font size preference setting. Scaled at runtime. Use for font sizes you should always use..
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 java.lang.SecurityException No permission to write APN settings Neither user 10099 nor current process has android.permission.WRITE_APN_SETTINGS... operations like sending MMS and don't know the default APN setting present in the device android sms broadcastreceiver android..
Is it possible to have multiple styles inside a TextView? http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview pieces of text inside a TextView For instance I am setting the text as follows tv.setText line1 n line2 n word1 t word2..
Slow Android emulator http://stackoverflow.com/questions/1554099/slow-android-emulator me it does not. I have followed all the instructions in setting up the IDE SDKs JDKs and such and have had some success in starting..
How to change progress bar's progress color in Android http://stackoverflow.com/questions/2020882/how-to-change-progress-bars-progress-color-in-android it's not the answer but what's driving the requirement setting it from code And .setProgressDrawable should work if it's defined..
Android: Tabs at the BOTTOM http://stackoverflow.com/questions/2395661/android-tabs-at-the-bottom If so how I've tried the following but didn't work a setting the tabwidget below the framelayout b setting the tabwidget's.. work a setting the tabwidget below the framelayout b setting the tabwidget's gravity to bottom Thanks llappall android tabwidget..
Focusable EditText inside ListView http://stackoverflow.com/questions/2679948/focusable-edittext-inside-listview is basically a hybrid of 1 2 where rather than the list setting if all items are focusable or not I want to set focusability.. So when calling setItemsCanFocus false it's also setting descendant focusability such that no child can get focus. This..
Change language programatically in Android http://stackoverflow.com/questions/2900023/change-language-programatically-in-android that UI should be same as phone UI. It was working via setting locale but was too buggy. And you have to set it every time.. that Resources res context.getResources Change locale settings in the app. DisplayMetrics dm res.getDisplayMetrics android.content.res.Configuration..
How to send a JSON object over Request with Android? http://stackoverflow.com/questions/3027066/how-to-send-a-json-object-over-request-with-android android What are the steps such as creating request object setting content headers etc. android json post request share improve..
Activity restart on rotation Android http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android probably how it's supposed to be but I do a lot of initial setting up in the onCreate method so I need either 1. Put all the initial.. onCreate method so I need either 1. Put all the initial setting up in another function so it's not all lost on device rotation..
Getting an issue while checking the dynamically generated checkbox through list view http://stackoverflow.com/questions/7738527/getting-an-issue-while-checking-the-dynamically-generated-checkbox-through-list changes when it is reused later on. So for example by setting the position as tag on the corresponding view so the listener.. code the position by using the outer final position . Try setting viewHolder.checkbox.setTag position before return and then use..
How to support Arabic text in Android? http://stackoverflow.com/questions/7962704/how-to-support-arabic-text-in-android then use Farsi.Convert س ا For Android 2.2 you do not need setting font but must use Farsi.Convert س ا And for Android 3.x forget..
Changing the background drawable of the searchview widget http://stackoverflow.com/questions/11085308/changing-the-background-drawable-of-the-searchview-widget the given name attr 'android searchViewTextField' error . Setting SearchView text field background from code So the only way to.. View searchPlate searchView.findViewById searchPlateId Setting background of 'search_plate' to earlier defined drawable. searchPlate.setBackgroundResource..
Android - How to make slide menu like facebook, spotify and Google + http://stackoverflow.com/questions/11465774/android-how-to-make-slide-menu-like-facebook-spotify-and-google initializeAnimations private void initializeAnimations Setting GlobolLayoutListener when layout is completely set this function..
Google maps api v2 custom infowindow like in original android google maps http://stackoverflow.com/questions/14123243/google-maps-api-v2-custom-infowindow-like-in-original-android-google-maps this.infoButton Button infoWindow.findViewById R.id.button Setting custom OnTouchListener which deals with the pressed state so.. null @Override public View getInfoContents Marker marker Setting up the infoWindow with current's marker info infoTitle.setText..
Out of Memory error with Bitmap http://stackoverflow.com/questions/16765899/out-of-memory-error-with-bitmap decoding options via the BitmapFactory.Options class. Setting the inJustDecodeBounds property to true while decoding avoids..
Setting Ringtone in Android [duplicate] http://stackoverflow.com/questions/1986756/setting-ringtone-in-android Ringtone in Android duplicate Possible Duplicate How to set..
Secure HTTP Post in Android http://stackoverflow.com/questions/2253061/secure-http-post-in-android null StringEntity tmp null Log.d Your App Name Here Setting httpPost headers httpPost.setHeader User Agent SET YOUR USER..
Change the background color of the options menu http://stackoverflow.com/questions/2944244/change-the-background-color-of-the-options-menu http www.codeproject.com KB android AndroidMenusMyWay.aspx Setting the menu background to be opaque I tested this hack on 2.1 simulator..
Effective Android Programming Techniques [closed] http://stackoverflow.com/questions/2961049/effective-android-programming-techniques out The quantity of readable material can be overwhelming. Setting up the environment can be tricky. Going to an Android Meet up..
Using a custom typeface in Android http://stackoverflow.com/questions/2973270/using-a-custom-typeface-in-android of them. So Is there a way to do this from the XML Setting a custom typeface Is there a way to do it from code in one place..
How do I transfer an image from its URL to the SD card? http://stackoverflow.com/questions/3296850/how-do-i-transfer-an-image-from-its-url-to-the-sd-card external storage in your applications manifest file. See Setting Android Permissions Then you can you can download the URL to..
How do I use InputFilter to limit characters in an EditText in Android? http://stackoverflow.com/questions/3349121/how-do-i-use-inputfilter-to-limit-characters-in-an-edittext-in-android to restrict the chars to 0 9 a z A Z and spacebar only. Setting inputtype I can limit to digits but I cannot figure out the..
Android Launcher label vs. activity title http://stackoverflow.com/questions/3488664/android-launcher-label-vs-activity-title to happen there's enough space for a long application name Setting the long title again in onCreate using the setTitle int method..
Android take screenshot via code http://stackoverflow.com/questions/5939987/android-take-screenshot-via-code get working together. Here is a solution that works well Setting up your Root layout View content findViewById R.id.layoutroot..
Changing the Screen Brightness System Setting Android http://stackoverflow.com/questions/6708692/changing-the-screen-brightness-system-setting-android the Screen Brightness System Setting Android I'm attempting to change the screen brightness from.. brightness from withing a service like so android.provider.Settings.System.putInt getContentResolver android.provider.Settings.System.SCREEN_BRIGHTNESS.. getContentResolver android.provider.Settings.System.SCREEN_BRIGHTNESS bright Problem is that is doesn't..
Set EditText cursor color http://stackoverflow.com/questions/7238450/set-edittext-cursor-color styles edittext galaxy tab share improve this question Setting the android textCursorDrawable attribute to @null should result..
How to run a service every day at noon, and on every boot http://stackoverflow.com/questions/7845660/how-to-run-a-service-every-day-at-noon-and-on-every-boot resets the alarms on phone wake. Now with code example Setting alarm inside a method Intent intent new Intent context AlarmReceiver.class..
Gridview height gets cut http://stackoverflow.com/questions/8481844/gridview-height-gets-cut only shows the first row and a little part of the second. Setting android layout_height 300dp makes it work. wrap_ content and..
How to create standard Borderless buttons (like in the design guidline mentioned)? http://stackoverflow.com/questions/8855791/how-to-create-standard-borderless-buttons-like-in-the-design-guidline-mentioned question To clear some confusion This is done in 2 steps Setting the button background attribute to android attr selectableItemBackground..
Why retrieving Google Directions for Android using KML data is not working anymore? [duplicate] http://stackoverflow.com/questions/11745314/why-retrieving-google-directions-for-android-using-kml-data-is-not-working-anymo this routePoints. private final List GeoPoint routePoints Colour to paint routePoints. private int colour Alpha setting for route overlay. private static final int ALPHA 120 Stroke width. private static final float STROKE 4.5f Route path. private..
Application Skeleton to support multiple screen http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen specified as floating point values based on dp units but additionally scaled for the user's font size preference setting. Scaled at runtime. Use for font sizes you should always use RelativeLayout for layouts AbsoluteLayout is deprecated and..
Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4) http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-and-mms-in-android-pre-kit-kat-android-4-4 4 which is on Android v4.2.2 and I am receiving this error java.lang.SecurityException No permission to write APN settings Neither user 10099 nor current process has android.permission.WRITE_APN_SETTINGS. The error gets thrown after querying.. for all those applications which use mobile data to perform operations like sending MMS and don't know the default APN setting present in the device android sms broadcastreceiver android manifest mms share improve this question When I have the..
Is it possible to have multiple styles inside a TextView? http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview a TextView Is it possible to set multiple styles for different pieces of text inside a TextView For instance I am setting the text as follows tv.setText line1 n line2 n word1 t word2 t word3 Is it possible to have a different style for each text..
Slow Android emulator http://stackoverflow.com/questions/1554099/slow-android-emulator emulator should start fairly quickly on such a machine but for me it does not. I have followed all the instructions in setting up the IDE SDKs JDKs and such and have had some success in starting the emulator quickly but that is very rare. How can..
How to change progress bar's progress color in Android http://stackoverflow.com/questions/2020882/how-to-change-progress-bars-progress-color-in-android android widget share improve this question I'm sorry that it's not the answer but what's driving the requirement setting it from code And .setProgressDrawable should work if it's defined correctly layer list xmlns android http schemas.android.com..
Android: Tabs at the BOTTOM http://stackoverflow.com/questions/2395661/android-tabs-at-the-bottom a way to put the tabs in a TabWidget to the bottom of the screen If so how I've tried the following but didn't work a setting the tabwidget below the framelayout b setting the tabwidget's gravity to bottom Thanks llappall android tabwidget share.. of the screen If so how I've tried the following but didn't work a setting the tabwidget below the framelayout b setting the tabwidget's gravity to bottom Thanks llappall android tabwidget share improve this question Here's the simplest..
Focusable EditText inside ListView http://stackoverflow.com/questions/2679948/focusable-edittext-inside-listview in fact does not give the EditText focus. What I'm envisioning is basically a hybrid of 1 2 where rather than the list setting if all items are focusable or not I want to set focusability for a single item in the list so that the selector seamlessly.. setDescendantFocusability ViewGroup.FOCUS_BLOCK_DESCENDANTS So when calling setItemsCanFocus false it's also setting descendant focusability such that no child can get focus. This explains why I couldn't just toggle mItemsCanFocus in the..
Change language programatically in Android http://stackoverflow.com/questions/2900023/change-language-programatically-in-android for changing language but decided to settle to the fact that UI should be same as phone UI. It was working via setting locale but was too buggy. And you have to set it every time you enter activity each activity from my experience. here is.. here is a code if you still need this again i don't recommend that Resources res context.getResources Change locale settings in the app. DisplayMetrics dm res.getDisplayMetrics android.content.res.Configuration conf res.getConfiguration conf.locale..
How to send a JSON object over Request with Android? http://stackoverflow.com/questions/3027066/how-to-send-a-json-object-over-request-with-android be sent in a variable name jason . How can I do this from android What are the steps such as creating request object setting content headers etc. android json post request share improve this question Android doesn't have special code for sending..
Activity restart on rotation Android http://stackoverflow.com/questions/456211/activity-restart-on-rotation-android my activity is restarted onCreate is called . Now this is probably how it's supposed to be but I do a lot of initial setting up in the onCreate method so I need either 1. Put all the initial setting up in another function so it's not all lost on.. supposed to be but I do a lot of initial setting up in the onCreate method so I need either 1. Put all the initial setting up in another function so it's not all lost on device rotation or 2. Make it so onCreate is not called again and the layout..
Getting an issue while checking the dynamically generated checkbox through list view http://stackoverflow.com/questions/7738527/getting-an-issue-while-checking-the-dynamically-generated-checkbox-through-list here and design them that way that they can react on position changes when it is reused later on. So for example by setting the position as tag on the corresponding view so the listener can catch this information and know on which item it is currently.. behavior applies to the wrong list item. Try not to hard code the position by using the outer final position . Try setting viewHolder.checkbox.setTag position before return and then use Integer buttonView.getTag instead position 1 . So your recycled..
How to support Arabic text in Android? http://stackoverflow.com/questions/7962704/how-to-support-arabic-text-in-android 2.1 you must set the typeface Farsi.GetFarsiFont this and then use Farsi.Convert س ا For Android 2.2 you do not need setting font but must use Farsi.Convert س ا And for Android 3.x forget all of the above solutions . But you can change the font..
Changing the background drawable of the searchview widget http://stackoverflow.com/questions/11085308/changing-the-background-drawable-of-the-searchview-widget XML resources you'll get a No resource found that matches the given name attr 'android searchViewTextField' error . Setting SearchView text field background from code So the only way to properly substitute background of SearchView text field is.. search_plate null null Getting the 'search_plate' LinearLayout. View searchPlate searchView.findViewById searchPlateId Setting background of 'search_plate' to earlier defined drawable. searchPlate.setBackgroundResource R.drawable.textfield_searchview_holo_light..
Android - How to make slide menu like facebook, spotify and Google + http://stackoverflow.com/questions/11465774/android-how-to-make-slide-menu-like-facebook-spotify-and-google this filterAnimation new FilterAnimation this initializeAnimations private void initializeAnimations Setting GlobolLayoutListener when layout is completely set this function will get called and we can have our layout onbject with..
Google maps api v2 custom infowindow like in original android google maps http://stackoverflow.com/questions/14123243/google-maps-api-v2-custom-infowindow-like-in-original-android-google-maps TextView infoWindow.findViewById R.id.snippet this.infoButton Button infoWindow.findViewById R.id.button Setting custom OnTouchListener which deals with the pressed state so it shows up this.infoButtonListener new OnInfoWindowElemTouchListener.. @Override public View getInfoWindow Marker marker return null @Override public View getInfoContents Marker marker Setting up the infoWindow with current's marker info infoTitle.setText marker.getTitle infoSnippet.setText marker.getSnippet ..
Out of Memory error with Bitmap http://stackoverflow.com/questions/16765899/out-of-memory-error-with-bitmap of decode method has additional signatures that let you specify decoding options via the BitmapFactory.Options class. Setting the inJustDecodeBounds property to true while decoding avoids memory allocation returning null for the bitmap object but..
Setting Ringtone in Android [duplicate] http://stackoverflow.com/questions/1986756/setting-ringtone-in-android Ringtone in Android duplicate Possible Duplicate How to set ringtone in Android from my activity I have sounds files in..
Secure HTTP Post in Android http://stackoverflow.com/questions/2253061/secure-http-post-in-android CookiePolicy.RFC_2109 httpPost new HttpPost url response null StringEntity tmp null Log.d Your App Name Here Setting httpPost headers httpPost.setHeader User Agent SET YOUR USER AGENT STRING HERE httpPost.setHeader Accept text html application..
Change the background color of the options menu http://stackoverflow.com/questions/2944244/change-the-background-color-of-the-options-menu to make the Android options menu background non translucent http www.codeproject.com KB android AndroidMenusMyWay.aspx Setting the menu background to be opaque I tested this hack on 2.1 simulator 2.2 2 real devices and 2.3 2 real devices . I don't..
Effective Android Programming Techniques [closed] http://stackoverflow.com/questions/2961049/effective-android-programming-techniques this list and this question . Get help when starting out The quantity of readable material can be overwhelming. Setting up the environment can be tricky. Going to an Android Meet up or users group can help get over the initial hump. Code every..
Using a custom typeface in Android http://stackoverflow.com/questions/2973270/using-a-custom-typeface-in-android change the typeface of each object from Code but I have hundreds of them. So Is there a way to do this from the XML Setting a custom typeface Is there a way to do it from code in one place to say that the whole application and all the components..
How do I transfer an image from its URL to the SD card? http://stackoverflow.com/questions/3296850/how-do-i-transfer-an-image-from-its-url-to-the-sd-card sdcard. To do this you need to add the uses permission write external storage in your applications manifest file. See Setting Android Permissions Then you can you can download the URL to a file on the sdcard. A simple way is URL url new URL file..
How do I use InputFilter to limit characters in an EditText in Android? http://stackoverflow.com/questions/3349121/how-do-i-use-inputfilter-to-limit-characters-in-an-edittext-in-android to limit characters in an EditText in Android I want to restrict the chars to 0 9 a z A Z and spacebar only. Setting inputtype I can limit to digits but I cannot figure out the ways of Inputfilter looking through the docs. android edittext..
Android Launcher label vs. activity title http://stackoverflow.com/questions/3488664/android-launcher-label-vs-activity-title this activity's default title And I did not want that to happen there's enough space for a long application name Setting the long title again in onCreate using the setTitle int method does no good either because the short name will be visible..
Android take screenshot via code http://stackoverflow.com/questions/5939987/android-take-screenshot-via-code the web I found some snippets of code that I was able to get working together. Here is a solution that works well Setting up your Root layout View content findViewById R.id.layoutroot content.setDrawingCacheEnabled true Function to get the rendered..
Changing the Screen Brightness System Setting Android http://stackoverflow.com/questions/6708692/changing-the-screen-brightness-system-setting-android the Screen Brightness System Setting Android I'm attempting to change the screen brightness from withing a service like so android.provider.Settings.System.putInt.. System Setting Android I'm attempting to change the screen brightness from withing a service like so android.provider.Settings.System.putInt getContentResolver android.provider.Settings.System.SCREEN_BRIGHTNESS bright Problem is that is doesn't work... brightness from withing a service like so android.provider.Settings.System.putInt getContentResolver android.provider.Settings.System.SCREEN_BRIGHTNESS bright Problem is that is doesn't work. Well actually it succeeds in changing the brightness setting..
Set EditText cursor color http://stackoverflow.com/questions/7238450/set-edittext-cursor-color with no positive result. android styles edittext galaxy tab share improve this question Setting the android textCursorDrawable attribute to @null should result in the use of android textColor as the cursor color. share..
How to run a service every day at noon, and on every boot http://stackoverflow.com/questions/7845660/how-to-run-a-service-every-day-at-noon-and-on-every-boot is your answer. use it with a broadcast receiver which also resets the alarms on phone wake. Now with code example Setting alarm inside a method Intent intent new Intent context AlarmReceiver.class intent.setAction packagename.ACTION PendingIntent..
Gridview height gets cut http://stackoverflow.com/questions/8481844/gridview-height-gets-cut Sadly the gridview height is always too little so that it only shows the first row and a little part of the second. Setting android layout_height 300dp makes it work. wrap_ content and fill_parent apparently not. My grid view GridView android id..
How to create standard Borderless buttons (like in the design guidline mentioned)? http://stackoverflow.com/questions/8855791/how-to-create-standard-borderless-buttons-like-in-the-design-guidline-mentioned android layout button borderless share improve this question To clear some confusion This is done in 2 steps Setting the button background attribute to android attr selectableItemBackground creates you a button with feedback but no background...
|