« first day  last day (26 days later) » 

7:12 AM
hi
now my dialog is out of screen from top side (half of image) and buttons shape as my last screenshot plus buttons actions notworking
what i try to achieve is the image i sent you (right side) ibb.co/WgPzdWP
@TamirAbutbul
 
7:53 AM
Ok I will try to made this layout and send it to you
 
8:24 AM
Try this (this is java code, tell me if you are having a problem to write it in kotlin )

Window window = yourDialog.getWindow();
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, (WindowManager.LayoutParams.WRAP_CONTENT ));
window.setGravity(Gravity.CENTER);
After that try to show your dialog
This is the layout that I was using:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayoutxmlns: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">


<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline" />
 

« first day  last day (26 days later) »