updated deps
removed workaround for issue with the navigationHeader added handling of empty responses
This commit is contained in:
@@ -38,7 +38,7 @@ apply plugin: 'com.github.ben-manes.versions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.1'
|
||||
buildToolsVersion '23.0.2'
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
@@ -66,13 +66,13 @@ android {
|
||||
|
||||
dependencies {
|
||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||
compile 'com.android.support:appcompat-v7:23.1.0'
|
||||
compile 'com.android.support:support-v4:23.1.0'
|
||||
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||
compile 'com.android.support:support-v4:23.1.1'
|
||||
compile 'com.squareup.okhttp:okhttp:2.5.0'
|
||||
compile 'com.google.code.gson:gson:2.4'
|
||||
compile 'com.jakewharton:butterknife:7.0.1'
|
||||
compile 'com.koushikdutta.async:androidasync:2.1.6'
|
||||
compile 'com.android.support:design:23.1.0'
|
||||
compile 'com.android.support:design:23.1.1'
|
||||
compile 'com.larswerkman:HoloColorPicker:1.5@aar'
|
||||
compile 'com.google.guava:guava:19.0-rc2'
|
||||
compile 'com.thetransactioncompany:jsonrpc2-base:1.38'
|
||||
|
@@ -97,8 +97,7 @@ public class ColorActivity extends AppCompatActivity implements NavigationView.O
|
||||
setContentView(R.layout.activity_color);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
// workaround for issue #190226 in design libary
|
||||
headerLayout = navigationView.inflateHeaderView(R.layout.navigation_header);
|
||||
headerLayout = navigationView.getHeaderView(0);
|
||||
mStripeName = ButterKnife.findById(headerLayout, R.id.nvh_name);
|
||||
System.out.println("name: " + mStripeName.getText().toString());
|
||||
mStripeType = ButterKnife.findById(headerLayout, R.id.nvh_type);
|
||||
|
@@ -83,12 +83,15 @@ public class ColorService extends Service {
|
||||
@Override
|
||||
public void onDataAvailable(DataEmitter emitter, ByteBufferList bb) {
|
||||
JSONRPC2Response reqIn = null;
|
||||
String dataStr = new String(bb.getAllByteArray());
|
||||
|
||||
if (!dataStr.isEmpty()) {
|
||||
try {
|
||||
reqIn = JSONRPC2Response.parse(new String(bb.getAllByteArray()));
|
||||
reqIn = JSONRPC2Response.parse(dataStr);
|
||||
} catch (JSONRPC2ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (reqIn != null) {
|
||||
if (sendableHashMap.containsKey(reqIn.getID().toString())) {
|
||||
|
@@ -94,6 +94,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/navigation_header"
|
||||
app:menu="@menu/navigation_drawer"/>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
Reference in New Issue
Block a user