I have a main layout in which I am adding constraint layout as include tag. Here is my main layout.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/text1"
android:textAlignment="center"
android:textColor="@color/app_theme_primary"
android:textSize="@dimen/large_header_text_size" />
<TextView
android:id="@+id/version_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/version_number"
android:textAlignment="center"
android:textColor="@color/common_main_background"
android:textSize="@dimen/secondary_text_size"/>
<TextView
android:id="@+id/develop_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/padding_10dp"
android:gravity="center"
android:text="@string/developed_text"
android:textColor="@color/common_main_background"
android:textStyle="bold" />
<include layout="@layout/common_layout"/>
<TextView
android:id="@+id/trademarks"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:text="@string/trademarks"
android:textAlignment="center"
android:paddingTop="@dimen/multi_screen_small_padding"
android:textColor="@color/common_main_background"
android:textSize="@dimen/secondary_text_size" />
</LinearLayout>
My constraint layout which consists of Two imageViews as below
<android.support.constraint.ConstraintLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/logo1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@null"
android:paddingTop="@dimen/multi_screen_medium_padding"
android:paddingStart="@dimen/multi_screen_medium_padding"
android:paddingEnd="@dimen/multi_screen_medium_padding"
android:src="@drawable/logo1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintHorizontal_bias="0.0"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"/>
<ImageView
android:id="@+id/logo2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:contentDescription="@null"
android:src="@drawable/logo2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/logo1"
android:layout_marginTop="8dp"
app:layout_constraintDimensionRatio="w,1:1"/>
</android.support.constraint.ConstraintLayout>
My requirement are
1.Constraint layout should be fitted properly in main layout but here I facing problem is last textview (id:trademarks) not showing on screen since constraint layout occupied the screen till bottom of the screen.
2. Second image (logo2) should adjust appropriately as per screen size (small screen small bigger screens some what bigger).
Please help me how to do it? Thanks in advance.