i' m a newbie,
Can anyone guide me how to change code below with the [image] i upload, i'm really confused, since I have no idea how to change the current code.
the image i try to achieve image]1 but current image is current image
i tried few method like changing the orientation or layout of height, but it still remains the same
<LinearLayout
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:orientation="horizontal">
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="Team A" />
<TextView
android:id="#+id/team_a_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addThreeForTeamA"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addTwoForTeamA"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addOneForTeamA"
android:text="Free throw" />
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="Team B" />
<TextView
android:id="#+id/team_b_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addThreeForTeamA"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addTwoForTeamA"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addOneForTeamA"
android:text="Free throw" />
</LinearLayout>
here you go
<LinearLayout
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:weightSum="2"
android:orientation="horizontal">
<LinearLayout
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="Team A" />
<TextView
android:id="#+id/team_a_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addThreeForTeamA"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addTwoForTeamA"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addOneForTeamA"
android:text="Free throw" />
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="Team B" />
<TextView
android:id="#+id/team_b_score"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addThreeForTeamA"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addTwoForTeamA"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:onClick="addOneForTeamA"
android:text="Free throw" />
</LinearLayout>
</LinearLayout>
Related
I am trying to add background image which has linear layout as a root layout
[Look hierarchy diagram for reference.]
I have tried using Relative Layout as a root layout but it overlap the nested linear layouts.
While with linear layout as a root layout it displays only at the bottom.
XML Code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="#+id/line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:textSize="26sp"
android:textStyle="bold"
android:text="Team A" />
<TextView
android:id="#+id/team_a_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="0"
android:textSize="40sp"
android:textStyle="bold"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add3forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add2forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add1forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Free Throw" />
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:textSize="26sp"
android:textStyle="bold"
android:text="Team B" />
<TextView
android:id="#+id/team_b_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textSize="40sp"
android:textStyle="bold"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add3forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add2forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add1forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Free Throw" />
</LinearLayout>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reset"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:onClick="reset"/>
</LinearLayout>
View Hierarchy Diagram
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#drawable/image">
<LinearLayout
android:id="#+id/line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:textSize="26sp"
android:textStyle="bold"
android:text="Team A" />
<TextView
android:id="#+id/team_a_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:text="0"
android:textSize="40sp"
android:textStyle="bold"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add3forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add2forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add1forA"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Free Throw" />
</LinearLayout>
<LinearLayout
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="5dp"
android:textSize="26sp"
android:textStyle="bold"
android:text="Team B" />
<TextView
android:id="#+id/team_b_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textSize="40sp"
android:textStyle="bold"
android:text="0" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add3forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+3 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add2forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="+2 Points" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="add1forB"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Free Throw" />
</LinearLayout>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reset"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:onClick="reset"/>
</LinearLayout>
android:background="#drawable/image" Add this line in your Root Layout
I created an interface like this
Here is my XML code
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFA5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team A"
android:textColor="#f00"
android:textSize="30dp" />
<TextView
android:id="#+id/team1_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointA"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointA"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointA"
android:text="Free Throw" />
</LinearLayout>
<View
android:layout_width="2dp"
android:layout_height="340dp"
android:layout_margin="3dp"
android:background="#000" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team B"
android:textColor="#00f"
android:textSize="30dp" />
<TextView
android:id="#+id/team2_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointB"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointB"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointB"
android:text="Free Throw" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="reset"
android:text="RESET" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
my problem is that I had to hardcoded the "line" between the two scores
<View
android:layout_width="2dp"
android:layout_height="340dp"
android:layout_margin="3dp"
android:background="#000" />
Because when i set android:layout_height="match_parent" it take the full screen i think it's because the parents height="wrap_content"
Try this :
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFA5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team A"
android:textColor="#f00"
android:textSize="30dp" />
<TextView
android:id="#+id/team1_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointA"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointA"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointA"
android:text="Free Throw" />
</LinearLayout>
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_margin="3dp"
android:background="#000" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team B"
android:textColor="#00f"
android:textSize="30dp" />
<TextView
android:id="#+id/team2_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointB"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointB"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointB"
android:text="Free Throw" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="reset"
android:text="RESET" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
Make first two Linear Layout wrap_content
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFA5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
And make view match_parent
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_margin="3dp"
android:background="#000" />
It's because all your LinearLayout height must be wrap_content like :
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFA5"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team A"
android:textColor="#f00"
android:textSize="30dp" />
<TextView
android:id="#+id/team1_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointA"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointA"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_a"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointA"
android:text="Free Throw" />
</LinearLayout>
<View
android:layout_width="2dp"
android:layout_height="match_parent"
android:layout_margin="3dp"
android:background="#000" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Team B"
android:textColor="#00f"
android:textSize="30dp" />
<TextView
android:id="#+id/team2_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="30dp"
android:layout_marginTop="30dp"
android:text="0"
android:textSize="45sp" />
<Button
android:id="#+id/btn_3_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:onClick="threePointB"
android:text="+3 Points" />
<Button
android:id="#+id/btn_2_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:onClick="twoPointB"
android:text="+2 Points" />
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="onePointB"
android:text="Free Throw" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button
android:id="#+id/btn_1_point_b"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="reset"
android:text="RESET" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
I have a problem in my fragment design.Layout's component are rtl and desirable in the android studio environment.But when I run my application on my device,they become ltr. I put my xml code and Two image of design.
<?xml version="1.0" encoding="utf-8"?>
<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"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".Fragment.ProfileFragment"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="#layout/profile_toolbar"
android:layout_width="match_parent"
android:layout_height="64dp">
</include>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1">
<ImageView
android:id="#+id/imgEditName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
app:srcCompat="#drawable/ic_edit" />
<TextView
android:id="#+id/txtName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0.5"
android:gravity="right"
android:text="مریم"
android:textColor="#433D3E" />
<TextView
android:id="#+id/txtTitleName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:paddingRight="10dp"
android:text="نام "
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgEditFamily"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
app:srcCompat="#drawable/ic_edit" />
<TextView
android:id="#+id/txtFamily"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_weight="0.5"
android:gravity="right"
android:text="کاظمی"
android:textColor="#433D3E" />
<TextView
android:id="#+id/txtTitleFamily"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:paddingRight="10dp"
android:text="نام خانوادگی"
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgEditMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
app:srcCompat="#drawable/ic_edit" />
<TextView
android:id="#+id/txtMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:text="example#gmail.com"
android:textColor="#433D3E" />
<TextView
android:id="#+id/txtTitleMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:paddingRight="10dp"
android:text="ایمیل"
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgEditPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
app:srcCompat="#drawable/ic_edit" />
<TextView
android:id="#+id/txtPhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:text="09337852463"
android:textColor="#433D3E" />
<TextView
android:id="#+id/txtTitlePhone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:hint="شماره تلفن همراه : "
android:paddingRight="10dp"
android:text="شماره تلفن"
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="#+id/imgEditUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
app:srcCompat="#drawable/ic_edit" />
<TextView
android:id="#+id/txtUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:text="SampleUser"
android:textColor="#433D3E" />
<TextView
android:id="#+id/txtTitleUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:hint="نام کاربری : "
android:paddingRight="10dp"
android:text="نام کاربری"
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="#+id/btnAddress"
style="#style/StyleButton"
android:layout_width="110dp"
android:layout_height="40dp"
android:layout_gravity="left"
android:layout_marginLeft="15dp"
android:text="مشاهده آدرس ها" />
<TextView
android:id="#+id/txtTitleAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:gravity="right"
android:paddingRight="10dp"
android:text="آدرس ها"
android:textColor="#D0CFCF" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_weight="1"
android:orientation="vertical">
<Button
android:id="#+id/btnChangePassword"
style="#style/StyleButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:text="تغییر رمز عبور" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
<Button
android:id="#+id/btnSaveProfile"
style="#style/StyleButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:text="ذخیره تغییرات">
</Button>
</LinearLayout>
</LinearLayout>
</FrameLayout>
the attribute android:layoutDirection in LinearLayout default is ltr in android studio, but in real device attribiute set by direction of your mobile language.
set android:layoutDirection="ltr" in LinearLayout
I have designed layout by taking the reference from this and code for the same is below.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/ll_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/action_bar_color"
android:minHeight="?attr/actionBarSize">
<TextView
android:id="#+id/txt_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="#dimen/image_margin_left"
android:text="#string/app_name"
android:textColor="#android:color/black"
android:textSize="#dimen/login_txt_size" />
<ImageView
android:id="#+id/img_refresh"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_action_refresh" />
<ImageView
android:id="#+id/img_setting"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_action_settings" />
<ImageView
android:id="#+id/img_wifi"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_wifi_on"
android:tint="#color/button_theme_color" />
</android.support.v7.widget.Toolbar>
<TextView
android:id="#+id/tv_home_networkStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#003b60"
android:gravity="center_horizontal"
android:padding="10dp"
android:text="Medium Text"
android:textColor="#FFFF0000"
android:textSize="20sp"
android:visibility="visible" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:gravity="center">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="10">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="50dp"
android:src="#drawable/logo_login" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:layout_weight="6"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/round_masjid_corner"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:src="#drawable/masjid" />
<View
android:layout_width="5dp"
android:layout_height="match_parent"
android:background="#drawable/user_sep" />
<EditText
android:id="#+id/edt_clientid"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="#null"
android:hint="Client ID"
android:inputType="number"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="#drawable/round_kiosk_corner"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#null"
android:padding="20dp"
android:src="#drawable/tablet" />
<View
android:layout_width="5dp"
android:layout_height="match_parent"
android:background="#drawable/pass_sep" />
<EditText
android:id="#+id/edt_device_code"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="#null"
android:hint="Device Code"
android:inputType="text"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<Button
android:id="#+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/custom_button_frag_menu"
android:padding="20dp"
android:text="Login"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="35sp" />
<Button
android:id="#+id/btn_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/custom_button_frag_menu"
android:padding="20dp"
android:text="Cancel"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
And code of manifest is below
<activity android:name=".activity.LoginActivity"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="landscape"
android:windowSoftInputMode="adjustPan|adjustResize">
</activity>
But still it gives output like . When soft keyboard is appearing buttons are hiding below of the soft keyboard.I have tried by using adjustResize as well as adjustPan,but still no change in output.I have added ScrollView too If anyone is having the solution please help
Try this make ScrollView as parent root layout like below code
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/ll_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/action_bar_color"
android:minHeight="?attr/actionBarSize">
<TextView
android:id="#+id/txt_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="#dimen/image_margin_left"
android:text="#string/app_name"
android:textColor="#android:color/black"
android:textSize="#dimen/login_txt_size" />
<ImageView
android:id="#+id/img_refresh"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_action_refresh" />
<ImageView
android:id="#+id/img_setting"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_action_settings" />
<ImageView
android:id="#+id/img_wifi"
android:layout_width="#dimen/logo_image_w"
android:layout_height="#dimen/logo_image_h"
android:layout_gravity="right"
android:layout_marginLeft="#dimen/image_margin_left"
android:background="#drawable/custom_image_click"
android:src="#drawable/ic_wifi_on"
android:tint="#color/button_theme_color" />
</android.support.v7.widget.Toolbar>
<TextView
android:id="#+id/tv_home_networkStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#003b60"
android:gravity="center_horizontal"
android:padding="10dp"
android:text="Medium Text"
android:textColor="#FFFF0000"
android:textSize="20sp"
android:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="10">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="50dp"
android:src="#drawable/logo_login" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:layout_weight="6"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/round_masjid_corner"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="20dp"
android:src="#drawable/masjid" />
<View
android:layout_width="5dp"
android:layout_height="match_parent"
android:background="#drawable/user_sep" />
<EditText
android:id="#+id/edt_clientid"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="#null"
android:hint="Client ID"
android:inputType="number"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="#drawable/round_kiosk_corner"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="#null"
android:padding="20dp"
android:src="#drawable/tablet" />
<View
android:layout_width="5dp"
android:layout_height="match_parent"
android:background="#drawable/pass_sep" />
<EditText
android:id="#+id/edt_device_code"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:background="#null"
android:hint="Device Code"
android:inputType="text"
android:singleLine="true"
android:textColor="#FFFFFF"
android:textColorHint="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<Button
android:id="#+id/btn_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/custom_button_frag_menu"
android:padding="20dp"
android:text="Login"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="35sp" />
<Button
android:id="#+id/btn_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/custom_button_frag_menu"
android:padding="20dp"
android:text="Cancel"
android:textAllCaps="false"
android:textColor="#FFFFFF"
android:textSize="35sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
than apply android:windowSoftInputMode="adjustResize" in manifest file to your activity
NOTE: - fullscreen mode doesn't resize
I have my xml file. It is a RelativeLayout with a ScrollView and inside the ScrollView I have LinearLayout and many more. The problem is that I can't reach the end of the view, as you can see it end with a "Sign Up" button... But my view is cut by the scroll and I can just see the middle of the button, the other middle is off screen.
So, any suggestions for how can I fix this? How can I work with the ScrollView so it wraps all of my content...
Check it:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#drawable/bg_signup"
android:orientation="vertical"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".SignUp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:background="#xml/signup_round">
<LinearLayout
android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#xml/border_lines"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/new_signup" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:text="#string/signup"
android:textColor="#color/colorRB"
android:textSize="26sp"
android:textStyle="bold" />
</LinearLayout>
<EditText
android:id="#+id/first_name_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:layout_marginTop="-25dp"
android:hint="#string/first_name"
android:textColor="#color/colorRB" />
<EditText
android:id="#+id/last_name_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:hint="#string/last_name"
android:textColor="#color/colorRB" />
<EditText
android:id="#+id/email_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:hint="#string/email"
android:inputType="textEmailAddress"
android:textColor="#color/colorRB" />
<EditText
android:id="#+id/email_confirmation_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:hint="#string/email_confirmation"
android:inputType="textEmailAddress"
android:textColor="#color/colorRB" />
<EditText
android:id="#+id/password_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:hint="#string/password"
android:inputType="textPassword"
android:textColor="#color/colorRB" />
<EditText
android:id="#+id/password_confirmation_EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:hint="#string/password_confirmation"
android:inputType="textPassword"
android:textColor="#color/colorRB" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#xml/border_lines"
android:text="#string/sex"
android:textColor="#color/colorRB"
android:textSize="26sp"
android:textStyle="bold" />
<Spinner
android:id="#+id/sex_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-25dp"
android:entries="#array/sex_array" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#xml/border_lines"
android:text="#string/brithday"
android:textColor="#color/colorRB"
android:textSize="26sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-35dp"
android:orientation="horizontal">
<Button
android:id="#+id/birthdayBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="#color/fbutton_color_transparent"
android:onClick="showDatePickerDialog"
android:text="#string/birthdayBtn"
android:textAllCaps="false"
android:textColor="#color/colorRB" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="#+id/dateSelectedTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="--/--/--"
android:textColor="#color/colorRB"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingBottom="5dp"
android:text="#string/terms_conditions"
android:textColor="#color/colorRB"
android:textStyle="bold" />
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0" />
</LinearLayout>
<Button
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="5dp"
android:background="#xml/button_round"
android:onClick=""
android:text="#string/signup"
android:textColor="#color/white"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick=""
android:src="#drawable/close_signup" />
</RelativeLayout>