Below are some of the tips that I have learnt about Android Development over the last few years. Have a look, they might help you as well to become a better Android Developer.
Its been two years since I decided to start with Android Development and without a doubt that has been one of the best decision I have taken. On my journey to become an Android Developer, I have made various errors and learnt a couple of things from it.
So I would like to share with you’ll those tips and tricks that I have learnt on the way so that it can help someone who is just starting out or is struggling to develop android apps. …
That’s the Wikipedia definition but still, but it’s not particularly easy to understand. So let’s understand it better.
Before understanding what it means in programming, let’s first see what it means in general as it will help us understand the concept better.
Dependency or dependent means relying on something for support. …
Till now we have successfully applied CheckBoxPreference in our app and now we will apply ListPreference and EditTextPreference.
ListPreference and EditTextPreference look like this:
So lets get started.
Add the following code to your settings_pref.xml file for ListPreference
Here the two new attributes are,
android:entries : The human-readable array to present as a list. The labels red, blue, green that users will see.
android:entryValues : The array to find the value to save for a preference when an entry from entries is selected.
Keep in mind that the order of entries and entryValues should be the same.
To store the arrays we have created an arrays.xml file in values and added the following…
Many a times we need certain settings in our app, like setting default language, theme(light or dark), customizing notifications, etc. In this tutorial we will be creating a simple app with settings to change text visibility, text size and color. For this we will be using Shared Preferences.
In this tutorial we will be creating the first setting that is making the text visible or invisible by CheckBoxPreference and in next article we will dive into ListPreference and the EditTextPreference.
Layout Code for our Main Activity
Create a Settings Activity in which will add our settings menu. To create a menu and add items to it, first create a menu folder and add a menu resource file it. …