0
SwypeRefreshLayout
にListView
を使用し、スクロールするのはView
の上部のみです。 LinearLayout
,RelativeLayout
のような他のレイアウトも試しましたが、ScrollView
で作業しましたが、リストの最初の2つの要素だけをスクロールします。 何が間違っていますか?Androidリストビューは、1番目または2番目のリストアイテムをタッチするとスクロールします
フラグメントレイアウト:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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.support.v4.widget.SwipeRefreshLayout
android:id="@+id/DeviceOverviewRefresher"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="true"
android:divider="@android:color/transparent"
android:id="@+id/DeviceOverviewList" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
ListRowLayout:あなたの助けを
<?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:minWidth="25px"
android:minHeight="25px">
<LinearLayout
android:id="@+id/Text"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp">
<TextView
android:text="Text"
android:textSize="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="60dp"
android:id="@+id/DeviceName" />
</LinearLayout>
<ImageView
android:id="@+id/Image"
android:layout_width="48dp"
android:layout_height="48dp"
android:padding="1dp"
android:src="@drawable/logo"
android:layout_alignParentRight="false" />
</RelativeLayout>
Thxを!
アイテムレイアウトに 'clickable'と' focusable'と 'focusableInTouchMode'を' false'に設定しようとします。しかし、あなたは 'OnListListener'を' OnListItemClick'ではなく子供に設定しましたか? –
スクロールするとどういう意味ですか?アイテムのスクロールやPTRへのスクロールListView全体を上下にスクロールしますか?お使いのデバイスのタッチハードウェアは大丈夫ですか?開発者のオプションでタッチ表示をオンにすると、デバイスが画面の下部にジェスチャーやタッチを捉えるかどうかを確認できます。 – Stan
私は指全体がリストの最初または2番目の項目にある場合にのみ、リスト全体をスコーリングすることが可能であることを意味しました。画面の真ん中でスクロールしようとすると動きません。 @Petrov Dmitrii:今すぐ試してみましょう。 –