From 13de29f5930e1224baddea4cbc136ad2d8472b92 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Tue, 9 Apr 2019 15:59:41 -0300 Subject: [PATCH] move to MaterialComponents theme / adjustments --- News-Android-App/build.gradle | 4 +- .../LoginDialogActivity.java | 2 - .../owncloudnewsreader/PodcastFragment.java | 4 +- .../src/main/res/color/options_menu_item.xml | 4 +- .../res/color/options_menu_item_night.xml | 6 + .../src/main/res/drawable/rounded_button.xml | 5 - .../main/res/layout/activity_login_dialog.xml | 112 ++++++++++-------- .../src/main/res/layout/activity_new_feed.xml | 2 + .../src/main/res/values-night/colors.xml | 2 +- .../src/main/res/values/themes.xml | 43 ++++++- 10 files changed, 116 insertions(+), 68 deletions(-) create mode 100644 News-Android-App/src/main/res/color/options_menu_item_night.xml delete mode 100644 News-Android-App/src/main/res/drawable/rounded_button.xml diff --git a/News-Android-App/build.gradle b/News-Android-App/build.gradle index 8257a5c4..bcf74417 100644 --- a/News-Android-App/build.gradle +++ b/News-Android-App/build.gradle @@ -133,11 +133,11 @@ dependencies { // https://mvnrepository.com/artifact/androidx.legacy/legacy-support-v4 implementation "androidx.legacy:legacy-support-v4:1.0.0" implementation "androidx.core:core:1.1.0-alpha05" - implementation "androidx.appcompat:appcompat:1.1.0-alpha02" + implementation "androidx.appcompat:appcompat:1.1.0-alpha04" implementation "androidx.preference:preference:1.0.0" // https://mvnrepository.com/artifact/com.google.android.material/material - implementation "com.google.android.material:material:1.1.0-alpha04" + implementation "com.google.android.material:material:1.1.0-alpha05" implementation "androidx.palette:palette:1.0.0" implementation "androidx.recyclerview:recyclerview:1.1.0-alpha3" implementation "androidx.browser:browser:1.0.0" diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogActivity.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogActivity.java index f429719f..ca5e82a2 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogActivity.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/LoginDialogActivity.java @@ -37,7 +37,6 @@ import android.text.method.LinkMovementMethod; import android.text.util.Linkify; import android.util.Log; import android.view.View; -import android.widget.Button; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; @@ -109,7 +108,6 @@ public class LoginDialogActivity extends AppCompatActivity { protected @BindView(R.id.edt_owncloudRootPath) EditText mOc_root_path_View; protected @BindView(R.id.cb_AllowAllSSLCertificates) CheckBox mCbDisableHostnameVerificationView; protected @BindView(R.id.imgView_ShowPassword) ImageView mImageViewShowPwd; - protected @BindView(R.id.btnSingleSignOn) Button mBtnSingleSignOn; protected @BindView(R.id.tv_manual_login) TextView mTvManualLogin; protected @BindView(R.id.old_login_wrapper) RelativeLayout mOldLoginWrapper; diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/PodcastFragment.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/PodcastFragment.java index 87afc075..cde1253d 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/PodcastFragment.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/PodcastFragment.java @@ -74,6 +74,7 @@ public class PodcastFragment extends Fragment { private int lastDrawableId; private OnFragmentInteractionListener mListener; + private PodcastSlidingUpPanelLayout sliding_layout; /** * Use this factory method to create a new instance of @@ -295,11 +296,10 @@ public class PodcastFragment extends Fragment { showPlaybackSpeedPicker(); } - PodcastSlidingUpPanelLayout sliding_layout; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // create ContextThemeWrapper from the original Activity Context with the custom theme - Context context = new ContextThemeWrapper(getActivity(), R.style.Theme_AppCompat_Light_DarkActionBar); + Context context = new ContextThemeWrapper(getActivity(), R.style.Theme_MaterialComponents_Light_DarkActionBar); // clone the inflater using the ContextThemeWrapper LayoutInflater localInflater = inflater.cloneInContext(context); // inflate using the cloned inflater, not the passed in default diff --git a/News-Android-App/src/main/res/color/options_menu_item.xml b/News-Android-App/src/main/res/color/options_menu_item.xml index 214097c0..158d53c6 100644 --- a/News-Android-App/src/main/res/color/options_menu_item.xml +++ b/News-Android-App/src/main/res/color/options_menu_item.xml @@ -1,6 +1,6 @@ - - + + diff --git a/News-Android-App/src/main/res/color/options_menu_item_night.xml b/News-Android-App/src/main/res/color/options_menu_item_night.xml new file mode 100644 index 00000000..42fdf034 --- /dev/null +++ b/News-Android-App/src/main/res/color/options_menu_item_night.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/News-Android-App/src/main/res/drawable/rounded_button.xml b/News-Android-App/src/main/res/drawable/rounded_button.xml deleted file mode 100644 index 07bc2dc3..00000000 --- a/News-Android-App/src/main/res/drawable/rounded_button.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/News-Android-App/src/main/res/layout/activity_login_dialog.xml b/News-Android-App/src/main/res/layout/activity_login_dialog.xml index bbce1efa..95b42326 100644 --- a/News-Android-App/src/main/res/layout/activity_login_dialog.xml +++ b/News-Android-App/src/main/res/layout/activity_login_dialog.xml @@ -9,28 +9,32 @@ + android:orientation="vertical"> + android:src="@drawable/nextcloud_logo" /> -