How do I add a button to an Android Frame Layout, in the same position as my picture (centered in the bottom 4th of the screen)? -
this android question.
how add button frame layout, in same location picture?
i trying add button on top of frame layout (which has background image , no title bar) so:
this entire code of layout far. code add put button in picture?
activity_home_page.xml:
<framelayout 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:gravity="center" tools:context=".homepage"> <imageview android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/my_background_image" android:scaletype="fitxy"> </imageview> </framelayout>
how add button frame layout, in same location picture?
i have tried & come solution.
<framelayout 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:gravity="center" tools:context=".homepage"> <imageview android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/mod_minecraft" android:scaletype="fitxy"> </imageview> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"></linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"></linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"></linearlayout> <linearlayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:layout_weight="1"> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="new button" android:id="@+id/button" /> </linearlayout> </linearlayout> </framelayout>
Comments
Post a Comment