2016-06-21 3 views
0

SwypeRefreshLayoutListViewを使用し、スクロールするのは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を!

+0

アイテムレイアウトに 'clickable'と' focusable'と 'focusableInTouchMode'を' false'に設定しようとします。しかし、あなたは 'OnListListener'を' OnListItemClick'ではなく子供に設定しましたか? –

+0

スクロールするとどういう意味ですか?アイテムのスクロールやPTRへのスクロールListView全体を上下にスクロールしますか?お使いのデバイスのタッチハードウェアは大丈夫​​ですか?開発者のオプションでタッチ表示をオンにすると、デバイスが画面の下部にジェスチャーやタッチを捉えるかどうかを確認できます。 – Stan

+0

私は指全体がリストの最初または2番目の項目にある場合にのみ、リスト全体をスコーリングすることが可能であることを意味しました。画面の真ん中でスクロールしようとすると動きません。 @Petrov Dmitrii:今すぐ試してみましょう。 –

答えて

0

奇妙ですが、1行のコードを削除すると解決しました。
"ShowFragment" - メソッドでアニメーションを削除しました。

var trans = fragmentManager.BeginTransaction(); 
// animation 
//trans.SetCustomAnimations(Resource.Animation.slide_down, Resource.Animation.slide_up); 
関連する問題