ScrollView not works on Relative Layout - android

I am trying to make my layout Scrollable by adding ScrollView as an parent for my Relative Layout.But my layout not scrolled.I have added the fillport property to true.
Here is my xml file:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/scrollView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="#+id/repActivityTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:ellipsize="middle"
android:textSize="18sp"
android:background="#android:color/darker_gray"
android:text="#string/representativeTitle" />
<TextView
android:id="#+id/repStreet"
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/repImage"
android:layout_marginTop="14sp"
android:layout_toRightOf="#+id/repImage"
android:layout_margin="3sp"
android:text="#string/repStreet" />
<TextView
android:id="#+id/repState"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/repStreet"
android:layout_toRightOf="#+id/repImage"
android:text="#string/repState" />
<TextView
android:id="#+id/repCountry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/repState"
android:layout_below="#+id/repState"
android:text="#string/repCountry" />
<com.google.android.maps.MapView
android:id="#+id/repMap"
android:layout_width="100dip"
android:layout_height="100dip"
android:paddingTop="2dp"
android:layout_marginTop="2dp"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/repImage"
android:apiKey="0lsQmtr2D241pSL53j0vQ2lYUs4_ZIWkIHyHAKw" >
</com.google.android.maps.MapView>
<View
android:id="#+id/firstHorizontalLine"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/repMap"
android:layout_marginTop="54dp"
android:background="#android:color/black" />
<TextView
android:id="#+id/issues2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/issues1"
android:layout_centerVertical="true"
android:text="#string/issues2" />
<View
android:id="#+id/secondHorizontalLine"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/accomplishments"
android:background="#android:color/black" />
<TextView
android:id="#+id/issues"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_alignBottom="#+id/firstHorizontalLine"
android:layout_alignRight="#+id/repStreet"
android:text="#string/issues" />
<TextView
android:id="#+id/accomplish2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/accomplish1"
android:layout_below="#+id/accomplish1"
android:layout_marginTop="18dp"
android:text="#string/accomplishments2" />
<TextView
android:id="#+id/promises"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/issues"
android:gravity="center"
android:layout_below="#+id/accomplish2"
android:text="#string/promises" />
<View
android:id="#+id/thirdHorizontalLine"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#android:color/black"
android:layout_alignParentLeft="true"
android:layout_below="#+id/promises" />
<TextView
android:id="#+id/accomplishments"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/issues2"
android:gravity="center"
android:layout_toLeftOf="#+id/repMap"
android:text="#string/accomplishments" />
<TextView
android:id="#+id/accomplish1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/secondHorizontalLine"
android:layout_marginTop="21dp"
android:text="#string/accomplishments1" />
<TextView
android:id="#+id/issues1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/issues2"
android:layout_alignParentLeft="true"
android:layout_marginBottom="14dp"
android:text="#string/issues1" />
<ImageView
android:id="#+id/repImage"
android:layout_width="100dip"
android:layout_height="100dip"
android:layout_alignParentLeft="true"
android:layout_below="#+id/repActivityTitle"
android:contentDescription="#string/representativeImage"
android:paddingTop="2dp"
android:layout_marginTop="2dp"
android:scaleType="centerCrop"
android:src="#drawable/icon" />
<TextView
android:id="#+id/promise1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/thirdHorizontalLine"
android:layout_marginTop="19dp"
android:text="#string/promises1" />
<TextView
android:id="#+id/promise2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/promise1"
android:text="#string/promises2" />
</RelativeLayout>
</ScrollView>
Here I have used the ScrollView but the full content of layout is not as showing.As scrolls not work here.

Try to remove this line and check
android:fillViewport="true"
And also you can try height of relativelayout to match_parent instead of wrap_content
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>

Related

List View inside relative layout and scroll view not covering screen

