Redesign "select signing key" api dialog
This commit is contained in:
@@ -19,6 +19,7 @@ package org.sufficientlysecure.keychain.ui.base;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.Gravity;
|
||||
@@ -136,8 +137,6 @@ public class RecyclerFragment<A extends RecyclerView.Adapter> extends Fragment {
|
||||
RecyclerView listView = new RecyclerView(context);
|
||||
listView.setId(INTERNAL_LIST_VIEW_ID);
|
||||
|
||||
int padding = FormattingUtils.dpToPx(context, 8);
|
||||
listView.setPadding(padding, 0, padding, 0);
|
||||
listView.setClipToPadding(false);
|
||||
|
||||
listContainer.addView(listView, new FrameLayout.LayoutParams(
|
||||
|
||||
@@ -23,16 +23,16 @@ public abstract class AsyncTaskLiveData<T> extends LiveData<T> {
|
||||
@Nullable
|
||||
private CancellationSignal cancellationSignal;
|
||||
|
||||
AsyncTaskLiveData(@NonNull Context context, @Nullable Uri observedUri) {
|
||||
protected AsyncTaskLiveData(@NonNull Context context, @Nullable Uri observedUri) {
|
||||
super();
|
||||
this.context = context;
|
||||
this.observedUri = observedUri;
|
||||
this.observer = new ForceLoadContentObserver();
|
||||
}
|
||||
|
||||
abstract T asyncLoadData();
|
||||
protected abstract T asyncLoadData();
|
||||
|
||||
private void loadDataInBackground() {
|
||||
protected void updateDataInBackground() {
|
||||
new AsyncTask<Void, Void, T>() {
|
||||
@Override
|
||||
protected T doInBackground(Void... params) {
|
||||
@@ -66,7 +66,7 @@ public abstract class AsyncTaskLiveData<T> extends LiveData<T> {
|
||||
protected void onActive() {
|
||||
T value = getValue();
|
||||
if (value == null) {
|
||||
loadDataInBackground();
|
||||
updateDataInBackground();
|
||||
}
|
||||
|
||||
if (observedUri != null) {
|
||||
@@ -105,7 +105,7 @@ public abstract class AsyncTaskLiveData<T> extends LiveData<T> {
|
||||
|
||||
@Override
|
||||
public void onChange(boolean selfChange) {
|
||||
loadDataInBackground();
|
||||
updateDataInBackground();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user