android - Aligning all the app to the right -


I have discovered how I can be written app from right to left and right to left
only one The thing that I have found and succeeded in, edit android: gravity = "right" to text the text, and adding it to the button, but even if it is from the left side Are located on the right.
activity_main.xml file -

  & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; LinearLayout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" Android: gravity = "right" Android: Layout_width = "Fill_parent" Android: layout_height = "fill_parent" Android: Orientation = "horizontal" & gt; & Lt; Android: layout_height = "wrap_content" android: sign = "@ string / text_message" android: id = "@ + id / text_message" android: gravity = "right" android: layout_weight = "1.0" Android: layout_width = "0dp" /> & Lt; Android: layout_height = "wrap_content" android: gravity = "right" android: layout_width = "wrap_content" android: text = "@ string / send_button" Android: onClick = "ButtonClicked" /> & Lt; Android: layout_height = "wrap_content" android: gravity = "right" android: layout_width = "wrap_content" android: text = "@ string / delete_button" Android: onClick = "DeleteClicked" /> & Lt; / LinearLayout & gt;   

What do I mean "left to right" is that the edit text was written before the "Send" button, and the "Send" button ID "Delete" button - which was shown [Send me] [Delete] [Delete] "[Cancel] [Delete]" [Send] [Send] [Send] [Send] [Send] [Send < ] [ _ ____ ] ", as I want.

You can use relative layout instead of LinearLayout and use your button using some ID

 Ndroid you can use: id = "@ + id / your_button_id   

and tag Use Android: layout_toRightOf and Android :. Layout_toLeftOf In your case, something like this:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Relative layout xmlns: android = "http://schemas.android.com/en/ apk / res / android" xmlns: tool = "http://schemas.android.com/tools" Android: layout_width = "fill_parent" Android: layout_height = "Fill_parent" & gt; & Lt; Android: text = "@ string / delete_button" android: onClick = "DeleteClicked" /> Android: Android: Android: Android: Layout_height = "wrap_ content" Android: layout_width = "wrap-content" Android: layout_traightoff = "@ + id / deletebutton" Android: text = "@ string / dispatch_button" Android: onclic = " Buttoncloth "/> Android: layout_height = "wrap_content" Android: Android: Android: Android: Android: Android: Layout_Vet = "1.0" Android: Layout_Wind = "0 DP" Android: Layout_toothoff = "@ + ID / SMS / Baton" "@String / Text_summary "/> & Lt; / RelativeLayout & gt;    

Comments