标签: slidingpanelayout

在ViewPager中使用Android的SlidingPaneLayout

我正在尝试将SlidingPaneLayout与ViewPager一起使用,就像这样

<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.widget.SlidingPaneLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/scientific_graph_slidingPaneLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <!--
         The first child view becomes the left pane.
    -->

    <ListView
            android:id="@+id/left_pane"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:layout_gravity="left" />
    <!--
         The second child becomes the right (content) pane.
    -->

    <android.support.v4.view.ViewPager
            android:id="@+id/scientific_graph_viewPager"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
    </android.support.v4.view.ViewPager>

</android.support.v4.widget.SlidingPaneLayout>
Run Code Online (Sandbox Code Playgroud)

当我从左边缘拉出时,SlidingPaneLayout会滑动; 但是,当我从右边缘拉出时,我似乎无法让ViewPager滑动.当我从右边缘拉出时,它滑动很少,然后快速向后滑动.

这样做甚至可能吗?有一个更好的方法吗?

我发现通过向上移动手指向左移动,我可以滑动视图寻呼机.

android android-viewpager slidingpanelayout

10
推荐指数
2
解决办法
4973
查看次数

滑动覆盖面板,与bootstrap 3 css一起使用

我一直在寻找一个使用jquery的滑动覆盖面板,它不会破坏我的bootstrap 3 css文件.但我找不到任何东西.我需要一个类似于表单,下拉菜单,可选网格,输入框等的面板.我在此菜单面板上执行的任何操作都将自动刷新内容面板; 但在我的情况下,它并不是真正的"菜单",它只是一个滑动或弹出窗口,你可以填写.

我搜索过这个网站:

http://designhuntr.com/15-slide-panel-jquery-plugins/

没有一个人能给我我想要的东西.我需要一个左侧的滑动面板,填充表格(如bootstrap手风琴,select2下拉).

第一个链接给出了我想要的内容,但渲染我的bootstrap css的内容却陷入了严重的冲突并且变得毫无用处.

我能找到的最完美的例子就在这里:

http://demos.jquerymobile.com/1.3.0-beta.1/docs/panels/#

单击叠加按钮时; 它在功能方面完全符合我的要求.

但是使用这个库也与bootstrap冲突.我尝试了5个不同的库,都以失败告终.似乎这样一个简单的想法本来可以有某种余地.

如果有人取得任何成功,我很乐意听到.否则我在这一点上都没有选择.

[编辑2014年6月17日]对我来说,一个重要的要求就是让一个保持静止的按钮,它不随滑动面板移动.每次用户滑出面板时,我都不希望用户移动按钮.我还需要为ie7 +存在此功能.我想要更多地控制什么是移动,想要滑动,效果,一切.不是完全100%完全幻灯片.

jquery twitter-bootstrap slidingpanelayout

9
推荐指数
1
解决办法
5万
查看次数

从右侧使用SlidingPaneLayout?

是否有可能以某种方式使用Android的SlidingPaneLayout完成它所做的事情,除了从另一边?

即我想要在屏幕右侧滑动挡板而不是左侧以露出第二个窗格,它从右侧而不是左侧滑入.

理想情况下,我正在寻找一种方法来使用此布局或对其进行修改.

android slide swipe slidingpanelayout

8
推荐指数
1
解决办法
3317
查看次数

SlidingPaneLayout - 如何始终显示滑出视图的一小部分(如在环聊中)

我正在使用一个简单的SlidingPaneLayout,我想要的是:

我想,一点点滑出视图总是可见的,这样用户总能看到,有一些东西可以拉出来......就像在环聊中一样.

这有可能吗?

android slidingpanelayout

7
推荐指数
1
解决办法
2498
查看次数

如何在面板外单击时隐藏Umano SlidingupPanel

AndroidSlidingUpPanel

在这里,我使用的是滑动面板库.您可以在以下屏幕中看到面板和列表视图.我想要做的是隐藏面板,如果我在面板外面点击(昏暗区域).而是点击上面布局中的列表视图.我怎样才能实现这一目标?

在此输入图像描述

这是XML,

 <?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/com.voucher.point.activity"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical" >

<!-- sothree:dragView="@+id/dragView" -->

<com.sothree.slidinguppanel.SlidingUpPanelLayout
    xmlns:sothree="http://schemas.android.com/apk/res-auto"
    android:id="@+id/sliding_layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="bottom"
    app:fadeColor="@color/transparent"
    sothree:panelHeight="40dip"
    sothree:paralaxOffset="200dp" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/white"
        android:orientation="vertical" >

        <ListView
            android:id="@+id/offersList"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:scrollbars="none"
            android:visibility="gone" >
        </ListView>

    </LinearLayout>

    <include
        android:id="@+id/bottom_menu"
        android:layout_width="fill_parent"
        android:layout_height="270dip"
        layout="@layout/side_menu" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
Run Code Online (Sandbox Code Playgroud)

我可以这样做吗?

android android-sliding slidingpanelayout

7
推荐指数
2
解决办法
7839
查看次数

如何在展开时限制AndroidSlidingUpPanel的高度

我正在定义锚点,它工作正常,但我需要在扩展时控制SlidingUpPanelLayout的最大高度.

我怎样才能做到这一点?

android android-sliding slidingpanelayout

6
推荐指数
1
解决办法
2413
查看次数

Android,SlidingPaneLayout和listView

ListView在我的SlidingPaneLayout主视图中使用了一个辅助视图.主视图是一个地图片段.该ListView充当菜单.问题是onItemClickedListener永远不会在ListView上调用.即使列表行也不会在出版时突出显示.似乎ListView无法获得焦点.

编辑:实际上,slidingPaneLayout.findFocus()显示android.widget.ListView.单击列表项仍然没有运气.

这是我的xml

<com.ziz.luke.custom_components.MySlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/slidingpanelayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ListView
        android:id="@+id/contactsList"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="#00000000" >
    </ListView>

    <TextView
        android:id="@+id/android:empty"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal|center_vertical"
        android:text="@string/noContacts" />
</RelativeLayout>

<fragment
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment" />
</com.ziz.luke.custom_components.MySlidingPaneLayout>
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个?

android listview android-listview slidingpanelayout

5
推荐指数
1
解决办法
3999
查看次数

单击SlidingPaneLayout上的事件

我正在尝试使用SlidingPaneLayout.左视图是ListFragment,右视图是详细视图.布局正确显示,我可以滑动它.但是如果详细视图位于列表前面并单击它,则后台列表会收到单击.

我的布局看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SlidingPaneLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/sliding_pane_layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <fragment android:name="net.name.multiremote.RemoteListFragement"
              android:id="@+id/fragment_remote_list"
              android:layout_width="580dp"
              android:layout_height="match_parent"
              android:layout_gravity="left" />

    <fragment
        android:id="@+id/fragment_remote"
        android:name="net.name.multiremote.RemoteFragment"
        android:layout_width="850dp"
        android:layout_height="match_parent" 
        android:layout_weight="1" />

</android.support.v4.widget.SlidingPaneLayout>
Run Code Online (Sandbox Code Playgroud)

我使用此代码在ListFragment中设置单击侦听器

@Override
public void onListItemClick(ListView list, View view, int position, long id) {
    iItemClickListener.onListFragmentItemClick(view, position);
}
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

android android-layout slidingpanelayout

5
推荐指数
1
解决办法
1980
查看次数

向上滑动面板 - google mapfragment下的细线滑动面板

我使用这个存储库制作了slidinguppanel https://github.com/dlukashev/AndroidSlidingUpPanel-foursquare-map-demo

但是,它包含一个未在任何地方覆盖的错误.

当我触摸任何地方扩展面板(listview)效果很好,但是当我试图通过按住列表视图的顶部(屏幕2上的蓝线)来展开它时,面板隐藏在地图下(framelayout)(screen3)

怎么有可能这个蓝线隐藏面板在mapfragment和listview的其余部分扩展得很好?

有什么想法吗?请给我一个提示如何修复它?

请看屏幕:

http://i.stack.imgur.com/G88Ok.jpg

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <org.sothree.slidinguppanel.SlidingUpPanelLayout
        android:id="@+id/slidingLayout"
        android:gravity="bottom"
        app:shadowHeight="0dp"
        app:paralaxOffset="@dimen/paralax_offset"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

        <FrameLayout
            android:gravity="top"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_below="@+id/button">

            <RelativeLayout
                android:id="@+id/mapContainer"
                android:layout_width="fill_parent"
                android:layout_height="497dp"/>
        </FrameLayout>

        <RelativeLayout
            android:id="@+id/slidingContainer"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_below="@+id/button">

            <View
                android:id="@+id/transparentView"
                android:visibility="gone"
                android:layout_width="fill_parent"
                android:layout_height="@dimen/map_height"
                android:layout_alignParentTop="true"/>

            <ListView
                android:id="@+id/listView1"
                android:cacheColorHint="@android:color/white"
                android:drawSelectorOnTop="true"
                android:dividerHeight="@dimen/divider_height"
                android:divider="@android:color/darker_gray"
                android:background="@android:color/transparent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_below="@id/transparentView"
                android:smoothScrollbar="true"
                android:layout_marginTop="0dp"/>

        </RelativeLayout>

    </org.sothree.slidinguppanel.SlidingUpPanelLayout>

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

android slidingmenu slidingpanelayout android-framelayout

5
推荐指数
1
解决办法
2365
查看次数

关于com.sothree.slidinguppanel.SlidingUpPanelLayout

当我使用时SlidingUpPanelLayout,我必须设置两个子布局(主面板和面板).当第二个布局(面板)打开时,我想用a关闭它Button.但我找不到方法.

方法是什么?

android slidingpanelayout

4
推荐指数
1
解决办法
5265
查看次数