move to MaterialComponents theme / adjustments
This commit is contained in:
parent
50fdb1f455
commit
13de29f593
10 changed files with 116 additions and 68 deletions
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:color="#88c0c0c0" />
|
||||
<item android:color="#ffc0c0c0"/>
|
||||
<item android:state_enabled="false" android:color="#BDBDBD" />
|
||||
<item android:color="#212121"/>
|
||||
</selector>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:color="#BDBDBD" />
|
||||
<item android:color="#F5F5F5"/>
|
||||
</selector>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<solid android:color="@color/material_grey_100"/>
|
||||
<corners android:radius="32dp"/>
|
||||
</shape>
|
|
@ -9,28 +9,32 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="@dimen/abc_dialog_padding_material"
|
||||
android:layout_marginRight="@dimen/abc_dialog_padding_material"
|
||||
android:layout_marginTop="@dimen/abc_dialog_padding_material"
|
||||
android:layout_marginRight="@dimen/abc_dialog_padding_material"
|
||||
android:layout_marginBottom="@dimen/abc_dialog_padding_material"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_nextcloud_logo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/nextcloud_logo"/>
|
||||
android:src="@drawable/nextcloud_logo" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSingleSignOn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/rounded_button"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="Login using Nextcloud Files App" />
|
||||
android:layout_marginTop="32dp"
|
||||
android:padding="16dp"
|
||||
android:text="Login using Nextcloud Files App"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/nextcloudBlue"
|
||||
android:textAllCaps="false"
|
||||
app:backgroundTint="@android:color/white"
|
||||
app:cornerRadius="24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_manual_login"
|
||||
|
@ -39,8 +43,8 @@
|
|||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/material_grey_100"
|
||||
android:text="Manual login"/>
|
||||
android:text="Manual login"
|
||||
android:textColor="@color/material_grey_100" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/old_login_wrapper"
|
||||
|
@ -49,45 +53,44 @@
|
|||
android:visibility="gone">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/username_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/username_container"
|
||||
android:layout_marginTop="8dp"
|
||||
app:counterOverflowTextColor="@android:color/white">
|
||||
app:counterOverflowTextColor="@android:color/white"
|
||||
android:theme="@style/TextInputLayoutAppearance">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/username"
|
||||
android:gravity="start"
|
||||
android:textAlignment="viewStart"
|
||||
android:inputType="textEmailAddress"
|
||||
android:hint="@string/pref_title_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/material_grey_100"
|
||||
android:textColorHint="@android:color/white" />
|
||||
android:gravity="start"
|
||||
android:hint="@string/pref_title_username"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/TextInputEditTextLogin"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/password_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/username_container"
|
||||
android:layout_alignParentStart="true"
|
||||
android:id="@+id/password_container"
|
||||
app:counterOverflowTextColor="@android:color/white">
|
||||
app:counterOverflowTextColor="@android:color/white"
|
||||
android:theme="@style/TextInputLayoutAppearance">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:textAlignment="viewStart"
|
||||
android:hint="@string/pref_title_password"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/material_grey_100"
|
||||
android:textColorHint="@android:color/white"/>
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/TextInputEditTextLogin"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -97,22 +100,24 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/password_container"
|
||||
android:layout_alignParentStart="true"
|
||||
app:counterOverflowTextColor="@android:color/white">
|
||||
app:counterOverflowTextColor="@android:color/white"
|
||||
android:theme="@style/TextInputLayoutAppearance"
|
||||
style="@style/TextInputEditTextLogin">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edt_owncloudRootPath"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="start"
|
||||
android:textAlignment="viewStart"
|
||||
android:hint="@string/pref_title_owncloudRootPath"
|
||||
android:inputType="textUri"
|
||||
android:maxLines="1"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
android:title="@string/pref_default_owncloudRootPath"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/material_grey_100"
|
||||
android:textColorHint="@android:color/white"/>
|
||||
android:textAlignment="viewStart"
|
||||
style="@style/TextInputEditTextLogin"
|
||||
android:theme="@style/TextInputEditTextLogin"
|
||||
android:title="@string/pref_default_owncloudRootPath" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
@ -120,36 +125,39 @@
|
|||
android:id="@+id/imgView_ShowPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/password_container"
|
||||
android:layout_alignEnd="@+id/password_container"
|
||||
android:layout_alignBottom="@+id/password_container"
|
||||
android:layout_gravity="end"
|
||||
android:contentDescription="@string/content_desc_show_password"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:src="@drawable/ic_action_visibility"
|
||||
android:layout_alignTop="@+id/password_container"
|
||||
android:layout_alignBottom="@+id/password_container"
|
||||
android:layout_alignEnd="@+id/password_container"
|
||||
android:contentDescription="@string/content_desc_show_password"/>
|
||||
android:src="@drawable/ic_action_visibility" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
<CheckBox
|
||||
android:id="@+id/cb_AllowAllSSLCertificates"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pref_title_DisableHostnameVerification"
|
||||
android:layout_below="@+id/url_container"
|
||||
android:text="@string/pref_title_DisableHostnameVerification"
|
||||
android:textColor="@color/material_grey_100"
|
||||
app:buttonTint="@color/material_grey_300"/>
|
||||
app:buttonTint="@color/material_grey_300" />
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnLogin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/rounded_button"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_below="@id/cb_AllowAllSSLCertificates"
|
||||
android:text="@string/action_sign_in_short" />
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:padding="16dp"
|
||||
android:text="@string/action_sign_in_short"
|
||||
android:textColor="@android:color/black"
|
||||
android:textAllCaps="false"
|
||||
app:backgroundTint="@android:color/white"
|
||||
app:cornerRadius="24dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="Import OPML"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -86,6 +87,7 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="Export OPML"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<color name="divider_row_color">#292929</color>
|
||||
|
||||
<color name="options_menu_item_text">@color/options_menu_item</color>
|
||||
<color name="options_menu_item_text">@color/options_menu_item_night</color>
|
||||
|
||||
<!-- Color of slide up panel in closed state -->
|
||||
<color name="slide_up_panel_header_background_color">#ff343434</color>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</style>
|
||||
|
||||
|
||||
<style name="AppTheme.Base" parent="Theme.AppCompat.DayNight">
|
||||
<style name="AppTheme.Base" parent="Theme.MaterialComponents.DayNight">
|
||||
<item name="android:windowBackground">@color/rss_item_list_background</item>
|
||||
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
|
@ -44,9 +44,48 @@
|
|||
<item name="news_detail_background_color">@color/news_detail_background_color</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarTheme" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<style name="ToolbarTheme" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar">
|
||||
<item name="android:textColor">@color/options_menu_item_text</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style name="TextInputEditTextLogin" parent="ThemeOverlay.MaterialComponents.TextInputEditText">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
|
||||
<item name="colorPrimary">@android:color/white</item>
|
||||
<item name="colorPrimaryDark">@android:color/white</item>
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextInputLayoutAppearance" parent="Base.Widget.MaterialComponents.TextInputLayout">
|
||||
<item name="android:textCursorDrawable">@null</item>
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
|
||||
<item name="hintTextAppearance">@style/HintText</item>
|
||||
<item name="errorTextAppearance">@style/ErrorText</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textColorHint">@android:color/white</item>
|
||||
|
||||
<item name="colorPrimary">@android:color/white</item>
|
||||
<item name="colorPrimaryDark">@android:color/white</item>
|
||||
<item name="colorAccent">@android:color/white</item>
|
||||
<item name="colorControlNormal">@android:color/white</item>
|
||||
<item name="colorControlActivated">@android:color/white</item>
|
||||
<item name="colorControlHighlight">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<style name="ErrorText" parent="TextAppearance.AppCompat">
|
||||
<item name="android:textColor">@color/material_red_600</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="HintText" parent="TextAppearance.AppCompat">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue