Android Tutorial

How To Grant Write Settings Permission In Android

When you write an android app, you sometimes may need to change system settings. For example, change the android device screen brightness. But such action needs your app to have android.permission.WRITE_SETTINGS permission, otherwise you may encounter the exception with the message java.lang.SecurityException: com.dev2qa.example was not granted this permission: android.permission.WRITE_SETTINGS.

How To Grant Write Settings Permission In Android Read More »

Android Fragment Save / Retrieve Instance State Example

The android activity provides a method to save/retrieve instance state data. Please read the article Android Save Retrieve Activity Instance State Example to learn more. The fragment also provides a method for you to save/retrieve related instance state data. This article will show you an example of how to save/retrieve instance state data in android

Android Fragment Save / Retrieve Instance State Example Read More »

Android Add Fragment To Activity Dynamically Example

The fragment is widely used in android app development. You can use it statically or dynamically. Article Android Multiple Fragments In One Activity Example has introduced what it is and how to use Fragment statically. This article will tell you how to use it dynamically in your android app.

Android Add Fragment To Activity Dynamically Example Read More »

,