Commit 36beae3a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

bump tools

* gradle 2.14.1
* gradle plugin 2.2.0
* build tools 24.0.2
* support library 24.2.+
* target sdk 24

Change-Id: Ie327d2ea305ad31fd2771577bbd325d1a3ca4a72
parent df37a36b
......@@ -9,11 +9,11 @@ dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.android.support:support-v13:23.2.+'
compile 'com.android.support:design:23.2.+'
compile 'com.android.support:cardview-v7:23.2.+'
compile 'com.android.support:preference-v14:23.2.+'
compile 'com.android.support:recyclerview-v7:23.2.+'
compile 'com.android.support:support-v13:24.2.+'
compile 'com.android.support:design:24.2.+'
compile 'com.android.support:cardview-v7:24.2.+'
compile 'com.android.support:preference-v14:24.2.+'
compile 'com.android.support:recyclerview-v7:24.2.+'
compile 'com.jayway.android.robotium:robotium-solo:5.4.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.11'
......@@ -26,8 +26,8 @@ dependencies {
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 24
buildToolsVersion "24.0.2"
sourceSets {
main {
aidl.srcDirs = ['src/main/java']
......
......@@ -21,6 +21,7 @@ package cx.ring.fragments;
import android.content.Context;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceManager;
import android.support.v7.preference.PreferenceViewHolder;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
......@@ -42,24 +43,23 @@ import cx.ring.R;
import cx.ring.model.Codec;
import cx.ring.views.dragsortlv.DragSortListView;
public class CodecPreference extends Preference {
class CodecPreference extends Preference {
private static final String TAG = CodecPreference.class.getSimpleName();
private DragSortListView mCodecList;
private CodecAdapter listAdapter;
public CodecPreference(Context context, AttributeSet attrs) {
CodecPreference(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CodecPreference(Context context, AttributeSet attrs, int defStyleAttr) {
CodecPreference(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setWidgetLayoutResource(R.layout.frag_audio_mgmt);
listAdapter = new CodecAdapter(context);
Log.w(TAG, "CodecPreference create");
}
public void setListViewHeight(ListView listView, LinearLayout llMain) {
private void setListViewHeight(ListView listView, LinearLayout llMain) {
ListAdapter listAdapter = listView.getAdapter();
if (listAdapter == null) {
return;
......@@ -85,8 +85,7 @@ public class CodecPreference extends Preference {
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
final LinearLayout lv_holder = (LinearLayout) holder.findViewById(R.id.lv_holder);
mCodecList = (DragSortListView) holder.findViewById(R.id.dndlistview);
DragSortListView mCodecList = (DragSortListView) holder.findViewById(R.id.dndlistview);
if (mCodecList.getInputAdapter() != listAdapter)
mCodecList.setAdapter(listAdapter);
mCodecList.setDropListener(onDrop);
......@@ -100,7 +99,7 @@ public class CodecPreference extends Preference {
}
});
setListViewHeight(mCodecList, lv_holder);
setListViewHeight(mCodecList, (LinearLayout) mCodecList.getParent());
}
private DragSortListView.DropListener onDrop = new DragSortListView.DropListener() {
......@@ -115,7 +114,7 @@ public class CodecPreference extends Preference {
}
};
public ArrayList<Long> getActiveCodecList() {
ArrayList<Long> getActiveCodecList() {
ArrayList<Long> results = new ArrayList<>();
for (int i = 0; i < listAdapter.getCount(); ++i) {
if (listAdapter.getItem(i).isEnabled()) {
......@@ -125,26 +124,26 @@ public class CodecPreference extends Preference {
return results;
}
public void setCodecs(ArrayList<Codec> codecs) {
void setCodecs(ArrayList<Codec> codecs) {
listAdapter.setDataset(codecs);
}
public static class CodecAdapter extends BaseAdapter {
private static class CodecAdapter extends BaseAdapter {
ArrayList<Codec> items;
private Context mContext;
public CodecAdapter(Context context) {
CodecAdapter(Context context) {
items = new ArrayList<>();
mContext = context;
}
public void insert(Codec item, int to) {
void insert(Codec item, int to) {
items.add(to, item);
notifyDataSetChanged();
}
public void remove(Codec item) {
void remove(Codec item) {
items.remove(item);
notifyDataSetChanged();
}
......@@ -226,20 +225,20 @@ public class CodecPreference extends Preference {
return true;
}
public void setDataset(ArrayList<Codec> codecs) {
void setDataset(ArrayList<Codec> codecs) {
items = new ArrayList<>(codecs.size());
for (Codec c : codecs)
items.add(c);
}
public class CodecView {
class CodecView {
public TextView name;
public TextView samplerate;
public CheckBox enabled;
}
}
public void refresh() {
void refresh() {
if (null != this.listAdapter) {
this.listAdapter.notifyDataSetChanged();
}
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="color_primary_light">#3AC0D2</color>
<color name="color_primary_light">#3ac0d2</color>
<color name="color_primary_light_shadow">#40b5c6</color>
<color name="color_primary_dark">#004C60</color>
......@@ -23,12 +23,12 @@
<color name="text_shadow">#054b55</color>
<color name="white">#FFF</color>
<color name="black">#000</color>
<color name="black">#000000</color>
<color name="error_red">#f44336</color>
<color name="error_pane">#e57373</color>
<color name="background_tab_pressed">#6633B5E5</color>
<color name="background_tab_pressed">#6633b5e5</color>
<color name="transparent_light">#AAFFFFFF</color>
......
......@@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your application dependencies here; they belong
......@@ -20,5 +20,5 @@ allprojects {
dependencies {
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10' //version required
gradleVersion = '2.14.1' //version required
}
archs=
\ No newline at end of file
archs=
org.gradle.jvmargs=-Xmx2048M
\ No newline at end of file
#Mon Jan 18 12:07:13 EST 2016
#Tue Aug 09 11:15:04 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
Supports Markdown
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