I have below layout
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="#+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/searchScreenBG">
<RelativeLayout
android:id="#+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="#dimen/_7sdp">
<ImageButton
android:id="#+id/ib_hamburger"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginEnd="#dimen/_16sdp"
android:layout_marginRight="#dimen/_16sdp"
android:layout_marginTop="#dimen/_15sdp"
android:background="#android:color/transparent"
android:contentDescription="#null"
app:srcCompat="#drawable/ham_burger" />
<com.rod.com.rod.ui.views.CTextView
android:id="#+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/ib_hamburger"
android:layout_centerHorizontal="true"
android:text="#string/basic_details"
android:textColor="#color/colorGreen" />
<ImageButton
android:id="#+id/ib_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignTop="#+id/ib_hamburger"
android:layout_marginLeft="#dimen/_16sdp"
android:layout_marginStart="#dimen/_16sdp"
android:background="#android:color/transparent"
android:contentDescription="#null"
app:srcCompat="#drawable/left_arrow" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/reg_no_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/_5sdp"
android:layout_below="#+id/title_bar"
android:background="#color/colorWhite">
<TextView
android:id="#+id/tv_reg_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="19dp"
android:textColor="#color/colorLightGrey" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/reg_no_layout"
>
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:layout_marginRight="#dimen/_10sdp"
android:layout_marginLeft="#dimen/_10sdp"
android:layout_weight="1">
<RelativeLayout
android:id="#+id/basic_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="#dimen/_10sdp"
android:background="#drawable/list_item_bg"
android:paddingBottom="#dimen/_10sdp">
<TextView
android:id="#+id/tv_district_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="50dp"
android:layout_marginStart="50dp"
android:layout_marginTop="11dp"
android:text="#string/district"
android:textColor="#color/colorBlack"
android:textSize="#dimen/_13sdp" />
<TextView
android:id="#+id/tv_district"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_district_label"
android:layout_alignStart="#+id/tv_district_label"
android:layout_below="#+id/tv_district_label"
android:text="TextView"
android:textColor="#color/colorLightGrey" />
<TextView
android:id="#+id/tv_tehsil_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/tv_district"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginEnd="75dp"
android:layout_marginRight="75dp"
android:text="#string/tehsil"
android:textColor="#color/colorBlack" />
<TextView
android:id="#+id/tv_tehsil"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/tv_district"
android:layout_alignLeft="#+id/tv_tehsil_label"
android:layout_alignStart="#+id/tv_tehsil_label"
android:text="TextView"
android:textColor="#color/colorLightGrey" />
<TextView
android:id="#+id/tv_date_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_district"
android:layout_alignStart="#+id/tv_district"
android:layout_below="#+id/tv_district"
android:layout_marginTop="13dp"
android:text="#string/date"
android:textColor="#color/colorBlack" />
<TextView
android:id="#+id/tv_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_date_label"
android:layout_alignStart="#+id/tv_date_label"
android:layout_below="#+id/tv_date_label"
android:text="TextView"
android:textColor="#color/colorLightGrey" />
<TextView
android:id="#+id/tv_jild_no_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/tv_date_label"
android:layout_alignLeft="#+id/tv_tehsil"
android:layout_alignStart="#+id/tv_tehsil"
android:text="#string/jild_no"
android:textColor="#color/colorBlack" />
<TextView
android:id="#+id/tv_jild_no"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_jild_no_label"
android:layout_alignStart="#+id/tv_jild_no_label"
android:layout_below="#+id/tv_jild_no_label"
android:text="TextView"
android:textColor="#color/colorLightGrey" />
<TextView
android:id="#+id/tv_party_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_date"
android:layout_alignStart="#+id/tv_date"
android:layout_below="#+id/tv_date"
android:layout_marginTop="13dp"
android:text="#string/party"
android:textColor="#color/colorBlack" />
<TextView
android:id="#+id/tv_party"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tv_party_label"
android:layout_alignStart="#+id/tv_party_label"
android:layout_below="#+id/tv_party_label"
android:text="TextView"
android:textColor="#color/colorLightGrey" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_below="#+id/basic_details"
android:layout_marginTop="13dp"
android:background="#drawable/list_item_bg">
<TextView
android:id="#+id/tv_member_details_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="#dimen/_40sdp"
android:layout_marginStart="#dimen/_40sdp"
android:layout_marginTop="14dp"
android:text="#string/member_details"
android:textColor="#color/colorBlack"
android:textSize="#dimen/_16sdp" />
<ListView
android:id="#+id/lv_members"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/tv_member_details_label"
android:layout_marginLeft="#dimen/_40sdp"
android:layout_marginRight="#dimen/_40sdp"
android:layout_marginStart="#dimen/_40sdp"
android:layout_marginTop="16dp"
android:divider="#color/colorLightGrey"
android:dividerHeight="#dimen/_1sdp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
</FrameLayout>
I want to make the relative layout below basic_layout cover the whole of the rest screen. How can I achieve that. After searching I had found that I should put a linear layout inside my scroll view, and then relative layouts should added. But that's of no help.
I want hierachy something like below:
----RelativeLayout
-------TitleBar
-------TextView
-------ScrollView (rest of screen)
----------RelativeLayout (upper portion of scroll view)
------------TextViews
----------RelativeLayout (rest of scrol view)
-------------TextView
-------------ListView
Any help please?
Actually the problem is that you are using 2 layouts in your scrollview so the listview won't take the scroll of itself and it will limit the list height as well. To go around this you need to pass fix value to your listview then it will show completely within that specified height. And the rest of the layout if you want to get exactly as you have shown in the picture you need to use cardview instead.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_below="#+id/basic_details"
android:layout_marginTop="13dp"
android:layout_marginBottom="10dp"
android:background="#drawable/list_item_bg">
<TextView
android:id="#+id/tv_member_details_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="#dimen/_40sdp"
android:layout_marginStart="#dimen/_40sdp"
android:layout_marginTop="14dp"
android:text="#string/member_details"
android:textColor="#color/colorBlack"
android:textSize="16dp" />
<ListView
android:id="#+id/lv_members"
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/tv_member_details_label"
android:layout_marginLeft="#dimen/_40sdp"
android:layout_marginRight="#dimen/_40sdp"
android:layout_marginStart="#dimen/_40sdp"
android:layout_marginTop="16dp"
android:divider="#color/colorLightGrey"
android:dividerHeight="#dimen/_1sdp" />
</RelativeLayout>

