Skip to content

如果 swipe 为自适应wrap_content,高度不确定,如果让滑出的菜单高度跟随自适应高度呢? #7

Description

@TakeNotes2019

<cn.ljp.swipemenu.SwipeMenuLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipe_menu_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#e9e9e9"
app:isEnableLeftMenu="false"
app:isEnableSwipe="true"
app:isClickMenuAndClose="false"
app:isOpenChoke="true">

<RelativeLayout
    android:id="@+id/ll_item"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <!--也可以是复杂的item布局-->
	<TextView
	    android:id="@+id/tv_content"
	    android:layout_width="wrap_content"
	    android:layout_height="wrap_content"
	    android:gravity="center"/>
</RelativeLayout>

<TextView
    android:id="@+id/tv_menu1"
    android:layout_width="60dp"
    android:layout_height="match_parent"
    android:background="#fff"
	android:text="取消关注"/>

<TextView
    android:id="@+id/tv_menu2"
    android:layout_width="60dp"
    android:layout_height="match_parent"
    android:background="#f00"
    android:text="删除"/>

</cn.ljp.swipemenu.SwipeMenuLayout>
这样写,菜单并不能填满高度

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions