How to show image in the place of creating message in androidX..? - android

I am creating an offlline SMS app.In that I have to place the option of selecting an image button and after selecting image I want to place it at the position of sending image.But do not understand how to adjust the imageView button to get desired layout.Someone can help me..?
I have searched a lot but found nothing.
XML FILE
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:padding="5dp"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="horizontal" tools:ignore="MissingConstraints" android:id="#+id/linearLayout">
<ImageView
android:id="#+id/inbox_thumb"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="#drawable/circle"/>
<TextView
android:hint="Phone Number"
android:layout_width="5dp"
android:layout_marginTop="6dp"
android:padding="10dp"
android:textStyle="bold"
android:textSize="15dp"
android:gravity="left"
android:layout_height="wrap_content" android:id="#+id/phone" android:layout_weight="1"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView android:layout_width="384dp"
android:layout_height="661dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:id="#+id/reyclerview_message_list"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#+id/linearLayout">
</androidx.recyclerview.widget.RecyclerView>
<View android:layout_width="0dp"
android:layout_height="2dp"
tools:ignore="MissingConstraints"
android:background="#color/colorPrimaryDark"
android:layout_marginBottom="0dp"
app:layout_constraintBottom_toTopOf="#+id/message_area"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
</View>
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content"
android:id="#+id/message_area"
android:orientation="horizontal"
android:minHeight="48dp"
android:background="#ffffff"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
tools:ignore="MissingConstraints">
<Button
android:text="attach img"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="#+id/btn1"
/>
<EditText
android:id="#+id/txtMessage"
android:hint="Enter message"
android:background="#android:color/transparent"
android:layout_gravity="center"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:maxLines="6"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content" app:srcCompat="#mipmap/ic_launcher" android:id="#+id/imageView2"
android:layout_weight="1"/>
<Button
android:id="#+id/btnSend"
android:text="SEND"
android:textSize="14dp"
android:clickable="true"
android:layout_width="64dp"
android:layout_height="48dp"
android:gravity="center"
android:layout_gravity="bottom" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Expected
Actual

I have created a basic template using your Layout in AndroidX. You can beautify it using your style, icons and colors accordingly. Please copy it and look at it in your Android Studio.
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="horizontal"
android:padding="5dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:id="#+id/inbox_thumb"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="#drawable/ic_launcher" />
<androidx.appcompat.widget.AppCompatTextView
android:id="#+id/phone"
android:layout_width="5dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_weight="1"
android:gravity="left"
android:hint="Phone Number"
android:padding="10dp"
android:textSize="15dp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="#+id/message_area"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="#drawable/rounded_rect_shape"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<androidx.appcompat.widget.AppCompatImageButton
android:id="#+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:src="#drawable/ic_launcher" />
<androidx.cardview.widget.CardView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardBackgroundColor="#android:color/darker_gray"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="#mipmap/ic_launcher" />
<androidx.appcompat.widget.AppCompatEditText
android:id="#+id/txtMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="#android:color/transparent"
android:hint="Enter message"
android:maxLines="6" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.appcompat.widget.AppCompatButton
android:id="#+id/btnSend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="center"
android:text="SEND"
android:textSize="14dp" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="2dp"
android:layout_marginBottom="0dp"
android:background="#color/colorPrimaryDark"
app:layout_constraintBottom_toTopOf="#+id/message_area"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"/>
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/reyclerview_message_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:scrollbarAlwaysDrawVerticalTrack="true"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="#id/message_area"
app:layout_constraintTop_toBottomOf="#+id/linearLayout"/>

If I understand correctly, you're trying to place the "imageView2" ImageView on top of the "txtMessage" EditText, is that right?
If that's how it is, what you need to do is wrap both of them in a vertical LinearLayout, like so:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText
android:id="#+id/txtMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:background="#android:color/transparent"
android:hint="Enter message"
android:maxLines="6" />
<ImageView
android:id="#+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
app:srcCompat="#mipmap/ic_launcher" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom"
android:orientation="horizontal"
android:padding="8dp">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/circle_drawable"
android:backgroundTint="#android:color/black"
android:padding="8dp"
android:layout_margin="8dp"
android:src="#drawable/ic_add_black_24dp"
android:tint="#android:color/white" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="#android:color/darker_gray"
app:cardCornerRadius="6dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:src="#mipmap/ic_launcher" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="bottom"
android:weightSum="1">
<EditText
android:id="#+id/et1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="#+id/ib2"
android:layout_margin="8dp"
android:text="Hello" />
<ImageButton
android:id="#+id/ib2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#drawable/circle_drawable"
android:backgroundTint="#android:color/black"
android:padding="8dp"
android:layout_margin="8dp"
android:layout_alignParentEnd="true"
android:src="#drawable/ic_send_black_24dp"
android:tint="#android:color/white" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
I have used background drawable, you can replace with your add and send image.
Hope it solves your problem.

