Layout and Views App Visibility

I tested the Android application on the device, allowing you to set the display boundaries of the device in the developer options on the device.
I check my list with a puffy view with text images, a rating bar and other views that are clearly visible, as shown below.enter image description here

later I tried the twitter app, but was surprised to see only one view ???

enter image description here

Does anyone know how to get twitter as a separate view in a list?

+4
source share
2 answers

Does anyone know how to get twitter as a separate view in a list?

View, ViewGroup . , Canvas onDraw(), ImageView TextView. , Drawable.draw() Canvas.drawBitmap(), Layout.

, , onTouchEvent() / , .

: 30- , : https://gist.github.com/devunwired/8704007

enter image description here

+2

, include

, list_row_item :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <include layout="@layout/another_layout"/>


</LinearLayout>

, " ", , , ,

-1

Source: https://habr.com/ru/post/1524410/


All Articles