名前が示すように、レイアウトに問題があります。
私のレイアウトを構築するために gridlayout を使用しています。そして、重力とパディングを使用して(少なくとも試して)「レスポンシブ」にします。
問題は、満たされた右のセルでこれを行うと、セルが画面からはみ出し、画面の端で止まらないことです。
これが私のXMLコードです。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:facebook="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".InitActivit">
<!-- The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc. -->
<!-- This FrameLayout insets its children based on system windows using
android:fitsSystemWindows. -->
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="#162229"
android:backgroundTintMode="src_over">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent">
<GridLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/gridLayout"
android:layout_marginLeft="0dp"
android:layout_marginBottom="0dp"
android:layout_below="@+id/textView">
<ImageView
android:layout_width="match_parent"
android:layout_height="130dp"
android:id="@+id/imageView3"
android:layout_row="0"
android:layout_column="0"
android:src="@drawable/wallpapermain"
android:layout_gravity="top"
android:cropToPadding="false"
android:scaleType="fitXY"
android:layout_columnSpan="3" />
<com.facebook.widget.ProfilePictureView
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_row="1"
android:layout_column="0"
android:layout_gravity="top"
android:background="@drawable/line"
android:id="@+id/selection_profile_pic"
android:gravity="center_horizontal"
facebook:preset_size="small"
android:layout_rowSpan="2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="22dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Howdy!"
android:id="@+id/howdyString"
android:layout_row="1"
android:layout_column="1"
android:textColor="#fff"
android:paddingTop="5dp"
android:layout_gravity="left"
android:paddingLeft="5dp"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Small Text"
android:id="@+id/grouplable"
android:layout_row="1"
android:layout_column="2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="38dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Bart"
android:id="@+id/nameString"
android:layout_row="2"
android:layout_column="1"
android:textColor="#fff"
android:paddingTop="5dp"
android:textSize="26dp"
android:layout_gravity="left|top"
android:background="@drawable/line"
android:paddingLeft="5dp"
android:paddingBottom="0dp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="38dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/amount"
android:layout_row="2"
android:layout_column="2"
android:background="@drawable/line"
android:layout_gravity="top" />
</GridLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Spee Bee"
android:id="@+id/textView"
android:gravity="center"
android:textColor="#fff"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageButton
android:layout_width="60dp"
android:layout_height="wrap_content"
android:id="@+id/imageButton"
android:layout_alignParentTop="true"
android:layout_above="@+id/gridLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/left_arrow"
android:background="#162229" />
</RelativeLayout>
</FrameLayout>
また、すべてのセルを画面の幅全体に接続しようとしています。これは、「line.xml」の下枠によるものです。
現時点ではこんな感じ