Related

Android: The bottom navigation view is blocking out part of my content in my ScrollView

The problem I have is that the bottom navigation bar is blocking the bottom part of my content in the ScrollView. I have tried to change the android:layout_height of the ScrollView to wrap_content instead of match_parent and it did resolve that issue, but it presented me with another. Now, the top part of my ScrollView is cut off from the display. Is there anyway to resolve both? I am using constraint layout as my parent layout of the activity.
Below is my xml code of the activity.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="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=".MainActivity"
android:orientation="vertical"
android:background="#color/colorBackground">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="#+id/dash_bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:backgroundTint="#color/colorWhite"
app:menu="#menu/menu_bottom_navigation"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="#+id/dash_bottomNavigation"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
tools:layout_editor_absoluteX="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="#+id/dash_headerImg"
android:layout_width="match_parent"
android:layout_height="260dp"
android:contentDescription="#string/app_name"
android:scaleType="centerCrop"
android:src="#drawable/header_background"
app:layout_constraintTop_toTopOf="parent"/>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#40000000"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="#id/dash_headerImg"/>
<ImageView
android:id="#+id/dash_ic_menu"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginTop="16dp"
android:layout_marginStart="18dp"
android:contentDescription="#string/app_name"
android:src="#drawable/dashboard_ic_menu"
android:background="#drawable/dashboard_menu_background"
android:padding="7dp"
android:tint="#color/colorWhite"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="#+id/dash_welcomeText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Welcome back!"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:textColor="#color/colorWhite"
android:textSize="23sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="#+id/dash_ic_menu"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:background="#drawable/searchbar_background"
android:gravity="center_vertical"
android:padding="4dp"
app:layout_constraintTop_toBottomOf="#+id/dash_welcomeText">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="10dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="6dp"
android:contentDescription="#string/app_name"
android:src="#drawable/ic_search_black_24dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="10dp"
android:background="#null"
android:gravity="center_vertical"
android:imeOptions="actionSearch"
android:inputType="text"
tools:ignore="Autofill"
android:textColor="#color/colorPrimaryText"
android:textSize="18sp"
android:hint="Search"/>
</LinearLayout>
<View
android:id="#+id/dash_viewSupporter"
android:layout_width="1dp"
android:layout_height="1dp"
android:layout_marginBottom="50dp"
app:layout_constraintBottom_toBottomOf="#+id/dash_headerImg"
app:layout_constraintStart_toStartOf="parent"/>
<androidx.cardview.widget.CardView
android:id="#+id/dash_runTrackerCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="#color/colorWhite"
app:cardCornerRadius="8dp"
app:layout_constraintEnd_toStartOf="#+id/dash_calorieTrackerCard"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/dash_viewSupporter">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="15dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:scaleX="0.7"
android:scaleY="0.7"
android:contentDescription="#string/app_name"
android:src="#drawable/run"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Run tracker"
android:textColor="#color/colorPrimaryText"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/dash_calorieTrackerCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="25dp"
android:layout_marginStart="10dp"
app:cardBackgroundColor="#color/colorWhite"
app:cardCornerRadius="8dp"
app:layout_constraintStart_toEndOf="#+id/dash_runTrackerCard"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="#+id/dash_viewSupporter">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="15dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:scaleX="0.7"
android:scaleY="0.7"
android:contentDescription="#string/app_name"
android:src="#drawable/calorie_tracker"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Calorie tracker"
android:textColor="#color/colorPrimaryText"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/dash_meditationCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="25dp"
android:layout_marginBottom="25dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="#color/colorWhite"
app:cardCornerRadius="8dp"
app:layout_constraintVertical_bias="0"
app:layout_constraintEnd_toStartOf="#+id/dash_dietCard"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/dash_runTrackerCard">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="15dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:contentDescription="#string/app_name"
android:scaleX="0.7"
android:scaleY="0.7"
android:src="#drawable/yoga" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Meditation"
android:textColor="#color/colorPrimaryText"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/dash_dietCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:layout_marginEnd="25dp"
android:layout_marginStart="10dp"
app:cardBackgroundColor="#color/colorWhite"
app:cardCornerRadius="8dp"
app:layout_constraintVertical_bias="0"
app:layout_constraintStart_toEndOf="#+id/dash_meditationCard"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="#+id/dash_calorieTrackerCard">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="15dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:scaleX="0.7"
android:scaleY="0.7"
android:contentDescription="#string/app_name"
android:src="#drawable/diet"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Diet"
android:textColor="#color/colorPrimaryText"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<RelativeLayout
android:id="#+id/dash_fitnessView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="#+id/dash_meditationCard"
app:layout_constraintBottom_toBottomOf="parent"
android:background="#color/banner_background_light">
<LinearLayout
android:id="#+id/dash_fitnessBannerLayout"
android:layout_width="170dp"
android:layout_height="280dp"
android:layout_margin="10dp"
android:background="#color/banner_background"
android:orientation="vertical">
<TextView
android:id="#+id/dash_fitnessViewAllText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:text="View all" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="50dp"
android:text="Fitness LifeStyle"
android:textAllCaps="true"
android:textColor="#011a27"
android:textSize="25sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="Embark on your fitness journey now" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:paddingLeft="10dp"
android:text="From: bornfitness.com" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/dash_fitnessRecycler"
android:layout_width="match_parent"
android:layout_height="280dp"
android:layout_toEndOf="#+id/dash_fitnessBannerLayout"
android:background="#fcfdfe" />
<ProgressBar
android:id="#+id/dash_fitnessProgressBar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="10dp"
android:layout_toEndOf="#+id/dash_fitnessBannerLayout"
android:indeterminate="true"
android:visibility="gone" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
Screenshot of my design view of the activity:
Just make android:layout_height="0dp" in Scrollview.
And Please use NestedScrollView if you have Recyclerview inside Scoll
your Scrollview like this :
<ScrollView
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="#+id/dash_bottomNavigation"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0"
tools:layout_editor_absoluteX="2dp">
</ScrollView>

