Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么两边view加了margin,会导致左侧滑出的view比右侧滑出的view要小 #67

Open
LinTaoAndroid opened this issue Mar 8, 2022 · 0 comments

Comments

@LinTaoAndroid
Copy link

LinTaoAndroid commented Mar 8, 2022

<com.demo.widget.SwipeMenuLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentView="@+id/contentView"
app:leftMenuView="@+id/leftView"
app:rightMenuView="@+id/rightView">

<LinearLayout
    android:id="@+id/leftView"
    android:layout_width="160dp"
    android:layout_height="match_parent"
    android:layout_marginRight="10dp"
    android:background="@drawable/notification_open_shape"
    android:gravity="center">

    <TextView
        android:id="@+id/leftTextView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:gravity="center"
        android:text="@string/okay_notification_open"
        android:textColor="@color/panel_notification_open_text_color"
        android:textSize="18sp" />

</LinearLayout>

<LinearLayout
    android:id="@+id/contentView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/notification_row_background" />

<LinearLayout
    android:id="@+id/rightView"
    android:layout_width="160dp"
    android:layout_height="match_parent"
    android:layout_marginLeft="10dp"
    android:background="@drawable/notification_delete_shape"
    android:gravity="center">

    <TextView
        android:id="@+id/rightTextView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:gravity="center"
        android:text="@string/keyguard_password_delete"
        android:textColor="@color/panel_notification_open_text_color"
        android:textSize="18sp" />

</LinearLayout>

</com.demo.widget.SwipeMenuLayout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant