mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
Scroll fixes for certify activity
This commit is contained in:
parent
8d668d170c
commit
5f8bbab569
@ -930,7 +930,7 @@ public class PgpKeyOperation {
|
|||||||
hashedPacketsGen.setPreferredCompressionAlgorithms(false, PREFERRED_COMPRESSION_ALGORITHMS);
|
hashedPacketsGen.setPreferredCompressionAlgorithms(false, PREFERRED_COMPRESSION_ALGORITHMS);
|
||||||
hashedPacketsGen.setPrimaryUserID(false, primary);
|
hashedPacketsGen.setPrimaryUserID(false, primary);
|
||||||
|
|
||||||
/* critical subpackets: */
|
/* critical subpackets: we consider those important for a modern pgp implementation */
|
||||||
hashedPacketsGen.setSignatureCreationTime(true, new Date());
|
hashedPacketsGen.setSignatureCreationTime(true, new Date());
|
||||||
// Request that senders add the MDC to the message (authenticate unsigned messages)
|
// Request that senders add the MDC to the message (authenticate unsigned messages)
|
||||||
hashedPacketsGen.setFeature(true, Features.FEATURE_MODIFICATION_DETECTION);
|
hashedPacketsGen.setFeature(true, Features.FEATURE_MODIFICATION_DETECTION);
|
||||||
|
@ -40,6 +40,7 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
|
import android.widget.ScrollView;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -71,6 +72,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements LoaderManag
|
|||||||
private ImageView mActionCertifyImage;
|
private ImageView mActionCertifyImage;
|
||||||
private CheckBox mUploadKeyCheckbox;
|
private CheckBox mUploadKeyCheckbox;
|
||||||
private Spinner mSelectKeyserverSpinner;
|
private Spinner mSelectKeyserverSpinner;
|
||||||
|
private ScrollView mScrollView;
|
||||||
|
|
||||||
private CertifyKeySpinner mCertifyKeySpinner;
|
private CertifyKeySpinner mCertifyKeySpinner;
|
||||||
|
|
||||||
@ -96,6 +98,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements LoaderManag
|
|||||||
mCertifyButton = findViewById(R.id.certify_key_certify_button);
|
mCertifyButton = findViewById(R.id.certify_key_certify_button);
|
||||||
mActionCertifyImage = (ImageView) findViewById(R.id.certify_key_action_certify_image);
|
mActionCertifyImage = (ImageView) findViewById(R.id.certify_key_action_certify_image);
|
||||||
mUserIds = (ListView) findViewById(R.id.view_key_user_ids);
|
mUserIds = (ListView) findViewById(R.id.view_key_user_ids);
|
||||||
|
mScrollView = (ScrollView) findViewById(R.id.certify_scroll_view);
|
||||||
|
|
||||||
// make certify image gray, like action icons
|
// make certify image gray, like action icons
|
||||||
mActionCertifyImage.setColorFilter(getResources().getColor(R.color.tertiary_text_light),
|
mActionCertifyImage.setColorFilter(getResources().getColor(R.color.tertiary_text_light),
|
||||||
@ -141,6 +144,7 @@ public class CertifyKeyActivity extends ActionBarActivity implements LoaderManag
|
|||||||
if (mMasterKeyId == 0) {
|
if (mMasterKeyId == 0) {
|
||||||
Notify.showNotify(CertifyKeyActivity.this, getString(R.string.select_key_to_certify),
|
Notify.showNotify(CertifyKeyActivity.this, getString(R.string.select_key_to_certify),
|
||||||
Notify.Style.ERROR);
|
Notify.Style.ERROR);
|
||||||
|
scrollUp();
|
||||||
} else {
|
} else {
|
||||||
initiateCertifying();
|
initiateCertifying();
|
||||||
}
|
}
|
||||||
@ -165,6 +169,14 @@ public class CertifyKeyActivity extends ActionBarActivity implements LoaderManag
|
|||||||
getSupportLoaderManager().initLoader(LOADER_ID_USER_IDS, null, this);
|
getSupportLoaderManager().initLoader(LOADER_ID_USER_IDS, null, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void scrollUp() {
|
||||||
|
mScrollView.post(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
mScrollView.fullScroll(ScrollView.FOCUS_UP);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
static final String USER_IDS_SELECTION = UserIds.IS_REVOKED + " = 0";
|
static final String USER_IDS_SELECTION = UserIds.IS_REVOKED + " = 0";
|
||||||
|
|
||||||
static final String[] KEYRING_PROJECTION =
|
static final String[] KEYRING_PROJECTION =
|
||||||
@ -217,6 +229,9 @@ public class CertifyKeyActivity extends ActionBarActivity implements LoaderManag
|
|||||||
break;
|
break;
|
||||||
case LOADER_ID_USER_IDS:
|
case LOADER_ID_USER_IDS:
|
||||||
mUserIdsAdapter.swapCursor(data);
|
mUserIdsAdapter.swapCursor(data);
|
||||||
|
// when some user ids are pre-checked, the focus is requested and the scroll view goes
|
||||||
|
// down. This fixes it.
|
||||||
|
scrollUp();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@ -8,6 +7,7 @@
|
|||||||
<include layout="@layout/notify_area" />
|
<include layout="@layout/notify_area" />
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
android:id="@+id/certify_scroll_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
@ -27,9 +27,9 @@
|
|||||||
android:text="@string/section_certification_key" />
|
android:text="@string/section_certification_key" />
|
||||||
|
|
||||||
<org.sufficientlysecure.keychain.ui.widget.CertifyKeySpinner
|
<org.sufficientlysecure.keychain.ui.widget.CertifyKeySpinner
|
||||||
android:id="@+id/certify_key_spinner"
|
android:id="@+id/certify_key_spinner"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/SectionHeader"
|
style="@style/SectionHeader"
|
||||||
@ -115,8 +115,7 @@
|
|||||||
<org.sufficientlysecure.keychain.ui.widget.FixedListView
|
<org.sufficientlysecure.keychain.ui.widget.FixedListView
|
||||||
android:id="@+id/view_key_user_ids"
|
android:id="@+id/view_key_user_ids"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:descendantFocusability="blocksDescendants" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/SectionHeader"
|
style="@style/SectionHeader"
|
||||||
@ -180,7 +179,6 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
Loading…
Reference in New Issue
Block a user