-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement edge-to-edge support
- Update layout to use CoordinatorLayout and ConstraintLayout- Add toolbar and implement proper window insets handling - Enable edge-to-edge support for immersive UI experience - Refactor MainActivity to use new UI components - Update themes to use NoActionBar parent for consistency
- Loading branch information
1 parent
397bfda
commit 9f35c78
Showing
3 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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" | ||
android:animateLayoutChanges="true" | ||
android:fitsSystemWindows="true" | ||
tools:context=".MainActivity"> | ||
|
||
<ProgressBar | ||
<com.google.android.material.appbar.AppBarLayout | ||
android:id="@+id/appBarLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/progress" | ||
style="@style/Widget.AppCompat.ProgressBar.Horizontal" | ||
android:indeterminate="true" /> | ||
android:fitsSystemWindows="true"> | ||
|
||
<io.github.dingyi222666.view.treeview.TreeView | ||
<com.google.android.material.appbar.MaterialToolbar | ||
android:id="@+id/toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
app:layout_scrollFlags="scroll|enterAlways|snap" /> | ||
|
||
</com.google.android.material.appbar.AppBarLayout> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:id="@+id/treeview" | ||
/> | ||
android:animateLayoutChanges="true" | ||
app:layout_behavior="@string/appbar_scrolling_view_behavior"> | ||
|
||
<ProgressBar | ||
android:id="@+id/progress" | ||
style="@style/Widget.AppCompat.ProgressBar.Horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:indeterminate="true" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<io.github.dingyi222666.view.treeview.TreeView | ||
android:id="@+id/treeview" | ||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
android:clipToPadding="false" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/progress" /> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
</LinearLayout> | ||
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters