Commit 59dd516e authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Download location: Change download location preference UI.

Previously we reused the spinner code in download location dialog, this
CL implements new UI in download location preference to use a custom
layout with radio button and text views.

We reuses the adapter to provide the underlying data used by the UI.

Bug: 842464,792775
Change-Id: Iaf68fa3e75d259c9c6e6fd6d79caa1845aaf18b3
Reviewed-on: https://chromium-review.googlesource.com/1062785
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560737}
parent 1fcbd883
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/location_preference_list_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:divider="@null"
android:dividerHeight="0dp" />
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/ListItemContainer"
android:orientation="horizontal"
android:baselineAligned="false"
android:padding="10dp" >
<android.widget.RadioButton
android:id="@+id/radio_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="16dp" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:layout_gravity="center_vertical" >
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="@style/BlackTitle3" />
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="@style/BlackSummary" />
</LinearLayout>
</LinearLayout>
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
found in the LICENSE file. --> found in the LICENSE file. -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<org.chromium.chrome.browser.preferences.download.DownloadLocationPreference
<org.chromium.chrome.browser.preferences.SpinnerPreference
android:key="location_change" android:key="location_change"
android:title="@string/downloads_location_selector_title" /> android:title="@string/downloads_location_selector_title"
android:positiveButtonText="@string/done"
android:negativeButtonText="@null" />
<org.chromium.chrome.browser.preferences.ChromeSwitchPreference <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
android:key="location_prompt_enabled" android:key="location_prompt_enabled"
...@@ -15,4 +16,4 @@ ...@@ -15,4 +16,4 @@
android:summaryOn="@string/text_on" android:summaryOn="@string/text_on"
android:summaryOff="@string/text_off" /> android:summaryOff="@string/text_off" />
</PreferenceScreen> </PreferenceScreen>
\ No newline at end of file
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.download;
import java.io.File;
/**
* Denotes a given option for directory selection; includes name, location, and space.
*/
public class DirectoryOption {
/**
* Name of the current download directory.
*/
public final String name;
/**
* The file location of download directory.
*/
public final File location;
/**
* The available space in this download directory.
*/
public final long availableSpace;
public DirectoryOption(String directoryName, File directoryLocation, long directorySpace) {
name = directoryName;
location = directoryLocation;
availableSpace = directorySpace;
}
}
...@@ -128,9 +128,8 @@ public class DownloadLocationDialog extends ModalDialogView { ...@@ -128,9 +128,8 @@ public class DownloadLocationDialog extends ModalDialogView {
@Nullable @Nullable
File getFileLocation() { File getFileLocation() {
if (mFileLocation == null) return null; if (mFileLocation == null) return null;
DownloadDirectoryAdapter.DirectoryOption selected = DirectoryOption selected = (DirectoryOption) mFileLocation.getSelectedItem();
(DownloadDirectoryAdapter.DirectoryOption) mFileLocation.getSelectedItem(); return selected.location;
return selected.getLocation();
} }
/** /**
......
...@@ -18,6 +18,7 @@ import android.widget.ArrayAdapter; ...@@ -18,6 +18,7 @@ import android.widget.ArrayAdapter;
import android.widget.TextView; import android.widget.TextView;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.download.DirectoryOption;
import org.chromium.chrome.browser.download.DownloadUtils; import org.chromium.chrome.browser.download.DownloadUtils;
import org.chromium.chrome.browser.preferences.PrefServiceBridge; import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.widget.TintedImageView; import org.chromium.chrome.browser.widget.TintedImageView;
...@@ -33,42 +34,6 @@ import java.util.List; ...@@ -33,42 +34,6 @@ import java.util.List;
public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
public static int NO_SELECTED_ITEM_ID = -1; public static int NO_SELECTED_ITEM_ID = -1;
/**
* Denotes a given option for directory selection; includes name, location, and space.
*/
public static class DirectoryOption {
private final String mName;
private final File mLocation;
private final long mAvailableSpace;
DirectoryOption(String directoryName, File directoryLocation, long availableSpace) {
mName = directoryName;
mLocation = directoryLocation;
mAvailableSpace = availableSpace;
}
/**
* @return File location associated with this directory option.
*/
public File getLocation() {
return mLocation;
}
/**
* @return Name associated with this directory option.
*/
public String getName() {
return mName;
}
/**
* @return Amount of available space in this directory option.
*/
long getAvailableSpace() {
return mAvailableSpace;
}
}
private Context mContext; private Context mContext;
private LayoutInflater mLayoutInflater; private LayoutInflater mLayoutInflater;
...@@ -125,7 +90,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { ...@@ -125,7 +90,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
if (directoryOption == null) return view; if (directoryOption == null) return view;
TextView titleText = (TextView) view.findViewById(R.id.text); TextView titleText = (TextView) view.findViewById(R.id.text);
titleText.setText(directoryOption.getName()); titleText.setText(directoryOption.name);
// ModalDialogView may do a measure pass on the view hierarchy to limit the layout inside // ModalDialogView may do a measure pass on the view hierarchy to limit the layout inside
// certain area, where LayoutParams cannot be null. // certain area, where LayoutParams cannot be null.
...@@ -150,14 +115,14 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { ...@@ -150,14 +115,14 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
if (directoryOption == null) return view; if (directoryOption == null) return view;
TextView titleText = (TextView) view.findViewById(R.id.title); TextView titleText = (TextView) view.findViewById(R.id.title);
titleText.setText(directoryOption.getName()); titleText.setText(directoryOption.name);
TextView summaryText = (TextView) view.findViewById(R.id.description); TextView summaryText = (TextView) view.findViewById(R.id.description);
if (isEnabled(position)) { if (isEnabled(position)) {
TextViewCompat.setTextAppearance(titleText, R.style.BlackTitle1); TextViewCompat.setTextAppearance(titleText, R.style.BlackTitle1);
TextViewCompat.setTextAppearance(summaryText, R.style.BlackBody); TextViewCompat.setTextAppearance(summaryText, R.style.BlackBody);
summaryText.setText(DownloadUtils.getStringForAvailableBytes( summaryText.setText(DownloadUtils.getStringForAvailableBytes(
mContext, directoryOption.getAvailableSpace())); mContext, directoryOption.availableSpace));
} else { } else {
TextViewCompat.setTextAppearance(titleText, R.style.BlackDisabledText1); TextViewCompat.setTextAppearance(titleText, R.style.BlackDisabledText1);
TextViewCompat.setTextAppearance(summaryText, R.style.BlackDisabledText3); TextViewCompat.setTextAppearance(summaryText, R.style.BlackDisabledText3);
...@@ -177,7 +142,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { ...@@ -177,7 +142,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
@Override @Override
public boolean isEnabled(int position) { public boolean isEnabled(int position) {
DirectoryOption directoryOption = (DirectoryOption) getItem(position); DirectoryOption directoryOption = (DirectoryOption) getItem(position);
return directoryOption != null && directoryOption.getAvailableSpace() != 0; return directoryOption != null && directoryOption.availableSpace != 0;
} }
/** /**
...@@ -190,7 +155,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { ...@@ -190,7 +155,7 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
for (int i = 0; i < getCount(); i++) { for (int i = 0; i < getCount(); i++) {
DirectoryOption option = (DirectoryOption) getItem(i); DirectoryOption option = (DirectoryOption) getItem(i);
if (option == null) continue; if (option == null) continue;
if (defaultLocation.equals(option.getLocation().getAbsolutePath())) return i; if (defaultLocation.equals(option.location.getAbsolutePath())) return i;
} }
return NO_SELECTED_ITEM_ID; return NO_SELECTED_ITEM_ID;
} }
...@@ -206,9 +171,9 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> { ...@@ -206,9 +171,9 @@ public class DownloadDirectoryAdapter extends ArrayAdapter<Object> {
for (int i = 0; i < getCount(); i++) { for (int i = 0; i < getCount(); i++) {
DirectoryOption option = (DirectoryOption) getItem(i); DirectoryOption option = (DirectoryOption) getItem(i);
if (option == null) continue; if (option == null) continue;
if (option.getAvailableSpace() > 0) { if (option.availableSpace > 0) {
PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory( PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
option.getLocation().getAbsolutePath()); option.location.getAbsolutePath());
return i; return i;
} }
} }
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.preferences.download;
import android.content.Context;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import org.chromium.chrome.R;
/**
* The preference used to save the download directory in download settings page.
*/
public class DownloadLocationPreference extends DialogPreference {
/**
* Provides data for the list of available download directories options.
*/
private DownloadLocationPreferenceAdapter mAdapter;
/**
* The view contains the list of download directories.
*/
private ListView mListView;
/**
* Constructor for DownloadLocationPreference.
*/
public DownloadLocationPreference(Context context, AttributeSet attrs) {
super(context, attrs);
mAdapter = new DownloadLocationPreferenceAdapter(context, this);
}
@Override
protected View onCreateDialogView() {
View view = LayoutInflater.from(getContext())
.inflate(R.layout.download_location_preference, null);
mListView = (ListView) (view.findViewById(R.id.location_preference_list_view));
mListView.setAdapter(mAdapter);
return view;
}
}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.preferences.download;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RadioButton;
import android.widget.TextView;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.download.DirectoryOption;
import org.chromium.chrome.browser.download.DownloadUtils;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
/**
* Class used to provide data shown in the download location preference in download settings page.
*/
public class DownloadLocationPreferenceAdapter
extends DownloadDirectoryAdapter implements OnClickListener {
private DownloadLocationPreference mPreference;
/**
* Constructor of DownloadLocationPreferenceAdapter.
*/
public DownloadLocationPreferenceAdapter(
Context context, DownloadLocationPreference preference) {
super(context);
mPreference = preference;
}
@Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
View view = convertView;
if (view == null) {
view = LayoutInflater.from(getContext())
.inflate(R.layout.download_location_preference_item, null);
}
view.setTag(position);
view.setOnClickListener(this);
boolean isSelected = (getSelectedItemId() == position);
RadioButton radioButton = view.findViewById(R.id.radio_button);
radioButton.setChecked(isSelected);
view.setEnabled(isEnabled(position));
DirectoryOption directoryOption = (DirectoryOption) getItem(position);
if (directoryOption == null) return view;
// TODO(xingliu): Refactor these to base class.
TextView titleText = (TextView) view.findViewById(R.id.title);
titleText.setText(directoryOption.name);
TextView summaryText = (TextView) view.findViewById(R.id.description);
if (isEnabled(position)) {
summaryText.setText(DownloadUtils.getStringForAvailableBytes(
getContext(), directoryOption.availableSpace));
} else {
radioButton.setEnabled(false);
titleText.setEnabled(false);
summaryText.setEnabled(false);
if (hasAvailableLocations()) {
summaryText.setText(
getContext().getText(R.string.download_location_not_enough_space));
} else {
summaryText.setVisibility(View.GONE);
}
}
return view;
}
@Override
public void onClick(View v) {
int selectedId = (int) v.getTag();
DirectoryOption option = (DirectoryOption) getItem(selectedId);
if (option == null) return;
// Update the native pref, which persists the download directory selected by the user.
PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
option.location.getAbsolutePath());
// Update the android pref and update the summary in download settings page.
SharedPreferences.Editor editor = ContextUtils.getAppSharedPreferences().edit();
editor.putString(
DownloadPreferences.PREF_LOCATION_CHANGE, option.location.getAbsolutePath());
editor.apply();
mPreference.setSummary(option.location.getAbsolutePath());
// Refresh the list of download directories UI.
notifyDataSetChanged();
}
}
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
package org.chromium.chrome.browser.preferences.download; package org.chromium.chrome.browser.preferences.download;
import static org.chromium.chrome.browser.preferences.download.DownloadDirectoryAdapter.NO_SELECTED_ITEM_ID;
import android.database.DataSetObserver;
import android.os.Bundle; import android.os.Bundle;
import android.preference.Preference; import android.preference.Preference;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;
...@@ -17,18 +14,16 @@ import org.chromium.chrome.browser.download.DownloadPromptStatus; ...@@ -17,18 +14,16 @@ import org.chromium.chrome.browser.download.DownloadPromptStatus;
import org.chromium.chrome.browser.preferences.ChromeSwitchPreference; import org.chromium.chrome.browser.preferences.ChromeSwitchPreference;
import org.chromium.chrome.browser.preferences.PrefServiceBridge; import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.preferences.PreferenceUtils; import org.chromium.chrome.browser.preferences.PreferenceUtils;
import org.chromium.chrome.browser.preferences.SpinnerPreference;
/** /**
* Fragment to keep track of all downloads related preferences. * Fragment to keep track of all downloads related preferences.
*/ */
public class DownloadPreferences public class DownloadPreferences
extends PreferenceFragment implements Preference.OnPreferenceChangeListener { extends PreferenceFragment implements Preference.OnPreferenceChangeListener {
private static final String PREF_LOCATION_CHANGE = "location_change"; public static final String PREF_LOCATION_CHANGE = "location_change";
private static final String PREF_LOCATION_PROMPT_ENABLED = "location_prompt_enabled"; private static final String PREF_LOCATION_PROMPT_ENABLED = "location_prompt_enabled";
private SpinnerPreference mLocationChangePref; private DownloadLocationPreference mLocationChangePref;
private DownloadDirectoryAdapter mDirectoryAdapter;
private ChromeSwitchPreference mLocationPromptEnabledPref; private ChromeSwitchPreference mLocationPromptEnabledPref;
@Override @Override
...@@ -42,20 +37,7 @@ public class DownloadPreferences ...@@ -42,20 +37,7 @@ public class DownloadPreferences
(ChromeSwitchPreference) findPreference(PREF_LOCATION_PROMPT_ENABLED); (ChromeSwitchPreference) findPreference(PREF_LOCATION_PROMPT_ENABLED);
mLocationPromptEnabledPref.setOnPreferenceChangeListener(this); mLocationPromptEnabledPref.setOnPreferenceChangeListener(this);
mLocationChangePref = (SpinnerPreference) findPreference(PREF_LOCATION_CHANGE); mLocationChangePref = (DownloadLocationPreference) findPreference(PREF_LOCATION_CHANGE);
mLocationChangePref.setOnPreferenceChangeListener(this);
mDirectoryAdapter = new DownloadDirectoryAdapter(getActivity());
int selectedItemId = mDirectoryAdapter.getSelectedItemId();
if (selectedItemId == NO_SELECTED_ITEM_ID) {
selectedItemId = mDirectoryAdapter.getFirstSelectableItemId();
}
mDirectoryAdapter.registerDataSetObserver(new DataSetObserver() {
@Override
public void onChanged() {
mLocationChangePref.setEnabled(mDirectoryAdapter.hasAvailableLocations());
}
});
mLocationChangePref.setAdapter(mDirectoryAdapter, selectedItemId);
updateData(); updateData();
} }
...@@ -68,11 +50,12 @@ public class DownloadPreferences ...@@ -68,11 +50,12 @@ public class DownloadPreferences
private void updateData() { private void updateData() {
if (mLocationChangePref != null) { if (mLocationChangePref != null) {
mDirectoryAdapter.notifyDataSetChanged(); mLocationChangePref.setSummary(
PrefServiceBridge.getInstance().getDownloadDefaultDirectory());
} }
if (mLocationPromptEnabledPref != null) { if (mLocationPromptEnabledPref != null) {
// Location prompt is marked enabled if the prompt status is not don't show. // Location prompt is marked enabled if the prompt status is not DONT_SHOW.
boolean isLocationPromptEnabled = boolean isLocationPromptEnabled =
PrefServiceBridge.getInstance().getPromptForDownloadAndroid() PrefServiceBridge.getInstance().getPromptForDownloadAndroid()
!= DownloadPromptStatus.DONT_SHOW; != DownloadPromptStatus.DONT_SHOW;
...@@ -96,14 +79,6 @@ public class DownloadPreferences ...@@ -96,14 +79,6 @@ public class DownloadPreferences
PrefServiceBridge.getInstance().setPromptForDownloadAndroid( PrefServiceBridge.getInstance().setPromptForDownloadAndroid(
DownloadPromptStatus.DONT_SHOW); DownloadPromptStatus.DONT_SHOW);
} }
} else if (PREF_LOCATION_CHANGE.equals(preference.getKey())) {
DownloadDirectoryAdapter.DirectoryOption option =
(DownloadDirectoryAdapter.DirectoryOption) newValue;
if (option.getLocation() != null) {
PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
option.getLocation().getAbsolutePath());
updateData();
}
} }
return true; return true;
} }
......
...@@ -387,6 +387,7 @@ chrome_java_sources = [ ...@@ -387,6 +387,7 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java", "java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java",
"java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTabInfo.java", "java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeTabInfo.java",
"java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java", "java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java",
"java/src/org/chromium/chrome/browser/download/DirectoryOption.java",
"java/src/org/chromium/chrome/browser/download/DownloadActivity.java", "java/src/org/chromium/chrome/browser/download/DownloadActivity.java",
"java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java", "java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java",
"java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java", "java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java",
...@@ -1047,6 +1048,8 @@ chrome_java_sources = [ ...@@ -1047,6 +1048,8 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java", "java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java",
"java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionDataUseItem.java", "java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionDataUseItem.java",
"java/src/org/chromium/chrome/browser/preferences/download/DownloadDirectoryAdapter.java", "java/src/org/chromium/chrome/browser/preferences/download/DownloadDirectoryAdapter.java",
"java/src/org/chromium/chrome/browser/preferences/download/DownloadLocationPreference.java",
"java/src/org/chromium/chrome/browser/preferences/download/DownloadLocationPreferenceAdapter.java",
"java/src/org/chromium/chrome/browser/preferences/download/DownloadPreferences.java", "java/src/org/chromium/chrome/browser/preferences/download/DownloadPreferences.java",
"java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java", "java/src/org/chromium/chrome/browser/preferences/languages/AddLanguageFragment.java",
"java/src/org/chromium/chrome/browser/preferences/languages/LanguagesManager.java", "java/src/org/chromium/chrome/browser/preferences/languages/LanguagesManager.java",
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/black_alpha_54" android:state_enabled="true"/>
<item android:color="@color/black_alpha_38" android:state_enabled="false"/>
<item android:color="@color/black_alpha_54" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/black_alpha_87" android:state_enabled="true"/>
<item android:color="@color/black_alpha_38" android:state_enabled="false"/>
<item android:color="@color/black_alpha_87" />
</selector>
\ No newline at end of file
...@@ -63,6 +63,11 @@ ...@@ -63,6 +63,11 @@
<item name="android:textColor">@color/black_alpha_87</item> <item name="android:textColor">@color/black_alpha_87</item>
<item name="android:textSize">@dimen/text_size_medium</item> <item name="android:textSize">@dimen/text_size_medium</item>
</style> </style>
<!-- TODO(xingliu): Merge BlackTitle3 to BlackTitle1. -->
<style name="BlackTitle3" tools:ignore="UnusedResources">
<item name="android:textColor">@color/black_title_color_list</item>
<item name="android:textSize">@dimen/text_size_large</item>
</style>
<style name="BlackHint1" tools:ignore="UnusedResources"> <style name="BlackHint1" tools:ignore="UnusedResources">
<item name="android:textColor">@color/black_alpha_54</item> <item name="android:textColor">@color/black_alpha_54</item>
<item name="android:textSize">@dimen/text_size_large</item> <item name="android:textSize">@dimen/text_size_large</item>
...@@ -108,6 +113,10 @@ ...@@ -108,6 +113,10 @@
<item name="android:textSize">@dimen/text_size_medium</item> <item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textStyle">bold</item> <item name="android:textStyle">bold</item>
</style> </style>
<style name="BlackSummary" tools:ignore="UnusedResources">
<item name="android:textColor">@color/black_summary_color_list</item>
<item name="android:textSize">@dimen/text_size_medium</item>
</style>
<!-- White Text Styles --> <!-- White Text Styles -->
<style name="WhiteHeadline1" tools:ignore="UnusedResources"> <style name="WhiteHeadline1" tools:ignore="UnusedResources">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment