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

Commit 60eeb63

Browse files
v.2.3.0 (#99)
* Update README.md * app/ToolbarLayout: fix selectMode subtitle visiblity in landscape (#74) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/ToolbarLayout: minor fixes (#75) * app/ToolbarLayout: remove resetAppBarHeight this one is useless since SamsungAppBarLayout already does that for us Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SamsungAppBarLayout: add setDragCallback Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/ToolbarLayout: fix expanded attr Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/strings: burp Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: OneUI 4 Dialogs (#76) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/oneuiexample: custom dialog button color/progressbar (#77) * app/oneuiexample: custom dialog button color Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/oneuiexample: add dialog progressbar in sample app Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/Dialogs: replace SpenColorPicker with androidx.picker3.SeslColorPicker, fix dim amount in night mode (#78) * app/Dialog: fix dim amount in night mode Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SeslColorPicker: unify classic and detailed picker Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * dialogbutton color & progressbar * app: update RecyclerView, ViewPager, NestedScrollView; fix OUI4 Progress anim, spinner item text style (#79) TODO: fix RecyclerView nested scroll behavior Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: update AppBarLayout, rework folder hierarchy (#80) this fixes RecyclerView nested scroll, scroll behavior maybe needs some tuning Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SamsungAppBarLayout: Immersive scroll for pre-api30 (#81) * app/SamsungAppBarLayout: Immersive scroll for pre-api30 Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SeslImmersiveScrollBehavior: Immersive scroll for pre-api30 Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - IndexScrollView - ToolbarLayout SearchModeListener: interface > class - more translations * - minor changes * - toolbarlayout improvments * app/ToolbarLayout: rework (#83) * Revert "- toolbarlayout improvments" This reverts commit c970375. * app/AppBarLayout: minor adjustment Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: better xml naming Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/AboutPage: add expandable appbar Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/ToolbarLayout: rework Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - fixes, cleanup, toolbar improvments * - app:layout_location="root" params fix * - app:layout_location="root" params fix * app: SamsungCollapsingToolbarLayout update (#84) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/DetailedColorPicker: fix bugs, refine ui (#85) * app/DetailedColorPicker: fix bugs, refine ui Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SamsungCollapsingToolbarLayout: burp Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - minor changes * Revert "app/SamsungCollapsingToolbarLayout: burp" (#86) This reverts commit 9614386. * app: SamsungCoordinatingLayout update (#88) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/DetailedColorPicker: fix crashes (#89) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: SamsungTabLayout update (#90) * app: SamsungTabLayout update -unified TabLayout & BNV -added SESL_AUTO modes for managing tab width/scroll -add badges in tabs Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/oneuiexample: tablayout badge demo Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - sample app rtl fixes * app: add ViewPager2, TabLayoutMediator, TipPopup (#91) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - minor improvements - readme cleanup * - readme update * app: minor fixes (#92) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - readme update * app/ViewPager2: add seslGetListView (#93) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: update Preferences (#94) Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * - preference fixes * - minor changes * app/oneuiexample: OUI4 themed app icon (#95) * app/oneuiexample: OUI4 themed app icon Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/themes: disable A12 SplashScreen Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/PopupMenu: add blur effect support for OUI 4 devices (#96) * app/PopupMenu: add blur effect support for OUI 4 devices Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/PopupMenu: enable blur effect by default only with OUI4 theme set Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: OUI4 SeekBar, EditText (#97) * app: OUI4 SeekBar style Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/SeslColorPicker: fix seekbars Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/ColorPickerPreference: fix multiple clicks Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/EditText: OUI4 drawables Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app/PopupMenu: burp Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * app: ProgressBar & SeekBar rework (#98) please notice that expand paint fix is not there anymore+vertical seekbars are buggy Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com> * seekbar fix: - thumb color - thumb, track, progress position - padding - dpi - horizontal indeterminate oui4 color - horizontal oui4 warning * - v2.3.0 - minor app changes * - removed sesl4_seekbar_overlap_color_default * - apk Co-authored-by: BlackMesa123 <giangrecosalvo9@gmail.com>
1 parent 1611e39 commit 60eeb63

File tree

848 files changed

+57318
-45636
lines changed

Some content is hidden

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

848 files changed

+57318
-45636
lines changed

README.md

Lines changed: 17 additions & 1385 deletions
Large diffs are not rendered by default.

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ android {
5151

5252
dependencies {
5353

54-
implementation 'androidx.appcompat:appcompat:1.4.0'
55-
implementation 'com.google.android.material:material:1.4.0'
56-
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
54+
implementation 'androidx.appcompat:appcompat:1.4.1'
55+
implementation 'com.google.android.material:material:1.5.0'
56+
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
5757
implementation project(path: ':yanndroid:oneui')
5858
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
59-
testImplementation 'junit:junit:4.+'
59+
testImplementation 'junit:junit:4.13.2'
6060
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
6161
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6262
}

app/release/app-release.apk

2.93 MB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 56,
15-
"versionName": "2.2.1",
14+
"versionCode": 57,
15+
"versionName": "2.3.0",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
<meta-data
1616
android:name="com.samsung.android.icon_container.has_icon_container"
1717
android:value="true" />
18-
<meta-data
19-
android:name="com.samsung.android.icon_container.feature_appicon"
20-
android:value="ADAPTIVEICON_SHADOW" />
2118

2219
<activity android:name=".SwitchBarActivity" />
2320
<activity
@@ -30,6 +27,9 @@
3027
android:name=".SplashActivity"
3128
android:theme="@style/OneUISplashTheme"
3229
android:exported="true">
30+
<meta-data
31+
android:name="com.sec.android.app.launcher.icon_theme" android:value="themeColor"/>
32+
3333
<intent-filter>
3434
<action android:name="android.intent.action.MAIN" />
3535

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

Lines changed: 107 additions & 96 deletions
Large diffs are not rendered by default.

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
import android.content.Context;
44
import android.content.SharedPreferences;
55
import android.os.Bundle;
6+
import android.view.View;
67
import android.widget.Toast;
78

89
import de.dlyt.yanndroid.oneui.layout.SwitchBarLayout;
910
import de.dlyt.yanndroid.oneui.layout.ToolbarLayout;
10-
import de.dlyt.yanndroid.oneui.view.Switch;
11-
import de.dlyt.yanndroid.oneui.view.SwitchBar;
11+
import de.dlyt.yanndroid.oneui.widget.Switch;
12+
import de.dlyt.yanndroid.oneui.widget.SwitchBar;
1213
import de.dlyt.yanndroid.oneuiexample.base.BaseThemeActivity;
1314

1415
public class SwitchBarActivity extends BaseThemeActivity implements SwitchBar.OnSwitchChangeListener {
@@ -20,16 +21,16 @@ protected void onCreate(Bundle savedInstanceState) {
2021
setContentView(R.layout.activity_switchbar);
2122

2223
SwitchBarLayout switchBarLayout = findViewById(R.id.switchbarlayout_switchbaractivity);
23-
ToolbarLayout toolbarLayout = switchBarLayout.getToolbarLayout();
24-
25-
toolbarLayout.inflateToolbarMenu(R.menu.switchpreferencescreen_menu);
26-
toolbarLayout.setOnToolbarMenuItemClickListener(item -> {
24+
switchBarLayout.setNavigationButtonTooltip(getString(R.string.sesl_navigate_up));
25+
switchBarLayout.setNavigationButtonOnClickListener(view -> onBackPressed());
26+
switchBarLayout.inflateToolbarMenu(R.menu.switchpreferencescreen_menu);
27+
switchBarLayout.setOnToolbarMenuItemClickListener(item -> {
2728
Toast.makeText(this, "Item clicked", Toast.LENGTH_SHORT).show();
2829
return true;
2930
});
3031

31-
switchBarLayout.getSwitchBar().setChecked(getSwitchBarDefaultStatus());
32-
switchBarLayout.getSwitchBar().addOnSwitchChangeListener(this);
32+
switchBarLayout.setChecked(getSwitchBarDefaultStatus());
33+
switchBarLayout.addOnSwitchChangeListener(this);
3334
}
3435

3536
private boolean getSwitchBarDefaultStatus() {

app/src/main/java/de/dlyt/yanndroid/oneuiexample/base/BaseThemeActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ protected void onCreate(Bundle savedInstanceState) {
2323

2424
int normalTheme = mUseOUI4Theme ? R.style.OneUI4Theme : R.style.OneUI3Theme;
2525
int altTheme = mUseOUI4Theme ? R.style.OneUI4AboutTheme : R.style.OneUI3AboutTheme;
26-
2726
setTheme(mUseAltTheme ? altTheme : normalTheme);
2827
new ThemeUtil(this);
2928

3029
super.onCreate(savedInstanceState);
30+
31+
int normalThemeNavBar = mUseOUI4Theme ? R.color.sesl4_round_and_bgcolor : R.color.sesl_round_and_bgcolor;
32+
int altThemeNavBar = R.color.splash_background;
33+
getWindow().setNavigationBarColor(getResources().getColor(mUseAltTheme ? altThemeNavBar : normalThemeNavBar));
3134
}
3235

3336
protected void switchOUITheme() {

app/src/main/java/de/dlyt/yanndroid/oneuiexample/fragments/MainActivityFirstFragment.java

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
import android.view.View;
77
import android.view.ViewGroup;
88

9+
import androidx.annotation.NonNull;
910
import androidx.fragment.app.Fragment;
1011

11-
import de.dlyt.yanndroid.oneui.view.TabLayout;
12-
import de.dlyt.yanndroid.oneui.view.ViewPager;
12+
import com.google.android.material.floatingactionbutton.FloatingActionButton;
13+
14+
import de.dlyt.yanndroid.oneui.sesl.tabs.SamsungTabLayout;
15+
import de.dlyt.yanndroid.oneui.sesl.tabs.TabLayoutMediator;
16+
import de.dlyt.yanndroid.oneui.sesl.viewpager2.widget.SeslViewPager2;
17+
import de.dlyt.yanndroid.oneui.view.ViewPager2;
18+
import de.dlyt.yanndroid.oneui.widget.TabLayout;
1319
import de.dlyt.yanndroid.oneuiexample.R;
1420
import de.dlyt.yanndroid.oneuiexample.base.BaseThemeActivity;
15-
import de.dlyt.yanndroid.oneuiexample.tabs.ViewPagerAdapter;
21+
import de.dlyt.yanndroid.oneuiexample.tabs.ViewPager2Adapter;
1622

1723
public class MainActivityFirstFragment extends Fragment {
18-
1924
private BaseThemeActivity mActivity;
2025
private Context mContext;
2126
private View mRootView;
@@ -40,11 +45,48 @@ public void onViewCreated(View view, Bundle savedInstanceState) {
4045
getView().setBackgroundColor(getResources().getColor(mActivity.mUseOUI4Theme ? R.color.sesl4_round_and_bgcolor : R.color.sesl_round_and_bgcolor));
4146

4247
// TabLayout and ViewPager
43-
TabLayout tabLayout = mRootView.findViewById(R.id.tabLayout);
44-
ViewPager viewPager = mRootView.findViewById(R.id.viewPager);
45-
viewPager.setAdapter(new ViewPagerAdapter(getChildFragmentManager()));
46-
tabLayout.setupWithViewPager(viewPager);
47-
tabLayout.updateWidget();
48+
FloatingActionButton fab = mActivity.findViewById(R.id.sesl_fab);
49+
TabLayout subTabs = mRootView.findViewById(R.id.sub_tabs);
50+
subTabs.seslSetSubTabStyle();
51+
ViewPager2 viewPager2 = mRootView.findViewById(R.id.viewPager2);
52+
viewPager2.setAdapter(new ViewPager2Adapter(this));
53+
viewPager2.registerOnPageChangeCallback(new SeslViewPager2.OnPageChangeCallback() {
54+
@Override
55+
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
56+
if (position == 0) {
57+
fab.show();
58+
} else {
59+
fab.hide();
60+
}
61+
}
62+
63+
@Override
64+
public void onPageSelected(int position) {
65+
if (position == 0) {
66+
fab.show();
67+
} else {
68+
fab.hide();
69+
}
70+
}
71+
72+
@Override
73+
public void onPageScrollStateChanged(int state) {
74+
if (state == ViewPager2.SCROLL_STATE_IDLE && viewPager2.getCurrentItem() == 0) {
75+
fab.show();
76+
} else {
77+
fab.hide();
78+
}
79+
}
80+
});
81+
82+
TabLayoutMediator tlm = new TabLayoutMediator(subTabs, viewPager2, new TabLayoutMediator.TabConfigurationStrategy() {
83+
@Override
84+
public void onConfigureTab(@NonNull SamsungTabLayout.Tab tab, int position) {
85+
String[] tabTitle = {"Views", "Icons", "Nothing"};
86+
tab.setText(tabTitle[position]);
87+
}
88+
});
89+
tlm.attach();
4890
}
4991

5092
}

app/src/main/java/de/dlyt/yanndroid/oneuiexample/fragments/MainActivitySecondFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import android.content.SharedPreferences;
55
import android.os.Bundle;
66
import android.view.View;
7+
import android.widget.Toast;
78

89
import androidx.appcompat.util.SeslMisc;
910

@@ -56,6 +57,11 @@ public void onCancelClicked(View view) {
5657
parent.removePreference(findPreference("spacing"));
5758
}
5859
}
60+
61+
@Override
62+
public void onViewClicked(View view) {
63+
Toast.makeText(mContext, "TipsCardView clicked", Toast.LENGTH_SHORT).show();
64+
}
5965
});
6066

6167
HorizontalRadioPreference darkModePref = (HorizontalRadioPreference) findPreference("dark_mode");

0 commit comments

Comments
 (0)