Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 5df4fb5

Browse files
committed
v2.1.0
- seekbar vertical and improved - toolbar improvements - SearchMode - SelectMode - custom Title & collapsed subtitle - toolbar menu - swipeRefreshLayout - PopupMenu improvements - some OneUI 4 stuff - crash fixes - icons++
1 parent fbd8b62 commit 5df4fb5

File tree

12 files changed

+184
-159
lines changed

12 files changed

+184
-159
lines changed

README.md

Lines changed: 163 additions & 106 deletions
Large diffs are not rendered by default.

app/release/app-release.apk

-2.3 MB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
{
1111
"type": "SINGLE",
1212
"filters": [],
13-
"versionCode": 52,
14-
"versionName": "2.0.1",
13+
"versionCode": 53,
14+
"versionName": "2.1.0",
1515
"outputFile": "app-release.apk"
1616
}
1717
]

app/src/main/java/de/dlyt/yanndroid/oneuiexample/MainActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ private void init() {
147147
}
148148
});
149149

150+
toolbarLayout.inflateToolbarMenu(R.menu.main);
150151
toolbarLayout.setOnToolbarMenuItemClickListener(item -> {
151152
switch (item.getItemId()) {
152153
case R.id.search:
@@ -228,13 +229,13 @@ private void setCurrentItem() {
228229
// MainActivityFirstFragment
229230
toolbarLayout.setSubtitle("Design");
230231
toolbarLayout.setNavigationButtonVisible(true);
231-
toolbarLayout.inflateToolbarMenu(R.menu.main_with_search);
232+
toolbarLayout.setToolbarMenuItemVisibility(toolbarLayout.getToolbarMenu().findItem(R.id.search), true);
232233
((androidx.drawerlayout.widget.DrawerLayout) drawerLayout.getView(DRAWER_LAYOUT)).setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_UNLOCKED);
233234
} else {
234235
// MainActivitySecondFragment
235236
toolbarLayout.setSubtitle("Preferences");
236237
toolbarLayout.setNavigationButtonVisible(false);
237-
toolbarLayout.inflateToolbarMenu(R.menu.main);
238+
toolbarLayout.setToolbarMenuItemVisibility(toolbarLayout.getToolbarMenu().findItem(R.id.search), false);
238239
((androidx.drawerlayout.widget.DrawerLayout) drawerLayout.getView(DRAWER_LAYOUT)).setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
239240
}
240241

app/src/main/java/de/dlyt/yanndroid/oneuiexample/tabs/IconsTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public void setSelecting(boolean enabled) {
302302
if (enabled) {
303303
mSelecting = true;
304304
imageAdapter.notifyItemRangeChanged(0, imageAdapter.getItemCount() - 1);
305-
toolbarLayout.setSelectModeBottomMenu(R.menu.action_mode_menu, item -> Toast.makeText(mContext, item.getTitle(), Toast.LENGTH_SHORT).show());
305+
toolbarLayout.setSelectModeBottomMenu(R.menu.select_mode_menu, item -> Toast.makeText(mContext, item.getTitle(), Toast.LENGTH_SHORT).show());
306306
toolbarLayout.showSelectMode();
307307
toolbarLayout.setSelectModeAllCheckedChangeListener((buttonView, isChecked) -> {
308308
if (checkAllListening) {

app/src/main/res/menu/main.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
<menu xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto">
44

5+
<item
6+
android:id="@+id/search"
7+
android:icon="@drawable/ic_samsung_search"
8+
android:title="@string/action_search"
9+
app:showAsAction="always" />
10+
511
<item
612
android:id="@+id/info"
713
android:icon="@drawable/ic_samsung_info"

app/src/main/res/menu/main_with_search.xml

Lines changed: 0 additions & 32 deletions
This file was deleted.

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
22
android.useAndroidX=true
33
android.enableJetifier=true
44
# version
5-
VERSION_NAME=2.0.1
6-
VERSION_CODE=4
5+
VERSION_NAME=2.1.0
6+
VERSION_CODE=5
77
# mavenCentral
88
GROUP_ID=io.github.yanndroid
99
ARTIFACT_ID=oneui
107 KB
Loading

0 commit comments

Comments
 (0)