Skip to content

Commit

Permalink
migrate to fragment from activity, add archive fragment, refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
WirelessAlien committed Dec 23, 2024
1 parent 6001eac commit b8751f1
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"/>
</com.google.android.material.appbar.AppBarLayout>

<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/circularProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:indeterminate="true"
android:indeterminateBehavior="repeat"
android:layout_gravity="center"/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">

<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progressBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:visibility="gone"
android:layout_marginEnd="16dp"/>

<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollIndicators="none"
android:scrollbars="none">

<com.google.android.material.chip.ChipGroup
android:id="@+id/chipGroupPath"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:orientation="horizontal"
app:singleLine="true"/>
</HorizontalScrollView>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:layout_marginTop="-5dp"
tools:listitem="@layout/item_file" />
</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/mainFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:text="@string/archive"
app:layout_behavior="com.google.android.material.behavior.HideViewOnScrollBehavior"
android:src="@drawable/ic_create_z" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/createZipFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="80dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
android:text="@string/create_zip"
app:layout_behavior="com.google.android.material.behavior.HideViewOnScrollBehavior"
android:icon="@drawable/ic_zip" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/create7zFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="140dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
android:text="@string/compress_sevenz"
app:layout_behavior="com.google.android.material.behavior.HideViewOnScrollBehavior"
android:icon="@drawable/ic_zip" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/createTarFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="200dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
android:text="@string/compress_tar"
app:layout_behavior="com.google.android.material.behavior.HideViewOnScrollBehavior"
android:icon="@drawable/ic_zip" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit b8751f1

Please sign in to comment.