Android Programming Linear Layout ArrayList Integers

I have an arraylist of integers called numbers. How do I display these numbers horizontally and then vertically with the linear layout widget for my android app?
public class SecondActivity extends AppCompatActivity {
private ArrayList<Integer> Numbers = new ArrayList<Integer>();
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
Numbers.add(1);
Numbers.add(2);
Numbers.add(3);
Numbers.add(4);
Numbers.add(5);
//Linear Layout code goes here
}
}
In case if its mandatory create a custom table with row and column with the proper weight and repeat row wise with linear layout.
if Not mandatory then use table Layout android. it will make your job simpler.
Here I found Some old Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/dms_background" >
<!-- User Details -->
<RelativeLayout
android:id="#+id/report_title_layout"
android:layout_width="fill_parent"
android:layout_height="#dimen/forty_dp"
android:layout_alignParentTop="true"
android:background="#color/dms_actionbar" >
<TextView
android:id="#+id/report_associate_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="#string/retailer_report"
android:textColor="#color/White" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/report_main_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#id/report_title_layout"
android:layout_marginTop="#dimen/five_dp" >
<!-- Table View -->
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="#dimen/ten_dp"
android:shrinkColumns="*"
android:stretchColumns="*" >
<!-- Row 1 -->
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<RelativeLayout
android:id="#+id/report_salesorder_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_retailt_transaction_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_sales" />
<TextView
android:id="#+id/report_retailt_transaction_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_retailt_transaction_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/report_salesreport"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_retailt_transaction_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal" />
<View
android:layout_width="2dp"
android:layout_height="#dimen/ninty_dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="#drawable/devider_vertical" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/report_salesreturn_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_partner_search_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_return" />
<TextView
android:id="#+id/report_partner_search_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_partner_search_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/report_returnreport"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_partner_search_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal" />
</RelativeLayout>
</TableRow>
<!-- Row 2 -->
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<RelativeLayout
android:id="#+id/report_paymentcollection_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_route_plan_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_payment" />
<TextView
android:id="#+id/report_route_plan_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_route_plan_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/report_payreport"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_route_plan_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal" />
<View
android:layout_width="2dp"
android:layout_height="#dimen/ninty_dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="#drawable/devider_vertical" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/report_performance_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_new_partner_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_performance" />
<TextView
android:id="#+id/report_new_partner_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_new_partner_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/report_performancereport"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_new_partner_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal" />
</RelativeLayout>
</TableRow>
<!-- Row 3 with 2 columns -->
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<RelativeLayout
android:id="#+id/report_stock_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_report_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_stock" />
<TextView
android:id="#+id/report_report_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_report_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/report_stockreport"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_report_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal" />
<View
android:layout_width="2dp"
android:layout_height="#dimen/ninty_dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="#drawable/devider_vertical" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/report_report_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:clickable="true" >
<ImageView
android:id="#+id/report_empty_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:visibility="invisible"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/ic_reportsasso" />
<TextView
android:id="#+id/report_empty_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/report_empty_image"
android:layout_centerHorizontal="true"
android:visibility="invisible"
android:layout_marginTop="#dimen/ten_dp"
android:text="#string/associate_reports"
android:textColor="#color/White" />
<View
android:layout_width="100dp"
android:layout_height="2dp"
android:layout_below="#id/report_empty_text"
android:layout_centerHorizontal="true"
android:layout_marginTop="#dimen/ten_dp"
android:background="#drawable/devider_horizontal"
/>
</RelativeLayout>
</TableRow>
</TableLayout>
</RelativeLayout>
</RelativeLayout>