Android Different screen size

I made a simple Home dashboard, how do I make it adapt to the various sizes? do I have to create the same activity multiple times and adapt the content or is there another way?
resource
main
Instead of Linear Layout use Constraint Layout, And also check your layout in landscape mode if layout if not fit according to your requirements, make different arrangement for views in landscape mode too.
https://developer.android.com/training/multiscreen/screensizes
this is the modified file (if anyone can use it)
enter image description here
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/ll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fcfcfc"
android:gravity="center"
tools:context="com.example.homedashboard.MainActivity">
<androidx.cardview.widget.CardView
android:id="#+id/bank_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="46dp"
android:layout_marginLeft="46dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="#+id/add_card"
app:layout_constraintEnd_toStartOf="#+id/ideas_card"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:background="#drawable/cerclebackgroundpurple"
android:padding="10dp"
android:src="#drawable/ic_attach_money_black_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Banking"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#color/lightgray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:text="Check your bank activities"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/ideas_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="25dp"
android:layout_marginRight="25dp"
android:layout_marginBottom="20dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="#+id/links_card"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="#+id/bank_card"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:background="#drawable/cerclebackgroundpink"
android:padding="10dp"
android:src="#drawable/ic_lightbulb_outline_black_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Ideas"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#color/lightgray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:text="Check your bank activities"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/add_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="46dp"
android:layout_marginLeft="46dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="16dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="#+id/wifi_card"
app:layout_constraintEnd_toStartOf="#+id/links_card"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#+id/bank_card">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:background="#drawable/cerclebackgroundgreen"
android:padding="10dp"
android:src="#drawable/ic_control_point_black_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Add"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#color/lightgray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:text="Check your bank activities"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/links_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginEnd="25dp"
android:layout_marginRight="25dp"
android:layout_marginBottom="16dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toTopOf="#+id/wifi_card"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="#+id/add_card"
app:layout_constraintTop_toBottomOf="#+id/ideas_card">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:background="#drawable/cerclebackgroundyello"
android:padding="10dp"
android:src="#drawable/ic_attach_file_black_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Links"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#color/lightgray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:text="Check your bank activities"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="#+id/wifi_card"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginBottom="7dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="#+id/links_card"
app:layout_constraintStart_toStartOf="#+id/add_card"
app:layout_constraintTop_toBottomOf="#+id/add_card">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="64dp"
android:layout_height="64dp"
android:background="#drawable/cerclebackgroundpurple"
android:padding="10dp"
android:src="#drawable/ic_wifi_black_24dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="Wifi"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="10dp"
android:background="#color/lightgray" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="5dp"
android:text="Check your bank activities"
android:textColor="#android:color/darker_gray" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>

how do I make my edit texts appear above the keyboad

