androidx.percentlayout.widget
Interfaces
PercentLayoutHelper.PercentLayoutParams | This interface is deprecated. this class is deprecated along with its parent class. |
Classes
PercentFrameLayout |
This class is deprecated.
consider using ConstraintLayout and associated layouts instead. The following shows
how to replicate the functionality of percentage layouts with a ConstraintLayout. The Guidelines
are used to define each percentage break point, and then a Button view is stretched to fill
the gap:
<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"> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/left_guideline" app:layout_constraintGuide_percent=".15" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/right_guideline" app:layout_constraintGuide_percent=".85" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/top_guideline" app:layout_constraintGuide_percent=".15" android:orientation="horizontal"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/bottom_guideline" app:layout_constraintGuide_percent=".85" android:orientation="horizontal"/> <Button android:text="Button" android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/button" app:layout_constraintLeft_toLeftOf="@+id/left_guideline" app:layout_constraintRight_toRightOf="@+id/right_guideline" app:layout_constraintTop_toTopOf="@+id/top_guideline" app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline" /> </androidx.constraintlayout.widget.ConstraintLayout> |
PercentFrameLayout.LayoutParams | This class is deprecated. this class is deprecated along with its parent class. |
PercentLayoutHelper |
This class is deprecated.
consider using ConstraintLayout and associated layouts instead. The following shows
how to replicate the functionality of percentage layouts with a ConstraintLayout. The Guidelines
are used to define each percentage break point, and then a Button view is stretched to fill
the gap:
<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"> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/left_guideline" app:layout_constraintGuide_percent=".15" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/right_guideline" app:layout_constraintGuide_percent=".85" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/top_guideline" app:layout_constraintGuide_percent=".15" android:orientation="horizontal"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/bottom_guideline" app:layout_constraintGuide_percent=".85" android:orientation="horizontal"/> <Button android:text="Button" android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/button" app:layout_constraintLeft_toLeftOf="@+id/left_guideline" app:layout_constraintRight_toRightOf="@+id/right_guideline" app:layout_constraintTop_toTopOf="@+id/top_guideline" app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline" /> </androidx.constraintlayout.widget.ConstraintLayout> |
PercentLayoutHelper.PercentLayoutInfo | This class is deprecated. use ConstraintLayout and Guidelines for layout support. |
PercentRelativeLayout |
This class is deprecated.
consider using ConstraintLayout and associated layouts instead. The following shows
how to replicate the functionality of percentage layouts with a ConstraintLayout. The Guidelines
are used to define each percentage break point, and then a Button view is stretched to fill
the gap:
<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"> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/left_guideline" app:layout_constraintGuide_percent=".15" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/right_guideline" app:layout_constraintGuide_percent=".85" android:orientation="vertical"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/top_guideline" app:layout_constraintGuide_percent=".15" android:orientation="horizontal"/> <androidx.constraintlayout.widget.Guideline android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/bottom_guideline" app:layout_constraintGuide_percent=".85" android:orientation="horizontal"/> <Button android:text="Button" android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/button" app:layout_constraintLeft_toLeftOf="@+id/left_guideline" app:layout_constraintRight_toRightOf="@+id/right_guideline" app:layout_constraintTop_toTopOf="@+id/top_guideline" app:layout_constraintBottom_toBottomOf="@+id/bottom_guideline" /> </androidx.constraintlayout.widget.ConstraintLayout> |
PercentRelativeLayout.LayoutParams | This class is deprecated. this class is deprecated along with its parent class. |