Scrollview not working properly.Screen doesn't scroll when input keyboards up

XML:
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="#layout/toolbar"/>
<ScrollView
android:id="#+id/scroll"
android:layout_width="wrap_content"
android:layout_below="#+id/toolbar"
android:layout_height="wrap_content"
android:layout_above="#+id/makeOffer"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="#+id/firstcard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
android:layout_marginTop="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<RelativeLayout
android:id="#+id/insidecardone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/constant_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/padding_4dp"
android:text="Charge per day"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/tvRentPerday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:hint="Rs. "
android:gravity="center"
android:inputType="number"
android:maxLength="4"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/insidecardtwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardone"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/con_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Duration (Days)"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/num_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center_horizontal"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_24dp"
android:text="10"
android:textSize="#dimen/text_size_big_16"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_8dp"
android:background="#color/grey_lighter" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_4dp"
android:paddingBottom="#dimen/padding_8dp"
android:paddingTop="#dimen/padding_24dp">
<TextView
android:id="#+id/total_constant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="#dimen/padding_4dp"
android:gravity="center_vertical"
android:text="Total Amount"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/tvAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center_vertical"
android:textColor="#ff4f00"
android:textSize="#dimen/text_size_big_16"
android:textStyle="bold" />
<TextView
android:id="#+id/total_constant_mutterfly"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/total_constant"
android:paddingTop="#dimen/padding_4dp"
android:text="#string/process_fee_text"
android:textColor="#android:color/darker_gray"
android:textSize="8sp" />
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/middlecard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/firstcard"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<RelativeLayout
android:id="#+id/middlecard_relative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="#dimen/padding_4dp">
<TextView
android:id="#+id/deposite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="#dimen/padding_4dp"
android:gravity="center_vertical"
android:text="Deposit"
android:textSize="#dimen/text_size_big_16" />
<TextView
android:id="#+id/knowmore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/deposite"
android:text="#string/txt_know_more"
android:layout_marginTop="#dimen/padding_8dp"
android:textSize="#dimen/text_size_extra_extra_small_10"
/>
<CheckBox
android:id="#+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:inputType="number"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/middletwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/middlecard_relative"
android:layout_margin="#dimen/padding_4dp"
android:visibility="gone"
>
<TextView
android:id="#+id/middle_con_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Charge (Rs.)"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/etDeposit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:hint="1000"
android:maxLength="4"
android:inputType="number"
android:textSize="#dimen/text_size_big_16"
/>
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="#+id/seccard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/middlecard"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
app:cardCornerRadius="#dimen/padding_4dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="#+id/describe_constant_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="#dimen/padding_8dp"
android:text="Describe Your item"
android:textColor="#ff4f00"
android:textStyle="bold" />
<RelativeLayout
android:id="#+id/rlTohide"
android:layout_marginTop="#dimen/padding_4dp"
android:layout_width="160dp"
android:layout_height="120dp"
android:background="#drawable/greyborder_transparentbg"
>
<ImageView
android:id="#+id/img1"
android:layout_centerInParent="true"
android:layout_width="40dp"
android:src="#drawable/addimg"
android:layout_height="40dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/img1"
android:text="(Optional)"
android:textSize="#dimen/text_size_extra_extra_small_10"
android:textColor="#color/text_grey_opc"
android:layout_centerInParent="true"
/>
</RelativeLayout>
<ImageView
android:visibility="gone"
android:id="#+id/imgResource"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:layout_marginTop="#dimen/padding_8dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp"
android:layout_marginTop="180dp"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardone"
android:layout_margin="#dimen/padding_4dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<TextView
android:id="#+id/con_product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="8dp"
android:text="Name Of Product"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/product_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_toEndOf="#+id/con_product_name"
android:layout_toRightOf="#+id/con_product_name"
android:layout_alignParentRight="true"
android:hint="E.g. Nikon DSLR"
android:paddingEnd="#dimen/padding_16dp"
android:paddingRight="#dimen/padding_16dp"
android:maxLength="30"
android:inputType="textPersonName"
android:layout_marginLeft="#dimen/padding_16dp"
android:layout_marginStart="#dimen/padding_16dp"
android:textColor="#android:color/black"
android:textSize="#dimen/text_size_big_16"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/insidecardtwo"
android:layout_margin="#dimen/padding_4dp"
android:layout_marginBottom="#dimen/padding_8dp"
android:layout_marginLeft="#dimen/padding_8dp"
android:layout_marginRight="#dimen/padding_8dp">
<TextView
android:id="#+id/Description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="Description :"
android:textSize="#dimen/text_size_big_16" />
<EditText
android:id="#+id/desc_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Description"
android:hint="E.g. Comes with 18-55 mm lens, charger and carry case"
android:layout_marginTop="#dimen/padding_8dp"
android:background="#drawable/white_border_request_screen"
android:textColor="#android:color/darker_gray"
android:textSize="#dimen/text_size_big_16" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</ScrollView>
<Button
android:id="#+id/makeOffer"
android:layout_width="match_parent"
android:layout_height="#dimen/padding_48dp"
android:layout_alignParentBottom="true"
android:background="#color/new_primary_text"
android:padding="#dimen/padding_8dp"
android:text="#string/txt_make_offr"
android:textColor="#android:color/white"
android:textSize="#dimen/text_size_18"
/>
</RelativeLayout>
Android Manifest
<activity
android:name=".MyActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"/>
I am working on the layout since last night and I tried almost solution which I known. I am new in Android so please suggest me what is wrong with this layout.
this "fillViewport" work for another screen but with this screen it's not working.
Add android:windowSoftInputMode="stateHidden|adjustResize" to your <activity> tag in AndroidManifest.xml file. This will cause the screen to be resized to the left over space after the soft keyboard is shown. So, you will be able to scroll easily.
One more thing set property of ScrollView to the android:layout_above to the Button on the bottom of the page.
UpDate :
add this line to your ScrollView.
android:layout_above="#+id/makeOffer"
like this way
<ScrollView
android:id="#+id/scroll"
android:layout_width="wrap_content"
android:layout_below="#+id/toolbar"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_above="#+id/makeOffer">
ScreenShot :

