missing the end of my app's screen - c#

ok I am using a RelativeLayout, my problem is that when I run my app the bottom part of the screen is missing . here is the code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff457670">
<TextView
android:layout_width="163.3dp"
android:id="#+id/currentStreak"
android:layout_height="wrap_content"
android:text="Right:"
android:layout_marginTop="60dp"
android:background="#ff22202e"
android:textColorLink="#ffffffff"
android:textColor="#ffffffff" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="50sp"
android:layout_marginTop="30dp"
android:id="#+id/number"
android:layout_marginLeft="130dp"
android:layout_marginRight="21.7dp" />
<TextView
android:layout_width="148.9dp"
android:layout_height="wrap_content"
android:text=" Wrong:"
android:layout_marginTop="60dp"
android:background="#ff22202e"
android:layout_alignParentRight="true"
android:textColor="#ffffffff"
android:id="#+id/Wrong" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="50sp"
android:layout_marginTop="30dp"
android:id="#+id/number8"
android:layout_marginLeft="100dp"
android:layout_alignParentRight="true" />
<EditText
android:layout_width="332.2dp"
android:layout_height="61.9dp"
android:background="#f0000000"
android:textColor="#ffffff"
android:textStyle="bold"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:layout_marginTop="30dp"
android:id="#+id/Spinner"
android:layout_marginLeft="55.6dp"
android:layout_below="#+id/currentStreak" />
<EditText
android:layout_width="332.2dp"
android:layout_height="55.9dp"
android:layout_marginLeft="55.6dp"
android:background="#f0000000"
android:textColor="#ffffff"
android:textStyle="bold"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:layout_marginTop="10dp"
android:id="#+id/Spinner2"
android:layout_below="#id/Spinner"
android:visibility="invisible" />
<Button
android:id="#+id/EnterB"
android:layout_below="#+id/Spinner2"
android:layout_marginTop="30dp"
android:text="Enter"
android:layout_column="1"
android:layout_width="384.4dp"
android:layout_height="wrap_content"
android:background="#ff22202e"
android:enabled="false"
android:textColor="#ffffffff" />
<Button
android:id="#+id/myButton"
android:layout_marginTop="5dp"
android:text="Play a Note"
android:layout_column="1"
android:layout_width="384.5dp"
android:layout_height="53.5dp"
android:background="#ff22202e"
android:clickable="true"
android:layout_below="#id/EnterB" />
<TextView
android:layout_width="391.2dp"
android:id="#+id/blank"
android:layout_height="match_parent"
android:layout_marginTop="60dp"
android:background="#ff457670"
android:layout_below="#id/myButton"
android:textColor="#ffffffff" />
</RelativeLayout>
what am I doing wrong? I can see the whole screen in Xamarin Studio but not when I run the code... it shows the last button but then the screen is cut off. it so not show the last TextView

The relative layout needs to have the views laid out relative to others. It looks like everything is going to be stacked on top of each other in the upper left hand corner. You need to use these layout attributes in your XML layout so that things get positioned appropriately: http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html
Or if you just want them one on top of another, use the LinearLayout instead: http://developer.android.com/reference/android/widget/LinearLayout.html

Related

I am implementing Recycler View in my project Xamarin Android and Card View

