Tag: xml

Android development – 'missing theme error' in eclipse ide for layout xml files

I have recently installed Eclipse IDE for Java Developers (Version: 3.6.1) with the Android SDK Platform 2.1update1 – on Windows 7. I can add, edit and run code for projects, however, in the Workbench area the Graphical Layout view of the layout xml files always shows a “missing theme” message in bottom right navigation area.The […]

match_parent not working for ListView, if ListView is inside NestedScrollView

In my app I am using a ListView and it is inside a NestedScrollView. When I set height of the ListView to match_parent it does not cover the whole screen. I want that ListView to cover the whole screen. My XML file: <?xml version=”1.0″ encoding=”utf-8″?> <android.support.v4.widget.NestedScrollView xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:isScrollContainer=”false” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_gravity=”fill_vertical” android:clipToPadding=”false” app:layout_behavior=”@string/appbar_scrolling_view_behavior”> <LinearLayout […]

Adding spinner to ActionBar (not Navigation

I have added a spinner to my ActionBar using the second option from the answer here . How to I add a spinner adapter to the spinner? I tried using a Spinner object as Google describes here but get a null Spinner object. Anybody know how to do this? I don’t want the spinner to […]

Intent from Fragment to Activity

I was trying to go to another page using button, but it always fail. Here is my First Class with its XML: public class FindPeopleFragment extends Fragment { public FindPeopleFragment(){} @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_home, container, false); return rootView; } public void goToAttract(View v) { Intent […]

Eclipse Error: Error parsing …\android-22\android-wear\armeabi-v7a\devices.xml

Recently, I upgraded my android-SDK to Android M (API 22, MNC Preview). After that, every project reported errors when Eclipse was opened. The error of logcat and of a popup window says: Error: Error parsing …\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml cvc-complex-type.2.4.d: Invalid content was found starting with element ‘d:skin’. No child element is expected at this point I thought […]

Way to parse XML (org.w3c.Document) on Android

Can anyone point me to a explanation for or explain to me how I can easily parse the XML and get values of a w3c.Document on Android using only Android OS Libs? I tried to use a implementation of dom4j, but it is very slow 🙁

How to change the check box (tick box) color to white in android XML

Is there any way to change the check box (tick box) color to white in android XML.(I need white color tick box which contain black tick,as the preview I got in android studio inside my real device) Here is my code for check box <CheckBox android:textSize=”15sp” android:textColor=”#fff” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”Save Loging ” android:id=”@+id/checkBox” android:layout_below=”@id/PasswordeditText” android:checked=”true” […]

Make text bold and italic

Is there anyway to make Android text in the xml file both bold and italics? SAMPLE

AutoCompleteTextView background/foreground color

I am working on AutoCompleteTextView.Its working fine but the dropdown text is always white text on white background. this picture explain my problem picture explain my problem XML: <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”#000″ > <!– <AutoCompleteTextView –> <AutoCompleteTextView android:id=”@+id/text” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:hint=”Tapez votre 1texte” android:textColor=”#000″ /> </LinearLayout> Java: view = (AutoCompleteTextView)findViewById(R.id.text); ArrayAdapter<String> adapter = […]

Variables in XML resources – pass values from parent to child

I’m trying to reuse primitive shapes and compose much of my user interface using these declarative XML elements. How to make a variable Android attribute? But I do not want to create a separate XML file for each attribute value, and their permutations, and in the process duplicate much of the work. For instance, I […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.