Is there a way to define a 9 patch drawable in an android xml file? The reason I ask, is that when you apply a scale animation to a drawable w/ a stroke on it, the stroke appears to thicken. I’d like to make the stroke stay the same size as the animation plays…
I want to create a list view with limited set of items that isn’t really going to change. Each row is going to have an image on the left and text on the right. (Just like in the Settings app) Can I populate that in XML (i.e. avoid writing code) ?
I’m new to this Android development, and I find the layout of it really confusing. I’m trying to have a background image on a view, and I’ve tried using this example Add a background image to shape in xml Android, but it looks very bad (bitmaps you know) So I thought vectors could be fun. […]
When using a state selector as the src for an ImageView, enabled=”false” is being ignored. i.e. this doesn’t work properly: <ImageView android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:enabled=”false” android:src=”@drawable/state_drawable” > P.S. : I have an ugly workaround, I’ll post it as an answer shortly, if you have something better or an explanation for this behavior, please let me know.
Is there a way to make EditText behaviors like TextView in Android (XML is prefered)? I have tried the following: android:editable=”false” android:focusable=”false” android:focusableInTouchMode=”false” android:cursorVisible=”false” android:longClickable=”false” This works but I still can touch the EditText to get focus (the orange boarder), though the focus lost as soon as I remove my finger. I’m not sure what […]
I’m trying to parse the XML HttpResponse i get from a HttpPost to a server (last.fm), for a last.fm android app. If i simply parse it to string i can see it being a normal xml string, with all the desired information. But i just cant parse the single NameValuePairs. This is my HttpResponse object: […]
In spinner xml, I’m using: android:entries=”@array/cars” where cars is list of numeric items. The spinner automatically align values to left, and I can’t find in xml/code how to change it.
So I don’t see where it is casting it into android.view.ViewGroup I get this error message when I try to view my xml in the graphic view. I haven’t done anything to the actual java this pertains too. <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”#ffffffff” android:orientation=”vertical” > <TableLayout android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:layout_gravity=”center” android:stretchColumns=”1″ > <TableRow android:layout_width=”fill_parent” android:layout_height=”1.0dp” android:background=”@drawable/list_divider_holo_light” […]
My Android Studio in activity_main.xml showing this problem: “Rendering Problems No render target selected” Help?
I need to insert “<<” in android:text = “<<” but there are raise problem with: Multiple annotations found at this line: – [I18N] Hardcoded string “<<“, should use @string resource – The value of attribute “android:text” associated with an element type “Button” must not contain the ‘<‘ character. Can you tell me how can I […]