Hi bin versuchen, Scroll zu meiner Aktivität hinzuzufügen.Android Scroll-Ansicht geht über die APP-Leiste
Meine Tätigkeit hat zwei Dateien
1) activity_temple_details
2) content_temple_details
Wenn ich zu blättern versuchen. Der Inhalt ist über der App-Leiste sichtbar.
wie diese
Ich möchte den Inhalt hinter dem appbar oder disapper gehen, während
hier Scrollen ist mein Code
activity_temple_details
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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:fitsSystemWindows="true"
tools:context="baman.lankahomes.lk.jaffnatemples.Temple_Details">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_temple__details" />
</android.support.design.widget.CoordinatorLayout>
content_temple_details
<?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">
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:layout_centerInParent="true"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="baman.lankahomes.lk.jaffnatemples.Temple_Details"
tools:showIn="@layout/activity_temple__details">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:id="@+id/IV_temple_logo"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/ic_action_movie"
android:background="@drawable/image_view_style"
android:layout_marginRight="5dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Temple Name"
android:id="@+id/textView"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/IV_temple_logo"
android:layout_toEndOf="@+id/IV_temple_logo"
android:layout_marginLeft="8dp"
android:textSize="14dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/TV_title"
android:layout_below="@+id/textView"
android:layout_toRightOf="@+id/IV_temple_logo"
android:layout_toEndOf="@+id/IV_temple_logo"
android:textSize="14dp"
android:layout_marginLeft="8dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Address"
android:id="@+id/textView3"
android:layout_below="@+id/TV_title"
android:layout_toRightOf="@+id/IV_temple_logo"
android:layout_toEndOf="@+id/IV_temple_logo"
android:layout_marginTop="10dp"
android:layout_marginLeft="8dp"
android:textSize="14dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/TV_address"
android:layout_below="@+id/textView3"
android:layout_toRightOf="@+id/IV_temple_logo"
android:layout_toEndOf="@+id/IV_temple_logo"
android:textSize="14dp"
android:layout_marginLeft="8dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Description"
android:id="@+id/textView5"
android:layout_below="@+id/IV_temple_logo"
android:layout_alignRight="@+id/IV_temple_logo"
android:layout_alignEnd="@+id/IV_temple_logo"
android:layout_marginTop="10dp"
android:textSize="14dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/TV_Description"
android:layout_below="@+id/textView5"
android:layout_alignRight="@+id/TV_title"
android:layout_alignEnd="@+id/TV_title"
android:background="@drawable/textview_style"
android:textSize="14dp"
android:layout_marginTop="8dp"
android:scrollbars = "vertical"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Directions"
android:id="@+id/button"
android:background="@drawable/button_selector"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="18dp"
android:layout_marginTop="70dp"
android:layout_below="@+id/TV_Description"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Search Again"
android:id="@+id/button2"
android:background="@drawable/button_selector"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="18dp"
android:layout_alignTop="@+id/button"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Suggest an Edit"
android:id="@+id/button3"
android:background="@drawable/button_selector"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="18dp"
android:layout_below="@+id/button"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="15dp" />
</RelativeLayout>
</ScrollView>
kann jemand mir helfen, dieses Problem zu beheben. Tnx.
sollten Sie "verschachtelte Scroll-Ansicht" verwenden und innen, die das Layout ohne Scroll umfassen – kishorepatel