rambler-digital-solutions / swipe-layout-android

Android UI widget
324 stars 68 forks source link

Center position not working in width match_parent #25

Open Bekakk opened 7 years ago

Bekakk commented 7 years ago

Hi I'm using your Repo and I have one problem Here is my Right menu xml source

 <LinearLayout
    android:id="@+id/right_view"
    android:layout_width="match_parent"
    android:layout_height="88dp"
    android:background="@drawable/gradient_edit"
    android:orientation="horizontal"
    app:bring_to_clamp="150dp"
    app:clamp="self"
    app:gravity="left"
    app:sticky="150dp"

    >

<LinearLayout
    android:background="@drawable/gradient_edit"
    android:id="@+id/left_menu_swipe"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:gravity="center"
    >

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="5dp"
        android:src="@mipmap/edit_white"/>
    <TextView
        android:id="@+id/u_edit_textView"
        android:text="Редктировать"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="1"
        android:singleLine="true"
        android:gravity="center"
        android:textColor="#ffffff"
        android:textSize="@dimen/u_common_text_size_small"
        />

</LinearLayout>
</LinearLayout>`

My Linear layout's elements witch is inside left menu does not showing center position when I use match_parent width and app:bring_to_clamp 150 dp sticky="150dp.Is it a possible to show center position in both situation ? My goal is to show center position in both situatian.Is it a possible to do like this with you source?

Thanks

EdSergeev commented 6 years ago

Hi, I'm not sure i'm understand your problem. Could you post the full layout and attach images with result please?