Make LinearColorBar support RTL

- Move the class to widget package
- Remove a bunch of useless drawing

Change-Id: I82f840819c89eaf3cf9b7a87e56f1031989e3262
Fixes: 62700884
Test:  robotest
This commit is contained in:
Fan Zhang
2018-01-17 10:38:49 -08:00
parent 85cd77c9f2
commit 7a6726ecda
8 changed files with 285 additions and 280 deletions

View File

@@ -21,7 +21,8 @@ import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import com.android.settings.applications.LinearColorBar;
import com.android.settings.widget.LinearColorBar;
/**
* Provides a summary of a setting page in a preference. Such as memory or data usage.
@@ -92,7 +93,7 @@ public class SummaryPreference extends Preference {
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
LinearColorBar colorBar = (LinearColorBar) holder.itemView.findViewById(R.id.color_bar);
final LinearColorBar colorBar = holder.itemView.findViewById(R.id.color_bar);
if (mChartEnabled) {
colorBar.setVisibility(View.VISIBLE);