Android : Not scrolling screen

on Friday, September 19, 2014


I have layout the file of the screen in which there is GridView with elements and lianerlayout is slightly lower in which shall information on clicking elements in GridView is output. Here XML file:



<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >

<LinearLayout
android:layout_width="match_parent"
android:layout_height="360dp"
android:orientation="vertical" >

<RelativeLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/calendar_top" >

<RelativeLayout
android:id="@+id/previous"
android:layout_width="40dip"
android:layout_height="30dip"
android:layout_alignParentLeft="true" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/arrow_left" />
</RelativeLayout>

<TextView
android:id="@+id/title_calendar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dip"
android:textColor="#000000"
android:textSize="18dip"
android:textStyle="bold" />

<RelativeLayout
android:id="@+id/next"
android:layout_width="40dip"
android:layout_height="30dip"
android:layout_alignParentRight="true" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/arrow_right" />
</RelativeLayout>
</RelativeLayout>

<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:listSelector="@android:color/transparent"
android:numColumns="7"
android:stretchMode="columnWidth" >
</GridView>

</LinearLayout>

<LinearLayout
android:id="@+id/linLayout_all_ivents_in_this_day"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

</LinearLayout>

</LinearLayout>


The screen is scrolled if I expose any value of height, in my case 360dp (android:layout_height = "360dp"), but it looks ugly and if I expose android:layout_height value = to "wrap_content", it looks as it would be desirable that, but the screen ceases to be scrolled.


0 comments:

Post a Comment