English 中文(简体)
如何编造含有2个清单的布局和海底图
原标题:How to scroll a layout that contains 2 listviews and a textview in android

在我的活动网页上,名字是一份布局图,其中载有上表(清单表1)、下表1、复印件是文字概览,在本次测试表之后,有第二份名单。 我想总结一下全部布局。

以下是样本代码。

<ScrollView
    android:id="@+id/scrol1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@id/linearLayout1"
    android:layout_marginTop="15dp" android:scrollbars="vertical" android:isScrollContainer="true">

    <RelativeLayout
        android:id="@+id/relativeLayout4"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/linearLayout1"
        android:layout_marginTop="15dp" >

        <ListView
            android:id="@+id/lstMore"
            android:layout_width="fill_parent"
            android:layout_height="200dp"
            android:divider="@null"
            android:fadingEdge="none"
            android:footerDividersEnabled="false" android:dividerHeight="0dp" android:cacheColorHint="#00000000">
        </ListView>

        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Learn More"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@color/black"
            android:textStyle="bold" android:layout_below="@id/lstMore"/>

        <ListView
            android:id="@+id/lstMoreBottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fadingEdge="none" android:layout_below="@id/textView2" android:divider="@null" android:dividerHeight="0dp" android:cacheColorHint="#00000000">
        </ListView>

    </RelativeLayout>
</ScrollView>
最佳回答

根据我的经验,不可能在一份意见书中提出多份意见。 你们试图将两个可耕种的植被置于另一个可耕种的植被中。

你们应该做的是,在您的名单上,不作任何改动,就有一个单一名单,没有书面意见。

问题回答

You can use multiple listview in a scroll bar. Use nestedscrollbar true in API 21 and above.Write this in your listview : android:nestedScrollingEnabled="true"

It will work definitly





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签