Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,12 @@ private void setCurrentItem() {
drawerLayout.setSubtitle("Design");
drawerLayout.setNavigationButtonVisible(true);
drawerLayout.getToolbarMenu().findItem(R.id.search).setVisible(true);
drawerLayout.setImmersiveScroll(false);
((androidx.drawerlayout.widget.DrawerLayout) drawerLayout.findViewById(R.id.drawerLayout)).setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_UNLOCKED);
} else {
// MainActivitySecondFragment
drawerLayout.setSubtitle("Preferences");
drawerLayout.setNavigationButtonVisible(false);
drawerLayout.getToolbarMenu().findItem(R.id.search).setVisible(false);
drawerLayout.setImmersiveScroll(true);
((androidx.drawerlayout.widget.DrawerLayout) drawerLayout.findViewById(R.id.drawerLayout)).setDrawerLockMode(androidx.drawerlayout.widget.DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import de.dlyt.yanndroid.oneui.layout.SwitchBarLayout;
import de.dlyt.yanndroid.oneui.layout.ToolbarLayout;
import de.dlyt.yanndroid.oneui.widget.Switch;
import de.dlyt.yanndroid.oneui.widget.SwitchBar;
import de.dlyt.yanndroid.oneuiexample.base.BaseThemeActivity;
Expand All @@ -20,6 +22,8 @@ protected void onCreate(Bundle savedInstanceState) {

SwitchBarLayout switchBarLayout = findViewById(R.id.switchbarlayout_switchbaractivity);

switchBarLayout.setNavigationButtonTooltip(getString(R.string.sesl_navigate_up));
switchBarLayout.setNavigationButtonOnClickListener(view -> onBackPressed());
switchBarLayout.inflateToolbarMenu(R.menu.switchpreferencescreen_menu);
switchBarLayout.setOnToolbarMenuItemClickListener(item -> {
Toast.makeText(this, "Item clicked", Toast.LENGTH_SHORT).show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
import java.util.List;

import de.dlyt.yanndroid.oneui.layout.DrawerLayout;
import de.dlyt.yanndroid.oneui.layout.ToolbarLayout;
import de.dlyt.yanndroid.oneui.sesl.recyclerview.LinearLayoutManager;
import de.dlyt.yanndroid.oneui.view.IndexScrollView;
import de.dlyt.yanndroid.oneui.view.RecyclerView;
import de.dlyt.yanndroid.oneui.view.ViewPager;
import de.dlyt.yanndroid.oneui.widget.BottomNavigationView;
import de.dlyt.yanndroid.oneui.view.IndexScrollView;
import de.dlyt.yanndroid.oneui.widget.TabLayout;
import de.dlyt.yanndroid.oneuiexample.R;

Expand Down Expand Up @@ -332,7 +333,7 @@ public void handleOnBackPressed() {


public void setSelecting(boolean enabled) {
DrawerLayout drawerLayout = getActivity().findViewById(R.id.drawer_view);
DrawerLayout drawerLayout = ((DrawerLayout) getActivity().findViewById(R.id.drawer_view));
TabLayout tabLayout = getActivity().findViewById(R.id.tabLayout);
BottomNavigationView bnv = getActivity().findViewById(R.id.main_samsung_tabs);
ViewPager viewPager = getActivity().findViewById(R.id.viewPager);
Expand Down Expand Up @@ -382,7 +383,7 @@ public void toggleItemSelected(int position) {
checkAllListening = false;
int count = 0;
for (Boolean b : selected.values()) if (b) count++;
DrawerLayout drawerLayout = getActivity().findViewById(R.id.drawer_view);
DrawerLayout drawerLayout = ((DrawerLayout) getActivity().findViewById(R.id.drawer_view));
drawerLayout.setSelectModeAllChecked(count == imageAdapter.getItemCount() - 1);
drawerLayout.setSelectModeCount(count);
checkAllListening = true;
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,4 @@

<include layout="@layout/content_drawer" />

<!--<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:layout_location="root"
app:srcCompat="@drawable/ic_samsung_favorite_on" />-->

</de.dlyt.yanndroid.oneui.layout.DrawerLayout>
2 changes: 2 additions & 0 deletions app/src/main/res/layout/activity_switchbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
android:id="@+id/switchbarlayout_switchbaractivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:toolbar_expanded="false"
app:toolbar_navigationIcon="@drawable/ic_samsung_back"
app:toolbar_title="SwitchBarLayout">

<de.dlyt.yanndroid.oneui.widget.RoundNestedScrollView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void handleMessage(Message msg) {

if (mProgressStyle == STYLE_CIRCLE_ONLY) {
int size = (int) ((70 * mContext.getResources().getDisplayMetrics().density));
getWindow().setBackgroundDrawableResource(mIsOneUI4 ? android.R.color.transparent : R.drawable.progress_circle_dialog_bg);
getWindow().setBackgroundDrawableResource(mIsOneUI4 ? android.R.color.transparent : R.drawable.oui_progress_circle_dialog_bg);
getWindow().setLayout(size, size);
getWindow().setGravity(Gravity.CENTER);
setContentView(inflater.inflate(R.layout.sesl_progress_dialog_circle_only, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.graphics.Typeface;
import android.net.Uri;
Expand Down Expand Up @@ -62,7 +63,7 @@ public AboutPage(Context context, @Nullable AttributeSet attrs) {
}

LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.samsung_about_screen, this, true);
inflater.inflate(R.layout.oui_about_screen, this, true);

toolbarLayout = findViewById(R.id.toolbar_layout);
about_content = findViewById(R.id.about_content);
Expand All @@ -76,6 +77,9 @@ public AboutPage(Context context, @Nullable AttributeSet attrs) {

setOptionalText(optional_text);
setUpdateState(update_state);

toolbarLayout.findViewById(R.id.toolbar_layout_app_bar).setBackgroundColor(getResources().getColor(R.color.splash_background));
toolbarLayout.findViewById(R.id.toolbar_layout_collapsing_toolbar_layout).setBackgroundColor(getResources().getColor(R.color.splash_background));

toolbarLayout.setNavigationButtonIcon(getResources().getDrawable(R.drawable.ic_samsung_back, context.getTheme()));
toolbarLayout.setNavigationButtonTooltip(getResources().getText(R.string.sesl_navigate_up));
Expand All @@ -86,7 +90,7 @@ public void onClick(View view) {
}
});

toolbarLayout.inflateToolbarMenu(R.menu.about_page);
toolbarLayout.inflateToolbarMenu(R.menu.oui_about_page);
if (mIsOneUI4) {
toolbarLayout.getToolbarMenu().findItem(R.id.app_info).setIcon(getResources().getDrawable(R.drawable.ic_samsung_info_2, context.getTheme()));
}
Expand Down
Loading