Deprecation TimeListEdit - add design support libraries

This commit is contained in:
viktoria 2017-02-11 14:01:37 +01:00
parent a4591af392
commit 0ffddcdefa
2 changed files with 5 additions and 4 deletions

View file

@ -126,6 +126,8 @@ dependencies {
compile 'com.android.support:cardview-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:design:23.4.0"
compile "com.android.support:percent:23.4.0"
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
compile 'com.squareup:otto:1.3.7'
compile 'com.j256.ormlite:ormlite-core:4.46'

View file

@ -2,6 +2,8 @@ package info.nightscout.utils;
import android.content.Context;
import android.os.Build;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.TextViewCompat;
import android.text.Editable;
import android.text.Layout;
import android.text.TextWatcher;
@ -74,10 +76,7 @@ public class TimeListEdit {
llp.setMargins(10, 0, 0, 0); // llp.setMargins(left, top, right, bottom);
textlabel.setLayoutParams(llp);
textlabel.setBackgroundColor(ContextCompat.getColor(MainApp.instance(), R.color.linearBlockBackground));
if (Build.VERSION.SDK_INT < 23)
textlabel.setTextAppearance(context, android.R.style.TextAppearance_Medium);
else
textlabel.setTextAppearance(android.R.style.TextAppearance_Medium);
TextViewCompat.setTextAppearance(textlabel, android.R.style.TextAppearance_Medium);
layout.addView(textlabel);
for (int i = 0; i < itemsCount(); i++) {