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.
Copy file name to clipboardExpand all lines: README.md
+31-55Lines changed: 31 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,8 @@ dependencies {
142
142
</details>
143
143
<br/>
144
144
145
+
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).
146
+
145
147
## Usage
146
148
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
149
@@ -200,7 +202,7 @@ In general, most of the views are styled automatically when you apply ```android
200
202
201
203
</de.dlyt.yanndroid.oneui.layout.DrawerLayout>
202
204
```
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```.
205
+
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
206
205
207
```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
208
@@ -222,7 +224,7 @@ public void setDrawerButtonIcon(Drawable drawerIcon)
@@ -259,7 +259,7 @@ See [Advanced](#Advanced) for even more methods.
259
259
260
260
</de.dlyt.yanndroid.oneui.layout.ToolbarLayout>
261
261
```
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```.
262
+
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
263
264
264
```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
265
@@ -297,22 +297,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.
300
+
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
308
```java
@@ -323,28 +313,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))
320
+
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
346
@@ -393,8 +389,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 +419,6 @@ Returns the text of the Splash TextView
425
419
publicString getText()
426
420
```
427
421
428
-
See [Advanced](#Advanced) for even more methods.
429
-
430
422
### AboutPage
431
423
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
424
@@ -468,8 +460,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
465
@@ -508,8 +498,6 @@ Expand or collapse the toolbar with an optional animation.
@@ -1174,7 +1151,7 @@ Snackbar.make(view, "Text label", Snackbar.LENGTH_SHORT).setAction("Action", new
1174
1151
```
1175
1152
1176
1153
### 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.
1154
+
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
1155
1179
1156
### Icons
1180
1157
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_...```.
@@ -1436,5 +1413,4 @@ Starting with v2.1.0, the new OneUI 4 design is being added to this library. Sin
1436
1413
-[BlackMesa123](https://github.com/BlackMesa123) for a lot of OneUI stuff, more compatibility and his experience.
1437
1414
-[TenSeventy7](https://github.com/TenSeventy7) for some stuff and help.
1438
1415
-[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.
1416
+
- All the [Contributors](https://github.com/Yanndroid/OneUI-Design-Library/graphs/contributors) and Issue Reporters.
0 commit comments