0

I am new in android development. In my application I am using a PagerAdapter, and want to implement list view in one tab. Which class extends fragment , with custom adapter. There is one layout for list view and one block for the list module. Here is my layout code.

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" 
    >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" 
        android:weightSum="4">

        <TextView
            android:id="@+id/mail_id"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:maxLength="20"
            android:text="Large Textkgl;dakgl;SLFLKFJELJSFJJSKJDGLKGDHKDJHALJ"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_weight="1"
            android:padding="7dp"
            android:layout_gravity="center_vertical" />

        <EditText
            android:id="@+id/mail_time"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="12:35"
            android:inputType="time" 
            android:layout_weight="3"/>
    </LinearLayout>

</LinearLayout>



<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_container"
    android:layout_width="match_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

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

        <TextView
            android:id="@+id/textView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="#ff5240"
            android:gravity="center_horizontal"
            android:padding="10dp"
            android:text="My Messages"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:textSize="30sp"
            android:textStyle="bold"
            android:typeface="serif"
            tools:ignore="HardcodedText" />

        <TextView
            android:id="@+id/textView2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:paddingBottom="5dp"
            android:paddingTop="10dp"
            android:text="Let&apos;s help you find the best perks!"
            android:textAppearance="?android:attr/textAppearanceMedium" />
    </LinearLayout>

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_weight="1" >

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

            <ListView
                android:id="@+id/mailview"
                android:layout_width="match_parent"
                android:layout_height="match_parent" >
            </ListView>

        </LinearLayout>
    </ScrollView>
</LinearLayout>
Dhiman
  • 146
  • 1
  • 5
  • 21

0 Answers0