Tag: xml

OnItemClickListener of spinner

I am able to get Spinner in action bar this way; array of items in re/values/languages.xml <string-array name=”languages”> <item>Finnish</item> <item>French</item> <item>German</item> <item>Slovakian</item> <item>Polish</item> </string-array> In res/menu/main.xml <item android:id=”@+id/menuSort” android:actionLayout=”@layout/spinner” android:showAsAction=”ifRoom” android:title=”@string/choose”/> In res/layout/spinner.xml <Spinner android:id=”@+id/spinner” android:layout_width=”150dp” android:layout_height=”wrap_content” android:entries=”@array/languages”/> And finally activity class; public class Base_Activity extends Activity { @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, […]

Error: No resource found that matches the given name (at 'theme' with value '@style/AppTheme')

![give me error : ( ] i tryed every thing … [2014-11-15 17:56:06 – LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at ‘theme’ with value ‘@style/AppTheme’). [2014-11-15 17:56:06 – LoginActivity] [2014-11-15 17:56:07 – LoginActivity] C:\Users\Different\workspace\LoginActivity\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at ‘theme’ with value ‘@style/AppTheme’). […]

WebView not working, launching the url externally in browser. Displaying webpage inside app

I made a home or main activity which has some icons and one of them is facebook, and by clicking it a facebook.xml is launched via intent The code for that xml page is set as below: <WebView xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:orientation=”vertical” android:weightSum=”10″ android:id=”@+id/webView” > </WebView> And I want to load the url: “http://www.j.mp/tkf4mApp” The […]

Java library using css selectors to parse XML

Is there a jQuery like JAVA/Android library that uses CSS Selectors to parse the XML ? Like : String desc = myXML.find(“bloc[type=pro]”).get(0).attr(“description”); Chainability is also what I’m looking for, in the same way of jQuery… I hope this exists !

how to colour the outline of my text black in xml for android

i want to make the white coloured text in my android app have a black outline. I do not want to colour the textview so if that is your help then no i already know how to do this. I want to make this happen by using a drawable file in xml format. so is […]

Button with BOTH color and background image

Is there any way to set the color and background image for a button? I want a green button with a transparent .png but it seems you can only have one or the other.

What is exact difference between gravity and layout_gravity

Possible Duplicate: Android – gravity and layout_gravity I have been working on android xml‘s. I have used android:layout_gravity=”center” to align components in specific position. Now a days, when I was working on a Dialog like Activity, I came across android:gravity=”center”. What I found there was, gravity was used to align its child to a specific […]

android – change options menu dynamically , but by inflating from XML

i need to be able to change the options menu (the one that is shown upon pressing the menu button) on android , so that on one case (for example upon a button being pressed) , it will use a specific menu resource (XML file as in /res/menu/… ) for the menu , and on […]

Android Studio XML does not recognize objectAnimator

I have been trying to animate a transition between two fragments. I had originally placed them a property animations in xml (and that didn’t really work), then changed it to objectAnimator. For some reason Android Studio is not recognizing the objectAnimator tag. here is my AndroidManifest.xml: <?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android” package=”com.example.nick.randomapplication” > <application android:allowBackup=”true” […]

XmlPullParser getAttributeValue returns null

I have the following XML structure stored in my assets/xml folder: <?xml version=”1.0″ encoding=”utf-8″?> <homescreen> <homeitem name=”Name1″ subtext=”Description1″ icon=”iconresource1″ /> <homeitem name=”Name2″ subtext=”Description2″ icon=”iconresource2″ /> <homeitem name=”Name3″ subtext=”Description3″ icon=”iconresource3″ /> </homescreen> I’m reading each individual homeitem using an XmlPullParser: int event; String TAG_ITEM = “homeitem”; while ((event = parser.next()) != XmlPullParser.END_DOCUMENT) { if (event == […]

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