I am implementing RecyclerView and CardView. RecylerView didn't gives any error but CardView xml shows me this error:
Could not load controls from the Android Support Library, Performing a NuGet Restore may fix this.
<android.support.v7.widget.CardView
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"
app:cardCornerRadius="8dp"
android:scrollbarAlwaysDrawHorizontalTrack="false"
android:scrollbars="horizontal|none">
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f8f8f8"
>
<ImageView
android:src="#drawable/pothole1"
android:layout_width="265dp"
android:layout_height="197dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="140dp"
android:id="#+id/imgIssue" />
<ImageView
android:layout_width="265dp"
android:layout_height="197dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="140dp"
android:visibility="visible"
android:scrollbars="horizontal"
android:id="#+id/imageView1"
android:scaleType="centerCrop"
android:contentDescription="description"
tools:ignore="MissingDimension,Suspicious0dp" />
<ImageView
android:src="#drawable/belowbg"
android:layout_width="265dp"
android:layout_height="251dp"
android:layout_marginTop="313dp"
android:layout_centerHorizontal="true"
android:id="#+id/imgbelowPath"
/>
<ImageView
android:src="#drawable/profile"
android:layout_width="150dp"
android:layout_height="92dp"
android:layout_marginTop="310dp"
android:layout_marginStart="25dp"
android:id="#+id/imgProfile"
/>
<TextView
android:text="Nabeel Khan"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/imgIssue"
android:layout_marginTop="30dp"
android:layout_marginStart="140dp"
android:textSize="15dp"
android:textColor="#fff"
android:textStyle="normal"
android:id="#+id/tvname" />
<TextView
android:text="24m"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/imgIssue"
android:layout_marginStart="140dp"
android:textSize="10dp"
android:layout_marginTop="50dp"
android:textColor="#fff"
android:textStyle="normal"
android:id="#+id/tvtime" />
<ImageView
android:src="#drawable/downbtn"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="260dp"
android:layout_below="#id/imgIssue"
android:id="#+id/imgoptions"
android:layout_marginTop="20dp"
/>
<TextView
android:text="Open Road Spill"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/imgIssue"
android:textSize="20dp"
android:layout_centerHorizontal="true"
android:maxLines="3"
android:layout_marginTop="85dp"
android:layout_marginStart="100dp"
android:layout_marginEnd="60dp"
android:textColor="#fff"
android:textStyle="normal"
android:id="#+id/tvinfo" />
</RelativeLayout>
</android.support.v7.widget.CardView>
I have already tried:
Restore NuGet Packages.
Update all the NuGet Packages.
Bin and Obj delete.
Build and Rebuild Solution.
You could try to check if your project has migrated to AndroidX
If yes,you could refer to this.

Same Design on different Android versions

I am new at Xamarin and started working with it yesturday. I am trying to make an Android App using it in Visual Studio 2017, it works fine on Android Version 8.0, but on v. 7.0 the control elements on the screen get into different places.
Android 8.0:
Android 7.0:
Designer code:
<?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="match_parent"
android:minWidth="25px"
android:minHeight="25px">
<TextView
android:text="Available Queries:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/queriescnt"
android:textAlignment="center" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/queriescnt"
android:id="#+id/email"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="35dp"
android:layout_marginRight="326.0dp"
android:singleLine="true" />
<Button
android:text="Search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/email"
android:id="#+id/submit"
android:layout_marginVertical="20dp"
android:layout_marginHorizontal="10dp" />
<EditText
android:layout_width="249.0dp"
android:layout_height="wrap_content"
android:layout_below="#id/submit"
android:id="#+id/keybox"
android:layout_marginVertical="300dp"
android:layout_marginHorizontal="50dp"
android:layout_marginRight="201.5dp"
android:password="true"
android:inputType="none|textPassword" />
<TextView
android:text="KEY:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/submit"
android:id="#+id/textView1"
android:layout_marginVertical="320dp"
android:layout_marginHorizontal="10dp" />
<CheckBox
android:text="S"
android:layout_width="54.5dp"
android:layout_height="wrap_content"
android:layout_below="#id/submit"
android:id="#+id/store"
android:layout_marginVertical="315dp"
android:layout_marginHorizontal="300dp" />
<TextView
android:text="Current line count:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/submit"
android:id="#+id/dbcount"
android:gravity="center_horizontal|center_vertical"
android:textSize="40dp"
android:inputType="none|textMultiLine" />
</RelativeLayout>
Can you please help me to make all the elements appear the same on different versions? I would be really thankful, if you also suggest me, what i can do better.
Your margins are messing up your layout. You cannot just add more margin to a view to position it relatively to another view.
I have adjusted your layout to match what you have in the first screen shot.
<?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="match_parent">
<TextView
android:id="#+id/queriescnt"
android:text="Available Queries:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center" />
<EditText
android:id="#+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/queriescnt"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="35dp"
android:maxLines="1" />
<Button
android:id="#+id/submit"
android:text="Search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/email"
android:layout_marginVertical="20dp"
android:layout_marginHorizontal="10dp" />
<TextView
android:id="#+id/dbcount"
android:text="Current line count:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/submit"
android:gravity="center_horizontal|center_vertical"
android:textSize="40dp"
android:inputType="none|textMultiLine" />
<TextView
android:id="#+id/textView1"
android:text="KEY:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"/>
<CheckBox
android:id="#+id/store"
android:text="S"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_margin="10dp"
android:layout_alignParentBottom="true" />
<EditText
android:id="#+id/keybox"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:password="true"
android:inputType="none|textPassword"
android:layout_alignBaseline="#+id/textView1"
android:layout_toEndOf="#+id/textView1"
android:layout_toStartOf="#+id/store"
tools:text="abc" />
</RelativeLayout>
What you may notice here is that I use toEndOf, toStartOf, alignBaseline, alignParentStart, alignParentEnd and alignParentBottom instead of the margins you had.
Simply adding 300dp margin to a view may work in the view port of the preview of the designer while you are fiddling with it. However not all screens have equal width and height both in physical size and in pixel density. Hence, 300dp will not look the same on all screens.
You can try the following code. I have tested the code on Android 7.0 and Android 8.0, it works properly.
<?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="match_parent"
android:minWidth="25px"
android:minHeight="25px">
<TextView
android:text="Available Queries:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/queriescnt"
android:textAlignment="center" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/queriescnt"
android:id="#+id/email"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="35dp"
android:layout_marginRight="326.0dp"
android:singleLine="true" />
<Button
android:text="Search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/email"
android:id="#+id/submit"
android:layout_marginVertical="20dp"
android:layout_marginHorizontal="10dp" />
<TextView
android:text="Current line count:"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/submit"
android:id="#+id/dbcount"
android:gravity="center_horizontal|center_vertical"
android:textSize="40dp"
android:inputType="none|textMultiLine" />
<LinearLayout
android:layout_marginTop="200dp"
android:gravity="center"
android:layout_marginBottom="12dp"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/dbcount"
android:orientation="horizontal">
<TextView
android:text="KEY:"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView1"
android:layout_marginHorizontal="10dp" />
<EditText
android:hint="input"
android:layout_width="249.0dp"
android:layout_height="wrap_content"
android:id="#+id/keybox"
android:layout_toRightOf="#id/textView1"
android:password="true"
android:inputType="none|textPassword" />
<CheckBox
android:text="S"
android:layout_width="54.5dp"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/keybox"
android:id="#+id/store"/>
</LinearLayout>
</RelativeLayout>
Android 7.0
enter image description here
Android 8.0
enter image description here
Note:
You could include the three controls(TextView, EditText, CheckBox) into a parent layout(eg. LinearLayout), then you do not need to set the properties for each three controls.
The layout_below perperty you set is not right. When you add the parent layout for the below controls, you just need to add the property for the parent layout.
android:layout_below="#id/dbcount"

Crop overlay to mark the scan field

I implemented a barcode scanner in our Xamarin app. To implement the scanner I followed this tutorial: https://www.c-sharpcorner.com/article/xamarin-android-qr-code-reader-by-mobile-camera/
So, I have a SurfaceView, a CameraSource and a BarcodeDetector. Now I want to crop the camera preview to say the scanner where the barcode in which we have to scan because it is possible that the source from which we can have more than one barcode.
I think this will work with Simple Crop View (or something similar) but I don't how to implement it.
All solutions found here are not working or I'm missing something.
Do you want to acheve it like this GIF?
If so, you could achieve it with ZXing.Net.Mobile
https://github.com/Redth/ZXing.Net.Mobile
There is my demo
https://github.com/851265601/Scanebarcode
Update: If you still want to use the solution like the blew link
https://www.c-sharpcorner.com/article/xamarin-android-qr-code-reader-by-mobile-camera/
I changed the layout like following code. I usd FramLayout, SurfaceView was coverd by other raylout just like LinearLayout or relativelayout
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<SurfaceView
android:id="#+id/cameraView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<RelativeLayout
android:background="#953399ff"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="330dp"
android:orientation="horizontal">
<RelativeLayout
android:background="#953399ff"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1" />
<RelativeLayout
android:id="#+id/rlscan"
android:layout_width="220dp"
android:layout_height="fill_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/area_above_left" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="#drawable/area_above_right" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:src="#drawable/area_below_left" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:src="#drawable/area_below_right" />
</RelativeLayout>
<RelativeLayout
android:background="#953399ff"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1" />
</LinearLayout>
<RelativeLayout
android:background="#953399ff"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TextView
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:id="#+id/txtResult"
android:layout_below="#+id/cameraView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Please focus Camera to QR Code"
android:textSize="10sp"
android:layout_marginTop="20dp" />
</RelativeLayout>
</LinearLayout>
</FrameLayout>