Picture not aligning top?

So in my program i have a layout implemented in which i want the image to alignTop of the parent. I used to exact same layout code for another activity (with minor changes) and it works perfectly but when using it in this activity it does not. My image still aligns to the center fo the view. Here is the layout xml
<?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:background="#color/darkGray"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="com.intellidev.fuzionvapor.HomeDetails"
tools:showIn="#layout/activity_home_details">
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:scaleType="fitCenter" />
<TextView
android:id="#+id/homeDetailsActivityTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/homeDetailsActivityImage"
android:textColor="#color/white"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:id="#+id/homeDetailsActivityPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="#+id/homeDetailsActivityImage"
android:textColor="#color/fuzionRed"
android:textSize="20sp"
android:textStyle="bold" />
<View
android:id="#+id/homeDetailsActivityRuler"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_below="#+id/homeDetailsActivityTitle"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:background="#color/white" />
<TextView
android:id="#+id/homeDetailsActivityDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/homeDetailsActivityRuler"
android:textColor="#color/white"
android:textSize="15sp" />
<LinearLayout
android:id="#+id/homeDetailsFooter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="#+id/homeDetailsActivityButton"
android:layout_centerHorizontal="true"
android:orientation="horizontal">
<fr.ganfra.materialspinner.MaterialSpinner
android:id="#+id/homeDetailsActivitySizeSpinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_margin="1dp"
android:layout_weight="1"
app:ms_arrowColor="#color/fuzionRed"
app:ms_arrowSize="16dp"
app:ms_baseColor="#color/fuzionRed"
app:ms_enableFloatingLabel="true"
app:ms_floatingLabelColor="#color/fuzionRed"
app:ms_floatingLabelText="#string/sizeFloatingLabel"
app:ms_highlightColor="#color/fuzionRed"
app:ms_hintColor="#color/fuzionRed"
app:ms_hint="Size"
app:ms_multiline="false"
app:ms_thickness="1dp" />
<fr.ganfra.materialspinner.MaterialSpinner
android:id="#+id/homeDetailsActivityNicotineSpinner"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:layout_weight="1"
app:ms_arrowColor="#color/fuzionRed"
app:ms_arrowSize="16dp"
app:ms_baseColor="#color/fuzionRed"
app:ms_enableFloatingLabel="true"
app:ms_floatingLabelColor="#color/fuzionRed"
app:ms_floatingLabelText="#string/nicotineFloatingLabel"
app:ms_highlightColor="#color/fuzionRed"
app:ms_hintColor="#color/fuzionRed"
app:ms_multiline="false"
app:ms_hint="Nicotine"
app:ms_thickness="1dp" />
</LinearLayout>
<Button
android:id="#+id/homeDetailsActivityButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:background="#color/fuzionRed"
android:text="Add To Cart"
android:textAlignment="center"
android:textColor="#color/white"
android:textSize="25sp"
android:textStyle="bold" />
</RelativeLayout>
change
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:scaleType="fitCenter" />
to
<ImageView
android:id="#+id/homeDetailsActivityImage"
android:layout_width="match_parent"
android:layout_alignParentTop="true"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:adjustViewBounds="true"
android:scaleType="fitStart" />

