Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/393.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 触摸列表视图右侧时,我无法滚动列表视图_Java_Android_Xml - Fatal编程技术网

Java 触摸列表视图右侧时,我无法滚动列表视图

Java 触摸列表视图右侧时,我无法滚动列表视图,java,android,xml,Java,Android,Xml,这里是我的第一个列表,应该插入到主布局中 <FrameLayout 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" and

这里是我的第一个列表,应该插入到主布局中

<FrameLayout 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:layout_alignParentRight="true"
    android:clickable="true"
    android:descendantFocusability="blocksDescendants"
    tools:context="in.bitbluetech.pabulum.customer.homepage.CategoryItemsFragment">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center">

        <!--       <ProgressBar
                    android:id="@+id/pbCategoryItemProgressBar"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    style="@android:style/Widget.ProgressBar.Large" />-->

        <com.github.rahatarmanahmed.cpv.CircularProgressView xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/pbCategoryItemProgressBar"
            android:layout_width="60dp"
            android:layout_height="60dp"
            app:cpv_animAutostart="true"
            app:cpv_indeterminate="true" />

        <!-- <com.rey.material.widget.ProgressView
            android:id="@+id/pbCategoryItemProgressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
             app:pv_autostart = "false"
             app:pv_circular="true"
             app:pv_progressStyle="@style/InOutColorsCircularProgressDrawableStyle"
             app:pv_progressMode="indeterminate" />-->

    </LinearLayout>

    <ListView
        android:id="@+id/elvCategoryItems"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="150dp"
        android:layout_marginRight="10dp"
        android:clickable="true"
        android:dividerHeight="5dp" />
    <!--android:indicatorLeft="?android:expandableListPreferredItemIndicatorLeft"-->
</FrameLayout>

这里是我的第二个布局应该插入到主布局

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/flCategory"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:descendantFocusability="blocksDescendants"
    tools:context="in.bitbluetech.pabulum.customer.homepage.CategoryListFragment">
    <!--android:background="@drawable/whitebgblur"-->

    <LinearLayout
        android:layout_width="250dp"
        android:layout_height="500dp"
        android:layout_marginBottom="50dp"
        android:layout_marginTop="50dp">

        <ListView
            android:id="@+id/lvCategoryList"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:choiceMode="singleChoice"
            android:dividerHeight="10dp"
            android:scrollbars="vertical" />
    </LinearLayout>
</FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/flames"
    tools:context="in.bitbluetech.pabulum.customer.CategoryItemScreen.cust_category_item_screen">

    <LinearLayout
        android:id="@+id/toolbarLayout"
        android:layout_width="wrap_content"
        android:layout_height="120dp"
        android:orientation="vertical">

        <include
            android:id="@+id/categoryitemscreenToolbar"
            layout="@layout/categoryitemscreentoolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <actionscontentview.ActionsContentView xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/actionsContentView"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_below="@+id/toolbarLayout"
        app:actions_layout="@layout/action"
        app:actions_spacing="@dimen/actions_spacing"
        app:content_layout="@layout/fragment_categorygrid"
        app:fade_max_value="@integer/default_actionscontentview_fade_max_value"
        app:fade_type="none"
        app:fling_duration="@integer/default_actionscontentview_fling_duration" />



    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignTop="@+id/actionsContentView"
        android:layout_marginLeft="110dp"
        android:layout_marginStart="110dp"
        android:layout_marginTop="75dp"
        android:background="@android:color/transparent"
        android:textSize="20sp" />
</RelativeLayout>

这里是我的主布局应该插入到主布局

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/flCategory"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:descendantFocusability="blocksDescendants"
    tools:context="in.bitbluetech.pabulum.customer.homepage.CategoryListFragment">
    <!--android:background="@drawable/whitebgblur"-->

    <LinearLayout
        android:layout_width="250dp"
        android:layout_height="500dp"
        android:layout_marginBottom="50dp"
        android:layout_marginTop="50dp">

        <ListView
            android:id="@+id/lvCategoryList"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:choiceMode="singleChoice"
            android:dividerHeight="10dp"
            android:scrollbars="vertical" />
    </LinearLayout>
</FrameLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/flames"
    tools:context="in.bitbluetech.pabulum.customer.CategoryItemScreen.cust_category_item_screen">

    <LinearLayout
        android:id="@+id/toolbarLayout"
        android:layout_width="wrap_content"
        android:layout_height="120dp"
        android:orientation="vertical">

        <include
            android:id="@+id/categoryitemscreenToolbar"
            layout="@layout/categoryitemscreentoolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <actionscontentview.ActionsContentView xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/actionsContentView"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_below="@+id/toolbarLayout"
        app:actions_layout="@layout/action"
        app:actions_spacing="@dimen/actions_spacing"
        app:content_layout="@layout/fragment_categorygrid"
        app:fade_max_value="@integer/default_actionscontentview_fade_max_value"
        app:fade_type="none"
        app:fling_duration="@integer/default_actionscontentview_fling_duration" />



    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignTop="@+id/actionsContentView"
        android:layout_marginLeft="110dp"
        android:layout_marginStart="110dp"
        android:layout_marginTop="75dp"
        android:background="@android:color/transparent"
        android:textSize="20sp" />
</RelativeLayout>

问题是,当我触摸ListView的右侧时,我的第二个布局并没有旋转,但当我在列表视图的中心或左侧滑动时,它正确旋转。但大多数情况下,当我旋转ListView时,它会造成滞后问题