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 9cc7f62 commit 507ee09
Show file tree
Hide file tree
Showing 21 changed files with 356 additions and 324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ private void updateDeleteIcon(boolean z, boolean isCustomWidget) {
}

private void initialDeleteViewUi() {
int focus = getColor(deleteView, R.attr.colorSurfaceContainer);
int focus = getColor(deleteView, R.attr.colorSurfaceInverse);
int pressed = getColor(deleteView, R.attr.colorOnSurfaceVariant);
rippleRound(deleteView, focus, pressed, 200);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowCompat;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.viewpager2.adapter.FragmentStateAdapter;
Expand Down Expand Up @@ -36,8 +37,10 @@ public class AboutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

binding = ActivityAboutAppBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);

binding.toolbar.setNavigationOnClickListener(v -> finish());

Expand Down
11 changes: 2 additions & 9 deletions app/src/main/res/drawable/circle_bg_white.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:innerRadius="0dp"
android:shape="ring"
android:thicknessRatio="2"
android:useLevel="false">
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@android:color/white" />
<stroke
android:width="1dp"
android:color="@android:color/white" />
</shape>
</shape>
26 changes: 10 additions & 16 deletions app/src/main/res/layout/about_teamview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="5dp"
android:gravity="center_vertical"
android:clickable="true"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal">

<LinearLayout
Expand All @@ -40,21 +40,15 @@
android:background="?attr/colorPrimary"
android:orientation="horizontal" />

<androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/img_user_icon"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
app:cardCornerRadius="22.2dp">

<ImageView
android:id="@+id/img_user_icon"
android:layout_width="45dp"
android:layout_height="45dp"
android:focusable="false"
android:scaleType="centerCrop"
android:src="@drawable/ic_user" />
</androidx.cardview.widget.CardView>
android:scaleType="centerCrop"
android:src="@drawable/ic_user"
app:shapeAppearance="?attr/shapeAppearanceCornerExtraLarge" />

<RelativeLayout
android:layout_width="match_parent"
Expand All @@ -81,11 +75,11 @@
android:layout_below="@+id/tv_user_name"
android:autoLink="all"
android:focusable="false"
android:maxLines="2"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingBottom="8dp"
android:textAppearance="?attr/textAppearanceBodySmall"
android:maxLines="2"
tools:text="Their description" />

<TextView
Expand Down
86 changes: 52 additions & 34 deletions app/src/main/res/layout/activity_about_app.xml
Original file line number Diff line number Diff line change
@@ -1,63 +1,81 @@
<RelativeLayout 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.MaterialToolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="@string/about_title" />
android:fitsSystemWindows="true">

<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
style="@style/TabLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_team_title" />
<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="@string/about_title" />
</com.google.android.material.appbar.CollapsingToolbarLayout>

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

<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_beta_changes_title" />
</com.google.android.material.tabs.TabLayout>
<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.divider.MaterialDivider
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tab_layout" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_team_title" />

<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_changelog_title" />

<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_beta_changes_title" />
</com.google.android.material.tabs.TabLayout>

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

<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/divider" />
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/discordButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center|bottom"
android:layout_margin="16dp"
android:text="@string/about_joindiscord"
android:textAllCaps="false"
android:textColor="#FFF"
app:backgroundTint="#5865F2"
app:icon="@drawable/ic_discord"
app:iconTint="#FFF" />
</RelativeLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
33 changes: 20 additions & 13 deletions app/src/main/res/layout/activity_manage_custom_attribute.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
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:layout_height="match_parent"
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.MaterialToolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="Manage Custom Attribute"
app:menu="@menu/manage_custom_attribute_menu" />
android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">

<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:menu="@menu/manage_custom_attribute_menu"
app:navigationIcon="?attr/homeAsUpIndicator"
app:title="Manage Custom Attribute" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>

<LinearLayout
Expand All @@ -38,7 +47,5 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="@drawable/ic_mtrl_add"
app:elevation="6dp"
app:fabSize="normal" />
android:src="@drawable/ic_mtrl_add" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
1 change: 0 additions & 1 deletion app/src/main/res/layout/android_manifest_injection.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand Down
Loading

0 comments on commit 507ee09

Please sign in to comment.