textView position for slidedown menu

Xamarin Android
I'm trying make slidedown menu.
I don't know, what i'm doing wrong.
I can't position textView like i want.
View should be on the top of screen. However, it's on the bottom.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="25px"
android:minHeight="25px"
android:background="#f2f2f2">
<RelativeLayout
android:id="#+id/productTitleBar"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="55dp"
android:background="#ff46a1e1">
<TextView
android:id="#+id/txtProductTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:text="Product List"
android:layout_gravity="center"
android:clickable="true"
android:layout_centerVertical="true"
android:textSize="18dp"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<TextView
android:id="#+id/txtDescription"
android:layout_width="match_parent"
android:layout_height="100dp"
android:textColor="#000000"
android:text="Desription goes here"
android:layout_gravity="center"
android:clickable="true"
android:textSize="18dp"
android:layout_above="#+id/btnImgExpander"
android:background="#FFFFFF"
android:gravity="center"
android:visibility="gone" />
<ImageView
android:id="#+id/btnImgExpander"
android:layout_alignParentBottom="true"
android:layout_height="30dp"
android:layout_width="match_parent"
android:src="#drawable/up_arrow"
android:background="#fff2f2f2" />
<ListView
android:id="#+id/productListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="55dp"
android:layout_marginBottom="30dp"
android:background="#android:color/background_light"
android:fastScrollEnabled="true" />
</RelativeLayout>
I have
I want
Someone can help me with this problem?
android:layout_above="#+id/btnImgExpander" is set on the TextView, but android:layout_alignParentBottom="true" is set on the ImageView, which is aligning it to the bottom of the container (the outer RelativeLayout). You could try: android:layout_alignParentTop="true" and remove the android:layout_alignParentBottom="true"

Android - Move button to bottom in layout

I'm having some issues with align my button to the bottom of my layout. Look this picture:
As you can see I need this 5 button to be at the bottom of my layout. How can I do that? I tried layout gravity to bottom but it doesn't work. This is my code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#android:color/background_light"
android:orientation="vertical"
android:weightSum="100">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="80">
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="25"
android:layout_marginTop="20dp"
android:text="- How much wood would a woodchuck chuck if a woodchuck could chuck wood?"
android:textAppearance="?android:attr/textAppearanceSmall"
android:background="#android:color/holo_blue_dark"
android:paddingTop="20dp"
android:paddingLeft="5dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom">
<Button
android:id="#+id/btnA"
android:layout_height="60dp"
android:text="YOLO"
android:maxHeight="60dp"
android:minHeight="60dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_weight="1"
android:textSize="10dp"
android:background="#android:color/background_dark"
android:layout_margin="10dp" />
<Button
android:id="#+id/btnB"
android:text=" asda sdas dasd asd asasdasdaCiaoaga gaerg aergae gr earg aerg aerg "
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_weight="1"
android:textSize="10dp"
android:layout_height="match_parent"
android:background="#android:color/background_dark"
android:layout_margin="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom">
<Button
android:id="#+id/btnC"
android:layout_height="60dp"
android:text="James Bond"
android:maxHeight="60dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:minHeight="60dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:textSize="10dp"
android:background="#android:color/background_dark"
android:layout_margin="10dp" />
<Button
android:id="#+id/btnD"
android:layout_height="60dp"
android:text="Dunno"
android:maxHeight="60dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:minHeight="60dp"
android:layout_width="match_parent"
android:layout_weight="1"
android:textSize="10dp"
android:background="#android:color/background_dark"
android:layout_margin="10dp" />
</LinearLayout>
<Button
android:text="Change"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/btnCambia"
android:background="#android:color/holo_orange_dark" />
you can add them to a different layout and set
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="bottom"
Add an empty view between textview's linearlayout and buttons' linear layout like this :
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
Put your main linearlayout tag in a relativelayout and then set alignparentbottom as true for the linearlayout.

Categories

Resources