Home>

Hello there is a problem there is a mainactivity with a design of 3 linearlayout tiles like that exampleHere is the code for this tile:

<LinearLayout
         android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
   android:gravity="center"
        android:background="#092E47"
        android:layout_marginLeft="2dp"
         android:layout_marginRight="2dp"
        >             <LinearLayout
         android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
   android:gravity="center"
        >             <image view
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_margin="5dp"
             android:src="@drawable/contact" />             </LinearLayout>             <LinearLayout
         android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
   android:gravity="center"
   android:orientation="vertical"
        >              <textview
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="title"
            android:textColor="#D0DFD7"
            android:textSize="18sp"
            android:typeface="normal" />         <textview
             android:layout_marginTop="3dp"
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="News"
            android:textColor="#D0DFD7"
            android:textSize="16sp"
            android:typeface="normal" />         </LinearLayout>     </LinearLayout>

I need to swipe news to the side

I need a swipe only on this linearlayout

Романыч2022-02-12 02:45:49
  • Answer # 1

    The question is a little unclear. If you need a swipe like in the Gmail app (well, with additional buttons on the tiles), then SwipeListView