mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user