Scroll view doesn't work in layout

I have a scroll view:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="500dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#color/antiquewhiter"
android:weightSum="100"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:background="#drawable/green_gradient_top_bar"
>
<TextView
android:id="#+id/log_in_header_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="#string/Einloggen_text"
style="#style/headerfromdialogs" />
<ImageView
android:id="#+id/log_in_header_exit_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/log_in_header_text"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:onClick="finish"
android:src="#drawable/x_android" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="90" >
<TextView
android:id="#+id/log_in_benutzername_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="40dp"
android:layout_marginTop="80dp"
android:text="#string/Benutzername_text"
style="#style/dialogsGreenTexts" />
<EditText
android:id="#+id/log_in_benutzername_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/log_in_benutzername_text"
android:layout_alignBottom="#+id/log_in_benutzername_text"
android:layout_marginLeft="50dp"
android:layout_marginRight="20dp"
android:layout_toRightOf="#+id/log_in_benutzername_text"
android:ems="10"
android:hint="#string/hint_name_log_in"
>
</EditText>
<TextView
android:id="#+id/log_in_passwort_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/log_in_benutzername_text"
android:layout_below="#+id/log_in_benutzername_edit_text"
android:layout_marginTop="52dp"
android:text="#string/Passwort_text"
style="#style/dialogsGreenTexts" />
<EditText
android:id="#+id/log_in_passwort_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/log_in_passwort_text"
android:layout_alignBottom="#+id/log_in_passwort_text"
android:layout_alignLeft="#+id/log_in_benutzername_edit_text"
android:ems="10"
android:layout_marginRight="20dp"
android:inputType="textPassword"
android:hint="#string/hint_passwort_log_in"
>
</EditText>
<Button
android:id="#+id/log_in_button"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/log_in_passwort_edit_text"
android:layout_marginBottom="45dp"
android:layout_marginRight="-10dp"
android:onClick="logIn"
android:text="#string/Login_text"
style="#style/bold_text18" />
<!-- android:background="#drawable/green_gradient_button" -->
<TextView
android:id="#+id/log_in_passwort_vergessen_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/log_in_button"
android:layout_alignLeft="#+id/log_in_passwort_edit_text"
android:text="#string/Passwort_vergessen_text"
style="#style/dialogsGreenTexts" />
<ProgressBar
android:id="#+id/waitProgessBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone"
/>
<TextView
android:id="#+id/userError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/log_in_benutzername_edit_text"
android:layout_alignLeft="#+id/log_in_benutzername_edit_text"
android:layout_marginBottom="5dp"
android:visibility="gone"
android:textColor="#color/errorRed"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
I want to scroll because on my se xperia neo V in horizontal orientation I can't see all view. Second problem is when I change orientation all view is broke. How change this view to show properly in both orientations?
but scroll doesn't work. Anyone know Why?
Please note :
1) Scroll view must have a single child (i.e all views must be included within a single root layout inside scroll view)
2) ScrollView works when your page size is greater the default height of the screen .
Please check both these things and if still does not work ... Paste some code to have a better understanding of the problem.
try this code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="500dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#color/antiquewhiter"
android:weightSum="100"
>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="10"
android:background="#drawable/green_gradient_top_bar"
>
<TextView
android:id="#+id/log_in_header_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="#string/Einloggen_text"
style="#style/headerfromdialogs" />
<ImageView
android:id="#+id/log_in_header_exit_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/log_in_header_text"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:onClick="finish"
android:src="#drawable/x_android" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="90" >
<TextView
android:id="#+id/log_in_benutzername_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="40dp"
android:layout_marginTop="80dp"
android:text="#string/Benutzername_text"
style="#style/dialogsGreenTexts" />
<EditText
android:id="#+id/log_in_benutzername_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/log_in_benutzername_text"
android:layout_alignBottom="#+id/log_in_benutzername_text"
android:layout_marginLeft="50dp"
android:layout_marginRight="20dp"
android:layout_toRightOf="#+id/log_in_benutzername_text"
android:ems="10"
android:hint="#string/hint_name_log_in"
>
</EditText>
<TextView
android:id="#+id/log_in_passwort_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/log_in_benutzername_text"
android:layout_below="#+id/log_in_benutzername_edit_text"
android:layout_marginTop="52dp"
android:text="#string/Passwort_text"
style="#style/dialogsGreenTexts" />
<EditText
android:id="#+id/log_in_passwort_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/log_in_passwort_text"
android:layout_alignBottom="#+id/log_in_passwort_text"
android:layout_alignLeft="#+id/log_in_benutzername_edit_text"
android:ems="10"
android:layout_marginRight="20dp"
android:inputType="textPassword"
android:hint="#string/hint_passwort_log_in"
>
</EditText>
<Button
android:id="#+id/log_in_button"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignRight="#+id/log_in_passwort_edit_text"
android:layout_marginBottom="45dp"
android:layout_marginRight="-10dp"
android:onClick="logIn"
android:text="#string/Login_text"
style="#style/bold_text18" />
<!-- android:background="#drawable/green_gradient_button" -->
<TextView
android:id="#+id/log_in_passwort_vergessen_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/log_in_button"
android:layout_alignLeft="#+id/log_in_passwort_edit_text"
android:text="#string/Passwort_vergessen_text"
style="#style/dialogsGreenTexts" />
<ProgressBar
android:id="#+id/waitProgessBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone"
/>
<TextView
android:id="#+id/userError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/log_in_benutzername_edit_text"
android:layout_alignLeft="#+id/log_in_benutzername_edit_text"
android:layout_marginBottom="5dp"
android:visibility="gone"
android:textColor="#color/errorRed"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

Categories

Resources