android-xml

Android disable radio group in xml

南笙酒味 提交于 2019-12-23 18:29:33
问题 In my android application, I need to disable radio group in xml layout. I searched, but I found only through pro-grammatically not in xml layout. My code is here <RadioGroup android:id="@+id/menu1" android:layout_width="80dp" android:layout_height="wrap_content" android:layout_x="170dp" android:layout_y="100dp" > <RadioButton android:id="@+id/radioButton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Yes" /> <RadioButton android:id="@+id/radioButton2"

How to set thickness of circular indeterminate progress bar android?

烈酒焚心 提交于 2019-12-23 12:56:00
问题 I have two nested circular indeterminate progress bars but I cannot set their thickness to an equal size. I have tried to customize it using shapes. However, that removes the default behaviour of the circular indeterminate progress. I customize like this and it made thickness equal but not getting default behaviour. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/progress"> <rotate android:toDegrees=

Android - Background color with different color and angles

百般思念 提交于 2019-12-23 10:39:04
问题 I'm trying to figure out how to create this background in xml, couldn't find anything that helped me. Ignore the circle image of the kid and the text of course, I am talking about the background itself, is there a way to create something like that in xml? Thanks in advance for any help. cheers! 回答1: I'm guessing you moved on, but you can do this using Vector Drawables. The following is not accurate (the line is not completely straight), but should give you a good start: New XML file: <?xml

Android - Background color with different color and angles

这一生的挚爱 提交于 2019-12-23 10:38:13
问题 I'm trying to figure out how to create this background in xml, couldn't find anything that helped me. Ignore the circle image of the kid and the text of course, I am talking about the background itself, is there a way to create something like that in xml? Thanks in advance for any help. cheers! 回答1: I'm guessing you moved on, but you can do this using Vector Drawables. The following is not accurate (the line is not completely straight), but should give you a good start: New XML file: <?xml

Blank layout - eglSurfaceAttrib not implemented

僤鯓⒐⒋嵵緔 提交于 2019-12-23 10:27:33
问题 I am constantly recieving the following message: eglSurfaceAttrib not implemented I tried cleaning the project, played around with manifest, search others who had similar issue s but my attempt have been unsuccessful. Any help would be greatly appreciated. Below is my activity code public class ProfileCreation extends Activity { public class LoadImg extends Activity { private static final int RESULT_LOAD_IMAGE = 1; FrameLayout layout; Button save ; @Override public void onCreate(Bundle

How to align Floating Action Button to center

心不动则不痛 提交于 2019-12-23 07:29:43
问题 I have one FloatingActionButton. I want it to be middle of 2 LinearLayouts and center of screen like this. Currently My design is like this I want it to be at the exact center of the screen. How to do that? This is my whole xml code <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout

How to create this shape drawable

最后都变了- 提交于 2019-12-23 02:33:04
问题 I want to create xml drawable to this shape, 回答1: use this layout and save in drawable folder..... <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> <size android:width="200dp" android:height="50dp" /> <solid android:color="#ef45d1" /> <corners android:topRightRadius="20dp" /> </shape> </item> <item android:bottom="0dp" android:right="165dp" android:top="0dp"> <rotate android:fromDegrees="45"

Android - Seemingly harmless layout causes app to crash after short use without any errors

三世轮回 提交于 2019-12-22 10:38:15
问题 After 2 days of fruitless testing, I've decided to post my issue here, in the hopes that I'm missing something obvious. I've boiled down a seemingly innocuous xml-layout to a random collection of images, layouts, and a scrollview. Here it is: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="

Align textview according to the language selection (LEFT -RIGHT)

喜你入骨 提交于 2019-12-22 09:24:21
问题 i have a linear layout , which contains a textView and EditText arranged horizontally.i have an option for selecting language in prvious activity (english and arabic). when i select english the current alignment is fine but when i select Arabic it should show right to left that means the textView position should go to right (in layout it will start from left) after that the editText. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android

Align textview according to the language selection (LEFT -RIGHT)

只愿长相守 提交于 2019-12-22 09:23:28
问题 i have a linear layout , which contains a textView and EditText arranged horizontally.i have an option for selecting language in prvious activity (english and arabic). when i select english the current alignment is fine but when i select Arabic it should show right to left that means the textView position should go to right (in layout it will start from left) after that the editText. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android