How do you create Preference Activity and Preference Fragment on Android?

I found this post (What to use instead of “addPreferencesFromResource” in a PreferenceActivity?) that help me understand that you have to go through a PreferenceFragment in order to do it. In the following explanation I use your.package. just to show that you have to put the package name. Everybody has its own package so please … Read more

Custom designing EditText

Use the below code in your rounded_edittext.xml <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android” > <solid android:color=”#FFFFFF” /> <stroke android:width=”1dp” android:color=”#2f6699″ /> <corners android:radius=”10dp” /> </shape> This should work

i want to make my application only in landscape in android

Keep this part of the manifest as it already is. For example, consider the IntroHome activity. <activity android:name=”.IntroHome” android:label=”@string/app_name” android:screenOrientation=”landscape” > </activity> And for the activity XML, make sure you have the IntroHome activity layout XML only in the layout-land folder. This way, the activity / activities you have will only show the the landscape … Read more

how to change color of the actual scroll in ScrollView android?

Create a scroll bar in drawable(scrollbar.xml) using this <shape android:shape=”rectangle” xmlns:android=”http://schemas.android.com/apk/res/android”> <gradient android:angle=”45″ android:centerColor=”#65FF8215″ android:endColor=”#87FD2125″ android:startColor=”#65FF8215″ /> <corners android:radius=”20dp” /> </shape> and add this scroll bar like android:scrollbarThumbVertical=”@drawable/scrollbar” to your ListView OR put the following attribute to your layout android:scrollbarThumbVertical=”@android:color/white” OR create a image and put it in drawable. then add the following property to … Read more

Android Cannot resolve symbol ‘?attr/selectableItemBackground’

I believe this is a communication problem with the IDE and Android Gradle Plugin. In any case, the only way I’ve reliably found to resolve this is to delete the problematic libs in the .idea/libraries/ folder. So, for you, since the lint checks aren’t recognizing ?attr/selectableItemBackground LOCATE the Gradle__com_android_support_xxx.xml files DELETE those files SYNC IDE … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)