You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
<imgloading="lazy"src="https://github.com/Yanndroid/Yanndroid/blob/master/cats.gif"width="25"height="25" /> A library for Android, useful for creating Samsung's OneUI styled apps. This library contains a theme which will apply for most views (see [which](#Progress)) in your layout, and some custom OneUI views. The text which is in the custom views is translated to 90 languages, so you don't need to worry for these. Android 5.0 (api 21) and above are supported, the library also has Dark mode, Landscape, Tablet, DeX and RTL support. This library has been tested in Android Studio, but should work in other IDEs too. You can download and install the latest apk of the sample app [here](https://github.com/Yanndroid/OneUI-Design-Library/raw/master/app/release/app-release.apk). Suggestions, improvements and help are always welcome.
14
+
<imgloading="lazy"src="https://github.com/Yanndroid/Yanndroid/blob/master/cats.gif"width="25"height="25" /> A library for Android, useful for creating Samsung's OneUI styled apps. This library contains a theme which will apply for most views (see [which](#Progress)) in your layout, and some custom OneUI views. The text which is in the custom views is translated to 90 languages, so you don't need to worry for these. Android 5.0 (api 21) and above are supported, the library also has Dark mode, Landscape, Tablet, DeX and RTL support. This library has been tested in Android Studio, but should work in other IDEs too. You can download and install the latest apk of the sample app [here](https://github.com/Yanndroid/OneUI-Design-Library/raw/master/app/release/app-release.apk). You can also check out my other apps for more examples on how to use this library. Suggestions, improvements and help are always welcome.
15
15
16
16
Huge thanks to [BlackMesa123](https://github.com/BlackMesa123) who has contributed a lot to this project.
17
17
18
-
Excuse my bad english, feel free to correct it. :)
19
-
20
18
21
19
-[Screenshots](#Screenshots)
22
20
-[Installation](#Installation)
23
-
-[Usage](#Usage)
21
+
-[Documentation](#Documentation)
24
22
-[Progress](#Progress)
25
23
-[Changelog](#Changelog)
26
24
-[More info](#More-info)
@@ -36,7 +34,7 @@ v2.0.0 and future versions are (and only will be) available on mavenCentral. For
36
34
1. Add the dependency to build.gradle (Module: ...)
37
35
```gradle
38
36
dependencies {
39
-
implementation 'io.github.yanndroid:oneui:2.1.1'
37
+
implementation 'io.github.yanndroid:oneui:2.2.0'
40
38
...
41
39
}
42
40
```
@@ -142,7 +140,9 @@ dependencies {
142
140
</details>
143
141
<br/>
144
142
145
-
## Usage
143
+
If you encounter problems with Proguard (missing classes), see this [Issue](https://github.com/Yanndroid/OneUI-Design-Library/issues/53) by [AlirezaIvaz](https://github.com/AlirezaIvaz).
144
+
145
+
## Documentation
146
146
In general, most of the views are styled automatically when you apply ```android:theme="@style/OneUITheme"``` in AndroidManifest.xml, the usage of the custom views in the library however is needed to achieve the best results.
147
147
148
148
-[DrawerLayout](#DrawerLayout)
@@ -200,7 +200,7 @@ In general, most of the views are styled automatically when you apply ```android
200
200
201
201
</de.dlyt.yanndroid.oneui.layout.DrawerLayout>
202
202
```
203
-
The children of this view can be at four different location: on the **main screen**, in the **drawer**, in the **footer** (useful for views like BottomNavigationView) or in the **appbar header** as a custom title. To specify the location of each child you can set the attribute ```app:layout_location``` of the child to either ```main_content``` (default), ```drawer_panel```, ```footer```or ```appbar_header```.
203
+
The children of this view can be at five different location: on the **main screen**, in the **drawer**, in the **footer** (useful for views like BottomNavigationView), in the **appbar header** as a custom title or in the **root layout** (views like FAB). To specify the location of each child you can set the attribute ```app:layout_location``` of the child to either ```main_content``` (default), ```drawer_panel```, ```footer```, ```appbar_header```or ```root```.
204
204
205
205
```app:toolbar_title``` and ```app:toolbar_subtitle``` can be used to set the title and subtitle of the AppBar and Toolbar. The AppBar status is set to expanded by default, you can simply set ```app:toolbar_expanded``` to false if you want it to be collapsed. On small screens/dpi the toolbar will not expand.
206
206
@@ -222,7 +222,7 @@ public void setDrawerButtonIcon(Drawable drawerIcon)
@@ -259,7 +257,7 @@ See [Advanced](#Advanced) for even more methods.
259
257
260
258
</de.dlyt.yanndroid.oneui.layout.ToolbarLayout>
261
259
```
262
-
The children of this view can be at three different location: on the **main screen**, in the **footer** (useful for views like BottomNavigationView) or in the **appbar header** as a custom title. To specify the location of each child you can set the attribute ```app:layout_location``` of the child to either ```main_content``` (default), ```footer```or ```appbar_header```.
260
+
The children of this view can be at four different location: on the **main screen**, in the **footer** (useful for views like BottomNavigationView), in the **appbar header** as a custom title or in the **root layout** (views like FAB). To specify the location of each child you can set the attribute ```app:layout_location``` of the child to either ```main_content``` (default), ```footer```, ```appbar_header```or ```root```.
263
261
264
262
```app:title``` and ```app:subtitle``` can be used to set the title and subtitle of the AppBar and Toolbar. The AppBar status is set to expanded by default, you can simply set ```app:toolbar_expanded``` to false if you want it to be collapsed. You can also disable totally the CollapsingToolbar by setting ```app:toolbar_expandable``` to false. On small screens/dpi the toolbar will not expand anyway.
265
263
@@ -297,22 +295,12 @@ public void setNavigationButtonVisible(boolean visible)
Manage the Toolbar Menu. In the Menu resource file use ```app:showAsAction="always"``` to show the item as a Action instead of in the popup menu. Changing the Icon or the Visibility won't do anything if this item isn't a Action.
298
+
Manage the Toolbar Menu. In the Menu resource file use ```app:showAsAction="always"``` to show the item as a Action instead of in the popup menu.
SelectMode. Changes the layout of the Toolbar to the one you can see in any Samsung app, when you long click a list item. This will show a "All" checkbox, "x selected" counter as the title and a bottom menu (see [screenshot](readme-resources/screenshots/toolbarlayout_selectmode.png)). In the Menu resource file for the bottom menu use ```app:showAsAction="always"``` to show the item as a Action instead of in the "more" menu.
318
306
```java
@@ -323,28 +311,34 @@ public void setSelectModeCount(int count)
SearchMode. Changes the layout of the Toolbar to a Search layout, with a text field and a voice input icon. (see [screenshot](readme-resources/screenshots/toolbarlayout_searchmode.png))
318
+
SearchMode. Changes the layout of the Toolbar to a Search layout, with a text field and a voice input icon (see [screenshot](readme-resources/screenshots/toolbarlayout_searchmode.png)).
The activity you are gonna use for SplashView has a different style than the rest of the application, so you need to add this ```android:theme="@style/OneUISplashTheme"``` to your splash activity in AndroidManifest.
350
344
@@ -393,8 +387,6 @@ Listener for the Splash Animation
2) A simple Splash View without animation. (Samsung apps use their own ```com.samsung.android.startingwindow.LAYOUT_RESID_FOR_MASS``` flag in manifest)
@@ -425,8 +417,6 @@ Returns the text of the Splash TextView
425
417
publicString getText()
426
418
```
427
419
428
-
See [Advanced](#Advanced) for even more methods.
429
-
430
420
### AboutPage
431
421
A layout that looks like and has the same functions as the About Screen in any Samsung app. Like the [SplashView](#SplashView), the activity you're gonna use has a different style than the rest of the application, so you need to add this ```android:theme="@style/OneUIAboutTheme"``` to your About Activity in AndroidManifest.
432
422
@@ -468,8 +458,6 @@ public void setUpdateButtonOnClickListener(OnClickListener listener)
This is a extended [ToolbarLayout](#ToolbarLayout) with [SwitchBar](#SwitchBar). Useful for creating inner preferences layouts in pair with [SwitchPreferenceScreen](#SwitchPreferenceScreen).
475
463
@@ -508,8 +496,6 @@ Expand or collapse the toolbar with an optional animation.
@@ -1174,7 +1149,7 @@ Snackbar.make(view, "Text label", Snackbar.LENGTH_SHORT).setAction("Action", new
1174
1149
```
1175
1150
1176
1151
### Advanced
1177
-
This is for advanced usage only. I've added the method ```getView(int view)``` to some of the custom views to access the views inside it and change them directly. This can be helpful if you want to do something which isn't implemented in the custom views yet as I can't think of all possible uses. Currently this method is available in DrawerLayout, ToolbarLayout, SplashView, AboutPage and SwitchBarLayout.
1152
+
For further customization or if you need something which isn't implemented in the custom views yet (I can't think of all possible uses), you can always access the views inside it with ```findViewById(int id)```and change them directly. For the Ids please refer to the source code.
1178
1153
1179
1154
### Icons
1180
1155
There are also a lot of the stock icons you can find in Samsung apps included in this library, and we will add more over time. You can use them with ```@drawable/ic_samsung_...``` and ```R.drawable.ic_samsung_...```.
@@ -1265,7 +1240,7 @@ The sample app icon for example:
Starting with v2.1.0, the new OneUI 4 design is being added to this library. Since Samsung hasn't released a stable version yet and still has a lot of stuff to fix, only some views are (partly) using the new style. As long as OneUI 4 is beta, this feature will also be, so don't expect too much. All the views which don't have the new style yet will use the old one (OneUI 3) instead. If you already want to use the OneUI 4 style, instead of ```@style/OneUITheme```, ```@style/OneUIAboutTheme``` and ```@style/OneUISplashTheme``` use ```@style/OneUI4Theme```, ```@style/OneUI4AboutTheme``` and ```@style/OneUI4SplashTheme``` in your manifest file.
1243
+
Starting with v2.1.0, the new OneUI 4 design is being added to this libraryand v2.2.0 makes it the default theme of the library. If you still want to use the OneUI 3 style, instead of ```@style/OneUITheme```, ```@style/OneUIAboutTheme``` and ```@style/OneUISplashTheme``` use ```@style/OneUI3Theme```, ```@style/OneUI3AboutTheme``` and ```@style/OneUI3SplashTheme``` in your manifest file. All the views which don't have the new style yet will use the old one (OneUI 3) instead.
1269
1244
1270
1245
## Progress
1271
1246
@@ -1299,6 +1274,22 @@ Starting with v2.1.0, the new OneUI 4 design is being added to this library. Sin
1299
1274
1300
1275
## Changelog
1301
1276
1277
+
<details>
1278
+
<summary>2.2.0</summary>
1279
+
1280
+
- OneUI4++ (huge thanks to [BlackMesa123](https://github.com/BlackMesa123))
1281
+
- AppBar/Toolbar
1282
+
- Edge effect
1283
+
- TabLayout/BottomNavigationView
1284
+
- SwipeRefreshLayout
1285
+
- EditText
1286
+
- and more...
1287
+
- ToolbarLayout & PopupMenu/Menu improvements
1288
+
- icons++ (OneUI4)
1289
+
- fixes & minor changes
1290
+
1291
+
</details>
1292
+
1302
1293
<details>
1303
1294
<summary>2.1.1</summary>
1304
1295
@@ -1436,5 +1427,4 @@ Starting with v2.1.0, the new OneUI 4 design is being added to this library. Sin
1436
1427
-[BlackMesa123](https://github.com/BlackMesa123) for a lot of OneUI stuff, more compatibility and his experience.
1437
1428
-[TenSeventy7](https://github.com/TenSeventy7) for some stuff and help.
1438
1429
-[leonbcode](https://github.com/leonbcode) for github actions, so this library is always up-to-date.
1439
-
-[AlirezaIvaz](https://github.com/AlirezaIvaz) for translation correction (Persian) and issue reporting.
1440
-
-[nfauv2001](https://github.com/nfauv2001) for helping me out with my english.
1430
+
- All the [Contributors](https://github.com/Yanndroid/OneUI-Design-Library/graphs/contributors) and Issue Reporters.
0 commit comments