mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Hide client cert option under advanced options dropdown
This commit is contained in:
parent
2a1733564e
commit
05d8fb5e42
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
@ -46,11 +47,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/account_client_certificate"
|
||||
android:layout_width="fill_parent"
|
||||
<com.fsck.k9.view.FoldableLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_basics_client_certificate" />
|
||||
custom:foldedLabel="@string/client_certificate_advanced_options"
|
||||
custom:unFoldedLabel="@string/client_certificate_advanced_options">
|
||||
<CheckBox
|
||||
android:id="@+id/account_client_certificate"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_basics_client_certificate" />
|
||||
</com.fsck.k9.view.FoldableLinearLayout>
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
|
@ -11,13 +11,12 @@
|
||||
android:clickable="true"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/foldableIcon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:src="@drawable/ic_action_expand" />
|
||||
|
||||
<TextView
|
||||
|
@ -62,8 +62,6 @@
|
||||
<declare-styleable name="FoldableLinearLayout">
|
||||
<attr name="foldedLabel" format="string" />
|
||||
<attr name="unFoldedLabel" format="string" />
|
||||
<attr name="foldedIcon" format="string" />
|
||||
<attr name="unFoldedIcon" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
@ -1130,4 +1130,5 @@ Please submit bug reports, contribute new features and ask questions at
|
||||
<string name="client_certificate_spinner_empty">No client certificate</string>
|
||||
<string name="client_certificate_spinner_delete">Remove client certificate selection</string>
|
||||
<string name="client_certificate_retrieval_failure">"Failed to retrieve client certificate for alias <xliff:g id="alias">%s</xliff:g>"</string>
|
||||
<string name="client_certificate_advanced_options">Advanced options</string>
|
||||
</resources>
|
||||
|
@ -9,24 +9,22 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* Class representing a LinearLayout that can fold and hide it's content when
|
||||
* pressed To use just add the following to your xml layout
|
||||
* <org.sufficientlysecure.keychain.ui.widget.FoldableLinearLayout
|
||||
* <com.fsck.k9.view.FoldableLinearLayout
|
||||
* android:layout_width="wrap_content" android:layout_height="wrap_content"
|
||||
* custom:foldedLabel="@string/TEXT_TO_DISPLAY_WHEN_FOLDED"
|
||||
* custom:unFoldedLabel="@string/TEXT_TO_DISPLAY_WHEN_UNFOLDED"
|
||||
* custom:foldedIcon="ICON_NAME_FROM_FontAwesomeText_TO_USE_WHEN_FOLDED"
|
||||
* custom:unFoldedIcon="ICON_NAME_FROM_FontAwesomeText_TO_USE_WHEN_UNFOLDED">
|
||||
* custom:unFoldedLabel="@string/TEXT_TO_DISPLAY_WHEN_UNFOLDED">
|
||||
* <include layout="@layout/ELEMENTS_TO_BE_FOLDED"/>
|
||||
* </org.sufficientlysecure.keychain.ui.widget.FoldableLinearLayout>
|
||||
* </com.fsck.k9.view.FoldableLinearLayout>
|
||||
*/
|
||||
public class FoldableLinearLayout extends LinearLayout {
|
||||
private ImageButton mFoldableIcon;
|
||||
private ImageView mFoldableIcon;
|
||||
private boolean mFolded;
|
||||
private boolean mHasMigrated = false;
|
||||
private Integer mShortAnimationDuration = null;
|
||||
@ -108,7 +106,7 @@ public class FoldableLinearLayout extends LinearLayout {
|
||||
}
|
||||
|
||||
private void initialiseInnerViews() {
|
||||
mFoldableIcon = (ImageButton) mFoldableLayout.findViewById(R.id.foldableIcon);
|
||||
mFoldableIcon = (ImageView) mFoldableLayout.findViewById(R.id.foldableIcon);
|
||||
mFoldableIcon.setImageResource(R.drawable.ic_action_expand);
|
||||
mFoldableTextView = (TextView) mFoldableLayout.findViewById(R.id.foldableText);
|
||||
mFoldableTextView.setText(mFoldedLabel);
|
||||
|
Loading…
Reference in New Issue
Block a user