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:

enter image description here

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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -