Care for lint errors

No more general disabling of abortOnError
Resolved all *errors* beside language ones  MissingTranslation & ImpliedQuantity
Issue context: #567
This commit is contained in:
ligi
2016-08-07 17:08:06 +02:00
parent 44d13ef28e
commit 4055bbfcd4
8 changed files with 29 additions and 35 deletions

View File

@@ -24,8 +24,7 @@ class BlogInvitationAdapter extends InvitationAdapter {
blog.getAuthor().getName()));
if (item.isSubscribed()) {
ui.subscribed.setText(ctx.getString(R.string.blogs_sharing_exists,
blog.getAuthor().getName()));
ui.subscribed.setText(ctx.getString(R.string.blogs_sharing_exists));
}
}

View File

@@ -1,5 +1,6 @@
package org.briarproject.android.util;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
@@ -71,24 +72,7 @@ public class BriarRecyclerView extends FrameLayout {
// scroll down when opening keyboard
if (isScrollingToEnd && Build.VERSION.SDK_INT >= 11) {
recyclerView.addOnLayoutChangeListener(
new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top,
int right, int bottom, int oldLeft, int oldTop,
int oldRight, int oldBottom) {
if (bottom < oldBottom) {
recyclerView.postDelayed(new Runnable() {
@Override
public void run() {
scrollToPosition(
recyclerView.getAdapter()
.getItemCount() - 1);
}
}, 100);
}
}
});
addLayoutChangeListener();
}
emptyObserver = new RecyclerView.AdapterDataObserver() {
@@ -97,6 +81,7 @@ public class BriarRecyclerView extends FrameLayout {
super.onItemRangeInserted(positionStart, itemCount);
if (itemCount > 0) showData();
}
@Override
public void onItemRangeRemoved(int positionStart, int itemCount) {
super.onItemRangeRemoved(positionStart, itemCount);
@@ -105,6 +90,28 @@ public class BriarRecyclerView extends FrameLayout {
};
}
@TargetApi(11)
private void addLayoutChangeListener() {
recyclerView.addOnLayoutChangeListener(
new OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top,
int right, int bottom, int oldLeft, int oldTop,
int oldRight, int oldBottom) {
if (bottom < oldBottom) {
recyclerView.postDelayed(new Runnable() {
@Override
public void run() {
scrollToPosition(
recyclerView.getAdapter()
.getItemCount() - 1);
}
}, 100);
}
}
});
}
public void setLayoutManager(RecyclerView.LayoutManager layout) {
if (recyclerView == null) initViews();
recyclerView.setLayoutManager(layout);