Deprecation TimeListEdit - add design support libraries
This commit is contained in:
parent
a4591af392
commit
0ffddcdefa
2 changed files with 5 additions and 4 deletions
|
@ -126,6 +126,8 @@ dependencies {
|
||||||
compile 'com.android.support:cardview-v7:23.4.0'
|
compile 'com.android.support:cardview-v7:23.4.0'
|
||||||
compile 'com.android.support:recyclerview-v7:23.4.0'
|
compile 'com.android.support:recyclerview-v7:23.4.0'
|
||||||
compile 'com.android.support:gridlayout-v7:23.4.0'
|
compile 'com.android.support:gridlayout-v7:23.4.0'
|
||||||
|
compile "com.android.support:design:23.4.0"
|
||||||
|
compile "com.android.support:percent:23.4.0"
|
||||||
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
|
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
|
||||||
compile 'com.squareup:otto:1.3.7'
|
compile 'com.squareup:otto:1.3.7'
|
||||||
compile 'com.j256.ormlite:ormlite-core:4.46'
|
compile 'com.j256.ormlite:ormlite-core:4.46'
|
||||||
|
|
|
@ -2,6 +2,8 @@ package info.nightscout.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.support.v4.widget.TextViewCompat;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.Layout;
|
import android.text.Layout;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
|
@ -74,10 +76,7 @@ public class TimeListEdit {
|
||||||
llp.setMargins(10, 0, 0, 0); // llp.setMargins(left, top, right, bottom);
|
llp.setMargins(10, 0, 0, 0); // llp.setMargins(left, top, right, bottom);
|
||||||
textlabel.setLayoutParams(llp);
|
textlabel.setLayoutParams(llp);
|
||||||
textlabel.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.linearBlockBackground));
|
textlabel.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.linearBlockBackground));
|
||||||
if (Build.VERSION.SDK_INT < 23)
|
TextViewCompat.setTextAppearance(textlabel, android.R.style.TextAppearance_Medium);
|
||||||
textlabel.setTextAppearance(context, android.R.style.TextAppearance_Medium);
|
|
||||||
else
|
|
||||||
textlabel.setTextAppearance(android.R.style.TextAppearance_Medium);
|
|
||||||
layout.addView(textlabel);
|
layout.addView(textlabel);
|
||||||
|
|
||||||
for (int i = 0; i < itemsCount(); i++) {
|
for (int i = 0; i < itemsCount(); i++) {
|
||||||
|
|
Loading…
Reference in a new issue