there have been similar questions like this but none of them worked for me, so here my register layout :
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="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=".RegisterActivity">
<ImageView
android:id="#+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="#drawable/signin_page_background" />
<LinearLayout
android:id="#+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="45dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="#+id/retour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
android:onClick="goback"
android:padding="15dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="#drawable/baseline_arrow_back_ios_24"
android:tint="#191919" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Retour"
android:textColor="#191919"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<com.github.captain_miao.optroundcardview.OptRoundCardView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:optRoundCardCornerRadius="50dp"
app:optRoundCardElevation="0dp"
app:optRoundCardLeftBottomCorner="false"
app:optRoundCardLeftTopCorner="true"
app:optRoundCardRightBottomCorner="false"
app:optRoundCardRightTopCorner="true"
app:layout_constraintTop_toBottomOf="#+id/linearLayout"
android:windowSoftInputMode="adjustPan"
>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:keyboardNavigationCluster="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:text="#string/inscrivez"
android:textColor="#191919"
android:textSize="25dp"
android:textStyle="bold" />
<EditText
android:id="#+id/username_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:background="#android:color/transparent"
android:drawableEnd="#drawable/user_icon"
android:drawableTint="#696969"
android:hint="#string/username"
android:padding="15dp"
android:textColor="#191919"
android:textColorHint="#696969"
android:textStyle="bold" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="#696969" />
<EditText
android:id="#+id/email_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:background="#android:color/transparent"
android:drawableEnd="#drawable/email_icon"
android:drawableTint="#696969"
android:hint="E-mail"
android:inputType="textEmailAddress"
android:padding="15dp"
android:textColor="#191919"
android:textColorHint="#696969"
android:textStyle="bold" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="#696969" />
<EditText
android:id="#+id/pw_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:background="#android:color/transparent"
android:drawableEnd="#drawable/pasword_icon"
android:drawableTint="#696969"
android:hint="#string/password"
android:inputType="textPassword"
android:padding="15dp"
android:textColor="#191919"
android:textColorHint="#696969"
android:textStyle="bold" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="#696969" />
<Button
android:id="#+id/btn_signup"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="50dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="50dp"
android:layout_marginBottom="80dp"
android:background="#drawable/btn_signin"
android:text="#string/insc_btn"
android:textAllCaps="false"
android:textColor="#android:color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
</com.github.captain_miao.optroundcardview.OptRoundCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
whenever the screan is small, and when the user types the passwor and the keyboard hides the editText.
if anyone can correct my xml to make the editText appear above the keybord whenever the user is typing
Use ScrollView as Root layout.

How to align horizontal line in layout exactly to image

So I have this activity What I want to do is to align the separator line and background image. What i do so far is just margin the whole layout with specific height but that is definitely not a solution since on new device they aren't aligned anymore. The whole problem is that the separator line is in layout. To avoid misunderstandings here is the line and image i want to align here. And here is the code
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitStart"
android:src="#drawable/main_background" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_marginTop="110dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:background="#drawable/mainborder"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="#+id/user_name"
style="#style/HeaderText"
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:text="#string/welcome" />
<include layout="#layout/separator_line_smaller_margin" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp">
<include layout="#layout/slider" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_gravity="bottom"
android:orientation="horizontal"
android:paddingBottom="10dp"
android:paddingLeft="15dp">
<LinearLayout
android:layout_width="203dp"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
style="#style/Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="4dp"
android:text="#string/profileInfo" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="bottom">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:fontFamily="sans-serif-medium"
android:gravity="start"
android:lineSpacingExtra="6sp"
android:onClick="goToProfile"
android:text="#string/myProfile"
android:textAlignment="textStart"
android:textColor="#4ED1AD"
android:textSize="14sp"
android:textStyle="normal" />
</LinearLayout>
</LinearLayout>
<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:src="#drawable/face" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="#drawable/mainborder"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.105">
<TextView
style="#style/HeaderText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:text="#string/comingViews"
android:textSize="25sp" />
<include layout="#layout/separator_line_smaller_margin" />
<LinearLayout
style="#style/DoctorsLayouts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="49dp"
android:layout_height="match_parent"
android:src="#drawable/face" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#mipmap/ic_data_range" />
<TextView
style="#style/Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center|left"
android:paddingLeft="5dp"
android:text="22.01.2018г. 9:00 часа"
tools:layout_editor_absoluteX="65dp"
tools:layout_editor_absoluteY="261dp" />
</LinearLayout>
<TextView
style="#style/Doctors"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingLeft="3dp"
android:text="Др. Хаус"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
style="#style/LayoutPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:orientation="vertical">
<TextView
style="#style/SecondHeaderText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="#string/HowDoesItWork" />
<TextView
style="#style/Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="#string/dummyText" />
</LinearLayout>
<LinearLayout
style="#style/LayoutPadding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#android:color/transparent"
android:text="#string/Help"
android:textColor="#4ED1AD"
android:textSize="17sp" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

How do I place one relative layout below another in a constraint layout?

I am looking at placing one relativelayout right below another in constraint layout and another button container overlaying the container at the bottom. How do I go about it?
Here's the code :
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="#+id/activeSpeakerContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="#+id/groupCallerList"
app:layout_constraintTop_toBottomOf="#+id/callStatusContainer"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<FrameLayout
android:id="#+id/activeSpeakerVideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/black" />
<ImageView
android:id="#+id/activeSpeakerImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="48dp"
android:src="#drawable/call_default_profile" />
<ImageView
android:id="#+id/beta_calling_watermark"
android:layout_width="130dp"
android:layout_height="28dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="36dp"
android:layout_marginLeft="16dp"
android:src="#drawable/ic_beta_calling_watermark_blue" />
<TextView
android:id="#+id/activeSpeakerName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#AA555555"
android:ellipsize="end"
android:gravity="center_horizontal|bottom"
android:lines="1"
android:textSize="16sp"
tools:text="" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/ShareContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="#+id/callButtonContainer"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="#+id/ShareVideo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/black"/>
<ImageButton
android:id="#+id/ShareToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="36dp"
android:layout_marginLeft="16dp"
android:background="#android:color/transparent"
android:src="#drawable/ic_video_cam_switch" />
</RelativeLayout>
<RelativeLayout
android:id="#+id/callStatusContainer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="#AA555555"
android:padding="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="#+id/callNameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:ellipsize="end"
android:lines="1"
android:textSize="14sp"
tools:text="" />
<TextView
android:id="#+id/callParticipantCountText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toEndOf="#+id/callNameText"
android:layout_toRightOf="#+id/callNameText"
android:ellipsize="end"
android:lines="1"
android:paddingLeft="18dp"
android:paddingRight="18dp"
android:textSize="14sp" />
<TextView
android:id="#+id/callDurationText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_toEndOf="#id/callParticipantCountText"
android:layout_toLeftOf="#+id/callButtonVideoRotate"
android:layout_toRightOf="#id/callParticipantCountText"
android:layout_toStartOf="#id/callButtonVideoRotate"
android:lines="1"
android:textSize="14sp"
tools:text="03:16" />
<ImageButton
android:id="#+id/callButtonVideoRotate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/callDurationText"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="#android:color/transparent"
android:src="#drawable/ic_video_cam_switch" />
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/groupCallerList"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="#+id/callButtonContainer"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="#+id/activeSpeakerContainer">
</android.support.v7.widget.RecyclerView>
<RelativeLayout
android:id="#+id/callProgressContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="#+id/groupCallerList"
app:layout_constraintLeft_toLeftOf="#+id/groupCallerList"
app:layout_constraintRight_toRightOf="#+id/groupCallerList"
app:layout_constraintTop_toTopOf="#+id/groupCallerList">
<TextView
android:id="#+id/callProgressName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="8dp"
android:gravity="center_horizontal"
android:textSize="20sp"
tools:text="Caller Name" />
<TextView
android:id="#+id/callProgressText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/callProgressName"
android:layout_centerHorizontal="true"
android:layout_marginTop="8dp"
android:gravity="center_horizontal"
android:text="#string/call_status_connecting"
android:textSize="16sp" />
</RelativeLayout>
<include
android:id="#+id/callButtonContainer"
layout="#layout/layout_call_button_bar_1_row"
android:layout_width="0dp"
android:layout_height="48dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<android.support.constraint.ConstraintLayout
android:id="#+id/callButtonContainerUnavailable"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="#+id/callButtonContainer"
app:layout_constraintLeft_toLeftOf="#+id/callButtonContainer"
app:layout_constraintRight_toRightOf="#+id/callButtonContainer"
app:layout_constraintTop_toTopOf="#+id/callButtonContainer"
tools:visibility="visible">
<Button
android:id="#+id/callButtonCancel"
style="#style/CallButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="#drawable/btn_call_end"
android:text="#string/dialog_button_cancel"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="#+id/callButtonRetry"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="#+id/callButtonRetry"
style="#style/CallButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="#drawable/btn_call_retry"
android:text="#string/button_try_again"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="#+id/callButtonCancel"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
any clues how to go about it?I actually want to place the callstatuscontainer on top of share or activespeaker container. I tried app:layout_constraintTop_toBottomOf="#+id/callStatusContainer"
in active speaker container, but no luck, any ideas?

Categories

Resources