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

Commit eae146b

Browse files
committed
renamed package, getView
1 parent 3cc47ab commit eae146b

File tree

415 files changed

+327
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+327
-125
lines changed

README.md

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
[![](https://img.shields.io/github/v/release/Yanndroid/SamsungOneUi?color=%235555ff)](https://github.com/Yanndroid/SamsungOneUi/releases)
2-
[![](https://img.shields.io/static/v1?label=sample&message=apk&color=yellow)](https://github.com/Yanndroid/SamsungOneUi/raw/master/app/release/app-release.apk)
3-
![](https://img.shields.io/github/last-commit/Yanndroid/SamsungOneUi)
4-
[![](https://img.shields.io/github/issues-raw/Yanndroid/SamsungOneUi?color=%23ff4400)](https://github.com/Yanndroid/SamsungOneUi/issues)
5-
[![](https://img.shields.io/github/issues-pr-raw/Yanndroid/SamsungOneUi?color=%23bb00bb)](https://github.com/Yanndroid/SamsungOneUi/pulls)
6-
[![](https://img.shields.io/github/forks/Yanndroid/SamsungOneUi?color=%2300bbbb)](https://github.com/Yanndroid/SamsungOneUi/network/members)
7-
[![](https://img.shields.io/github/contributors/Yanndroid/SamsungOneUi)](https://github.com/Yanndroid/SamsungOneUi/graphs/contributors)
1+
[![](https://img.shields.io/github/v/release/Yanndroid/OneUI-Design-Library?color=%235555ff)](https://github.com/Yanndroid/OneUI-Design-Library/releases)
2+
[![](https://img.shields.io/static/v1?label=sample&message=apk&color=yellow)](https://github.com/Yanndroid/OneUI-Design-Library/raw/master/app/release/app-release.apk)
3+
![](https://img.shields.io/github/last-commit/Yanndroid/OneUI-Design-Library)
4+
[![](https://img.shields.io/github/issues-raw/Yanndroid/OneUI-Design-Library?color=%23ff4400)](https://github.com/Yanndroid/OneUI-Design-Library/issues)
5+
[![](https://img.shields.io/github/issues-pr-raw/Yanndroid/OneUI-Design-Library?color=%23bb00bb)](https://github.com/Yanndroid/OneUI-Design-Library/pulls)
6+
[![](https://img.shields.io/github/forks/Yanndroid/OneUI-Design-Library?color=%2300bbbb)](https://github.com/Yanndroid/OneUI-Design-Library/network/members)
7+
[![](https://img.shields.io/github/contributors/Yanndroid/OneUI-Design-Library)](https://github.com/Yanndroid/OneUI-Design-Library/graphs/contributors)
88
[![](https://img.shields.io/static/v1?label=telegram&message=Yanndroid&color=blue)](https://t.me/Yanndroid)
99

10-
# Samsung OneUi Design
11-
A library for Android, which makes your app look like Samsung's OneUI 3. In this library, there is a theme which will apply for each view (see [Progress](#Progress)) in your layout. Of course it also has dark mode and even landscape/dex support. The text which is in the custom views is translated to 90 languages, so you don't need to worry for these. This library has been tested in AndroidStudio, but should work in other IDEs too. You can try out the latest example [here](https://github.com/Yanndroid/SamsungOneUi/raw/master/app/release/app-release.apk). Suggestions, improvements and help are always welcome.
10+
# OneUi Design
11+
12+
:warning: v1.3.0: moved from ```de.dlyt.yanndroid.samsung``` to ```de.dlyt.yanndroid.oneui```
13+
14+
A library for Android, which makes your app look like Samsung's OneUI 3. In this library, there is a theme which will apply for each view (see [Progress](#Progress)) in your layout. Of course it also has dark mode and even landscape/dex support. The text which is in the custom views is translated to 90 languages, so you don't need to worry for these. This library has been tested in AndroidStudio, but should work in other IDEs too. You can try out the latest example [here](https://github.com/Yanndroid/OneUI-Design-Library/raw/master/app/release/app-release.apk). Suggestions, improvements and help are always welcome.
1215

1316
Excuse my bad english, feel free to correct it. :)
1417

@@ -36,6 +39,7 @@ Excuse my bad english, feel free to correct it. :)
3639
- [Single/Multiple activities](#2-singleMultiple-activities)
3740
- [Via Code](#3-Via-Code)
3841
- [App Icon](#App-Icon)
42+
- [Advanced](#Advanced)
3943
- [Progress](#Progress)
4044
- [Changelog](#Changelog)
4145

@@ -61,7 +65,7 @@ allprojects {
6165
2. Add the dependency to build.gradle (Module: ...)
6266
```gradle
6367
dependencies {
64-
implementation 'com.github.Yanndroid:SamsungOneUi:1.2.2'
68+
implementation 'com.github.Yanndroid:OneUI-Design-Library:1.3.0'
6569
...
6670
}
6771
```
@@ -82,7 +86,7 @@ dependencies {
8286
```gradle
8387
repositories {
8488
maven {
85-
url = uri("https://maven.pkg.github.com/yanndroid/SamsungOneUi")
89+
url = uri("https://maven.pkg.github.com/Yanndroid/OneUI-Design-Library")
8690
credentials {
8791
username = "your username"
8892
password = "your token"
@@ -92,7 +96,7 @@ repositories {
9296
9397
9498
dependencies {
95-
implementation 'de.dlyt.yanndroid:samsung:1.2.2'
99+
implementation 'de.dlyt.yanndroid:oneui:1.3.0'
96100
...
97101
}
98102
```
@@ -113,7 +117,7 @@ In general, most of the views (see [Progress](#Progress)) are styled automatical
113117
### DrawerLayout
114118
"Ready-to-go" DrawerLayout with collapsing toolbar.
115119
```xml
116-
<de.dlyt.yanndroid.samsung.layout.DrawerLayout
120+
<de.dlyt.yanndroid.oneui.layout.DrawerLayout
117121
android:layout_width="match_parent"
118122
android:layout_height="match_parent"
119123
app:drawer_icon="..."
@@ -129,7 +133,7 @@ In general, most of the views (see [Progress](#Progress)) are styled automatical
129133

130134
<!--other views-->
131135

132-
</de.dlyt.yanndroid.samsung.layout.DrawerLayout>
136+
</de.dlyt.yanndroid.oneui.layout.DrawerLayout>
133137

134138
```
135139
The view with the ID specified in ```app:drawer_viewId="..."``` will be shown in the drawer and the rest of the children on the main screen.
@@ -181,7 +185,7 @@ public void setDrawerOpen(Boolean open, Boolean animate)
181185
### ToolbarLayout
182186
Basically the same as [DrawerLayout](#DrawerLayout) but without the drawer.
183187
```xml
184-
<de.dlyt.yanndroid.samsung.layout.ToolbarLayout
188+
<de.dlyt.yanndroid.oneui.layout.ToolbarLayout
185189
android:layout_width="match_parent"
186190
android:layout_height="match_parent"
187191
app:title="..."
@@ -193,7 +197,7 @@ Basically the same as [DrawerLayout](#DrawerLayout) but without the drawer.
193197

194198
<!--children-->
195199

196-
</de.dlyt.yanndroid.samsung.layout.ToolbarLayout>
200+
</de.dlyt.yanndroid.oneui.layout.ToolbarLayout>
197201
```
198202
```app:navigationIcon="..."``` is the NavigationIcon of the toolbar. There are already some stock Samsung [icons](#Icons) included in the library, like a drawer and back icon.
199203

@@ -245,7 +249,7 @@ These are the buttons you can see in the drawer of Samsung apps.
245249
<img src="readme-resources/screenshots/optionbutton.png" width="260"/>
246250

247251
```xml
248-
<de.dlyt.yanndroid.samsung.drawer.OptionButton
252+
<de.dlyt.yanndroid.oneui.drawer.OptionButton
249253
android:layout_width="match_parent"
250254
android:layout_height="wrap_content"
251255
app:icon="..."
@@ -291,34 +295,34 @@ public void setButtonEnabled(Boolean enabled)
291295
<img src="readme-resources/screenshots/optiongroup.gif" width="260"/>
292296

293297
```xml
294-
<de.dlyt.yanndroid.samsung.drawer.OptionGroup
298+
<de.dlyt.yanndroid.oneui.drawer.OptionGroup
295299
android:id="@+id/optiongroup"
296300
android:layout_width="match_parent"
297301
android:layout_height="wrap_content"
298302
app:selectedOptionButton="@id/ob1">
299303

300-
<de.dlyt.yanndroid.samsung.drawer.OptionButton
304+
<de.dlyt.yanndroid.oneui.drawer.OptionButton
301305
android:id="@+id/ob1"
302306
android:layout_width="match_parent"
303307
android:layout_height="wrap_content"
304308
app:icon="@drawable/ic_samsung_info"
305309
app:text="Option 1" />
306310

307-
<de.dlyt.yanndroid.samsung.drawer.OptionButton
311+
<de.dlyt.yanndroid.oneui.drawer.OptionButton
308312
android:id="@+id/ob2"
309313
android:layout_width="match_parent"
310314
android:layout_height="wrap_content"
311315
app:icon="@drawable/ic_samsung_info"
312316
app:text="Option 2" />
313317

314-
<de.dlyt.yanndroid.samsung.drawer.OptionButton
318+
<de.dlyt.yanndroid.oneui.drawer.OptionButton
315319
android:id="@+id/ob3"
316320
android:layout_width="match_parent"
317321
android:layout_height="wrap_content"
318322
app:icon="@drawable/ic_samsung_info"
319323
app:text="Option 3" />
320324

321-
</de.dlyt.yanndroid.samsung.drawer.OptionGroup>
325+
</de.dlyt.yanndroid.oneui.drawer.OptionGroup>
322326
```
323327

324328
```app:selectedOptionButton="..."``` will select (colored, bold text) the OptionButton with this id. This view can also have other children, for example [DrawerDivider](#DrawerDivider).
@@ -345,7 +349,7 @@ A divider between the [OptionButtons](#OptionButton) on the drawer. It's the sam
345349
<img src="readme-resources/screenshots/drawerdivider.png" width="260"/>
346350

347351
```xml
348-
<de.dlyt.yanndroid.samsung.drawer.Divider
352+
<de.dlyt.yanndroid.oneui.drawer.Divider
349353
android:layout_width="match_parent"
350354
android:layout_height="4dp"
351355
android:layout_marginHorizontal="24dp"
@@ -362,7 +366,7 @@ Simple Splash view. (I think Samsung removed the splashscreen of their apps sinc
362366
<img src="readme-resources/screenshots/splash_simple.png" width="150"/>
363367

364368
```xml
365-
<de.dlyt.yanndroid.samsung.layout.SplashViewSimple
369+
<de.dlyt.yanndroid.oneui.layout.SplashViewSimple
366370
android:layout_width="match_parent"
367371
android:layout_height="match_parent"
368372
app:image="..."
@@ -391,7 +395,7 @@ An animated splash screen view like the one in the GalaxyStore. Add this ```andr
391395
<img src="readme-resources/screenshots/splash_animated.gif" width="150"/>
392396

393397
```xml
394-
<de.dlyt.yanndroid.samsung.layout.SplashViewAnimated
398+
<de.dlyt.yanndroid.oneui.layout.SplashViewAnimated
395399
android:layout_width="match_parent"
396400
android:layout_height="match_parent"
397401
app:background_image="..."
@@ -437,7 +441,7 @@ A layout that looks like and has the same functions as the about screen in any S
437441
<img src="readme-resources/screenshots/aboutpage_1.png" width="150"/> <img src="readme-resources/screenshots/aboutpage_2.png" width="150"/> <img src="readme-resources/screenshots/aboutpage_3.png" width="150"/>
438442

439443
```xml
440-
<de.dlyt.yanndroid.samsung.layout.AboutPage
444+
<de.dlyt.yanndroid.oneui.layout.AboutPage
441445
android:layout_width="match_parent"
442446
android:layout_height="match_parent"
443447
app:optional_text="...">
@@ -447,7 +451,7 @@ A layout that looks like and has the same functions as the about screen in any S
447451
android:text="..." />
448452

449453

450-
</de.dlyt.yanndroid.samsung.layout.AboutPage>
454+
</de.dlyt.yanndroid.oneui.layout.AboutPage>
451455
```
452456
The app name and version are automatically added to the view. The info icon at the top right will redirect the user to the app info in settings. The ```app:optional_text="..."``` is the text between the version and the status text. The status text will change according to the state you set the view (see below). You can use ```style="@style/ButtonStyle.AboutPage"``` for the buttons, which are shown at the bottom.
453457

@@ -471,7 +475,7 @@ A SwitchBar like in the wifi or bluetooth settings.
471475
<img src="readme-resources/screenshots/switchbar.gif" width="300"/>
472476

473477
```xml
474-
<de.dlyt.yanndroid.samsung.SwitchBar
478+
<de.dlyt.yanndroid.oneui.SwitchBar
475479
android:layout_width="match_parent"
476480
android:layout_height="wrap_content" />
477481
```
@@ -501,7 +505,7 @@ It's like the "Looking for something else?" card in settings.
501505
(Depending on your screen right now you might not see it, but there's actually a light blue card around it.)
502506

503507
```xml
504-
<de.dlyt.yanndroid.samsung.RelatedCard
508+
<de.dlyt.yanndroid.oneui.RelatedCard
505509
android:layout_width="match_parent"
506510
android:layout_height="wrap_content"
507511
app:title="...">
@@ -511,7 +515,7 @@ It's like the "Looking for something else?" card in settings.
511515
android:text="..." />
512516

513517

514-
</de.dlyt.yanndroid.samsung.RelatedCard>
518+
</de.dlyt.yanndroid.oneui.RelatedCard>
515519
```
516520
You can simply use ```style="@style/RelatedButtonStyle"``` for the child TextViews.
517521

@@ -529,7 +533,7 @@ A Seekbar like the brightness slider in the QS.
529533
<img src="readme-resources/screenshots/seekbar.gif" width="300"/>
530534

531535
```xml
532-
<de.dlyt.yanndroid.samsung.SeekBar
536+
<de.dlyt.yanndroid.oneui.SeekBar
533537
android:layout_width="match_parent"
534538
android:layout_height="wrap_content"
535539
app:seslSeekBarMode="expand" />
@@ -770,6 +774,8 @@ My sample app icon for example:
770774

771775
<img src="readme-resources/app-icons/sample.png" width="50" height="50" />
772776

777+
### Advanced
778+
This is for further customization. I added the methode ```getView(int view)``` to some of the custom view 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 methode is available in OptionButton, AboutPage, DrawerLayout, ToolbarLayout and SplashView (both).
773779

774780
## Progress
775781

@@ -814,6 +820,16 @@ My sample app icon for example:
814820

815821
## Changelog
816822

823+
<details>
824+
<summary>1.3.0</summary>
825+
826+
- renamed library
827+
- getView methode added
828+
- splash screen display size fix
829+
- minor changes
830+
831+
</details>
832+
817833
<details>
818834
<summary>1.2.2</summary>
819835

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ android {
77
buildToolsVersion "30.0.3"
88

99
defaultConfig {
10-
applicationId "de.dlyt.yanndroid.samsungexample"
10+
applicationId "de.dlyt.yanndroid.oneuiexample"
1111
minSdkVersion 26
1212
targetSdkVersion 30
13-
versionCode 1
13+
versionCode 2
1414
versionName = latest
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -30,10 +30,10 @@ android {
3030

3131
dependencies {
3232

33-
implementation 'androidx.appcompat:appcompat:1.3.0'
33+
implementation 'androidx.appcompat:appcompat:1.3.1'
3434
implementation 'com.google.android.material:material:1.4.0'
35-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
36-
implementation project(path: ':yanndroid:samsung')
35+
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
36+
implementation project(path: ':yanndroid:oneui')
3737
testImplementation 'junit:junit:4.+'
3838
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3939
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="de.dlyt.yanndroid.samsungexample">
3+
package="de.dlyt.yanndroid.oneuiexample">
44

55
<application
66
android:allowBackup="true"
@@ -10,16 +10,13 @@
1010
android:supportsRtl="true"
1111
android:theme="@style/SamsungTheme">
1212
<activity
13-
android:name=".SettingsActivity"
14-
android:label="@string/action_settings" />
15-
<activity
16-
android:name=".AboutActivity"
13+
android:name="de.dlyt.yanndroid.oneuiexample.AboutActivity"
1714
android:theme="@style/SamsungAboutTheme" />
1815
<activity
19-
android:name=".MainActivity"
16+
android:name="de.dlyt.yanndroid.oneuiexample.MainActivity"
2017
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" />
2118
<activity
22-
android:name=".SplashActivity"
19+
android:name="de.dlyt.yanndroid.oneuiexample.SplashActivity"
2320
android:theme="@style/SamsungSplashTheme">
2421
<intent-filter>
2522
<action android:name="android.intent.action.MAIN" />

app/src/main/java/de/dlyt/yanndroid/samsungexample/AboutActivity.java renamed to app/src/main/java/de/dlyt/yanndroid/oneuiexample/AboutActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.dlyt.yanndroid.samsungexample;
1+
package de.dlyt.yanndroid.oneuiexample;
22

33
import android.content.res.Configuration;
44
import android.os.Bundle;
@@ -8,8 +8,8 @@
88

99
import com.google.android.material.button.MaterialButton;
1010

11-
import de.dlyt.yanndroid.samsung.ThemeColor;
12-
import de.dlyt.yanndroid.samsung.layout.AboutPage;
11+
import de.dlyt.yanndroid.oneui.ThemeColor;
12+
import de.dlyt.yanndroid.oneui.layout.AboutPage;
1313

1414
public class AboutActivity extends AppCompatActivity {
1515

app/src/main/java/de/dlyt/yanndroid/samsungexample/MainActivity.java renamed to app/src/main/java/de/dlyt/yanndroid/oneuiexample/MainActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.dlyt.yanndroid.samsungexample;
1+
package de.dlyt.yanndroid.oneuiexample;
22

33
import android.app.AlertDialog;
44
import android.content.Context;
@@ -25,12 +25,12 @@
2525
import java.util.ArrayList;
2626
import java.util.List;
2727

28-
import de.dlyt.yanndroid.samsung.ColorPickerDialog;
29-
import de.dlyt.yanndroid.samsung.SeekBar;
30-
import de.dlyt.yanndroid.samsung.SwitchBar;
31-
import de.dlyt.yanndroid.samsung.ThemeColor;
32-
import de.dlyt.yanndroid.samsung.drawer.OptionButton;
33-
import de.dlyt.yanndroid.samsung.layout.DrawerLayout;
28+
import de.dlyt.yanndroid.oneui.ColorPickerDialog;
29+
import de.dlyt.yanndroid.oneui.SeekBar;
30+
import de.dlyt.yanndroid.oneui.SwitchBar;
31+
import de.dlyt.yanndroid.oneui.ThemeColor;
32+
import de.dlyt.yanndroid.oneui.drawer.OptionButton;
33+
import de.dlyt.yanndroid.oneui.layout.DrawerLayout;
3434

3535
public class MainActivity extends AppCompatActivity {
3636

app/src/main/java/de/dlyt/yanndroid/samsungexample/SplashActivity.java renamed to app/src/main/java/de/dlyt/yanndroid/oneuiexample/SplashActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package de.dlyt.yanndroid.samsungexample;
1+
package de.dlyt.yanndroid.oneuiexample;
22

33
import android.content.Intent;
44
import android.os.Bundle;
@@ -8,7 +8,7 @@
88

99
import androidx.appcompat.app.AppCompatActivity;
1010

11-
import de.dlyt.yanndroid.samsung.layout.SplashViewAnimated;
11+
import de.dlyt.yanndroid.oneui.layout.SplashViewAnimated;
1212

1313
public class SplashActivity extends AppCompatActivity {
1414

app/src/main/res/layout/activity_about.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<de.dlyt.yanndroid.samsung.layout.AboutPage xmlns:android="http://schemas.android.com/apk/res/android"
2+
<de.dlyt.yanndroid.oneui.layout.AboutPage xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:id="@+id/about_page"
@@ -23,4 +23,4 @@
2323
style="@style/ButtonStyle.AboutPage"
2424
android:text="Update available" />
2525

26-
</de.dlyt.yanndroid.samsung.layout.AboutPage>
26+
</de.dlyt.yanndroid.oneui.layout.AboutPage>

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<de.dlyt.yanndroid.samsung.layout.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<de.dlyt.yanndroid.oneui.layout.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:id="@+id/drawer_view"
@@ -17,4 +17,4 @@
1717

1818
<include layout="@layout/content_main" />
1919

20-
</de.dlyt.yanndroid.samsung.layout.DrawerLayout>
20+
</de.dlyt.yanndroid.oneui.layout.DrawerLayout>

0 commit comments

Comments
 (0)