Skip to content

Commit

Permalink
feat: many improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aikrq committed Dec 19, 2024
1 parent 5c9bdca commit 242d620
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ public void onCreate(Bundle savedInstanceState) {
}

Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
findViewById(R.id.layout_main_logo).setVisibility(View.GONE);
getSupportActionBar().setTitle(Helper.getResString(R.string.design_actionbar_title_manager_font));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(true);
toolbar.setNavigationOnClickListener(v -> {
if (!mB.a()) {
onBackPressed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ public void onCreate(Bundle savedInstanceState) {
}
setContentView(R.layout.manage_sound);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
findViewById(R.id.layout_main_logo).setVisibility(View.GONE);
getSupportActionBar().setTitle(getTranslatedString(R.string.design_actionbar_title_manager_sound));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(true);
toolbar.setNavigationOnClickListener(v -> {
if (!mB.a()) {
onBackPressed();
Expand Down
31 changes: 23 additions & 8 deletions app/src/main/res/layout/android_manifest_injection.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:fitsSystemWindows="true">

<include layout="@layout/toolbar_improved" />
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<include layout="@layout/toolbar_improved" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -31,9 +46,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="Activities"
android:textAppearance="?attr/textAppearanceBodyMedium"
android:textColor="?attr/colorPrimary" />
Expand All @@ -43,11 +58,11 @@
android:id="@+id/add_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:onClick="showAddActivityDialog"
android:text="@string/common_word_add_activtiy" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
51 changes: 40 additions & 11 deletions app/src/main/res/layout/manage_font.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,61 @@
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:fitsSystemWindows="true">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<include layout="@layout/toolbar" />
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="Font Manager" />
</com.google.android.material.appbar.CollapsingToolbarLayout>

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.appbar.AppBarLayout>
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:shapeAppearance="?attr/shapeAppearanceCornerExtraLarge"
app:strokeWidth="0.5dp">

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
style="@style/TabLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout>d

<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<LinearLayout
android:id="@+id/layout_ads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
android:visibility="gone" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
46 changes: 38 additions & 8 deletions app/src/main/res/layout/manage_sound.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:fitsSystemWindows="true">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:fitsSystemWindows="true">

<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<include layout="@layout/toolbar" />
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="Sound Manager" />
</com.google.android.material.appbar.CollapsingToolbarLayout>

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:shapeAppearance="?attr/shapeAppearanceCornerExtraLarge"
app:strokeWidth="0.5dp">

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
style="@style/TabLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout>

<androidx.viewpager.widget.ViewPager
Expand All @@ -26,6 +55,7 @@
android:id="@+id/layout_ads"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
android:visibility="gone" />
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit 242d620

Please sign in to comment.