file encrypt layout entirely rewritten, should be much more userfriendly and work on more devices, changed message encrypt layout to match

This commit is contained in:
Thialfihar
2010-04-26 17:41:06 +00:00
parent b01a47a115
commit 86192e39d9
7 changed files with 327 additions and 270 deletions

View File

@@ -21,11 +21,23 @@
android:orientation="vertical"
android:paddingTop="5dip">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_marginLeft="5dip"
android:layout_marginRight="?android:attr/scrollbarSize">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="5dip">
android:orientation="horizontal">
<TextView
android:id="@+id/label_filename"
@@ -48,186 +60,200 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/label_algorithm"
android:text="@string/label_algorithm"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"/>
<Spinner
android:id="@+id/algorithm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label_ascii_armour"
android:text="@string/label_ascii_armour"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"/>
<CheckBox
android:id="@+id/ascii_armour"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:layout_marginBottom="5dip"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label_sign"
android:text="@string/label_sign"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="5dip">
<TextView
android:id="@+id/main_user_id"
android:text="Main User Id"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"/>
<TextView
android:id="@+id/main_user_id_rest"
android:text="Main User Id Rest"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"/>
</LinearLayout>
<CheckBox
android:id="@+id/sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:orientation="horizontal">
<TextView
android:id="@+id/label_select_public_keys"
android:text="@string/label_select_public_keys"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
<Button
android:text="@string/btn_selectEncryptKeys"
android:id="@+id/btn_selectEncryptKeys"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:layout_marginBottom="5dip"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/label_use_pass_phrase"
android:text="@string/label_use_pass_phrase"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"/>
<CheckBox
android:id="@+id/use_pass_phrase"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<TableLayout
android:id="@+id/layout_pass_phrase"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:stretchColumns="1"
android:paddingLeft="6dip">
android:stretchColumns="1">
<TableRow>
<TextView android:id="@+id/label_algorithm"
android:text="Algorithm:"
<TextView android:id="@+id/label_pass_phrase"
android:text="@string/label_pass_phrase"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"/>
<Spinner
android:id="@+id/algorithm"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<EditText android:id="@+id/pass_phrase"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:inputType="textPassword"/>
</TableRow>
<TableRow>
<TextView
android:id="@+id/label_ascii_armour"
android:text="@string/ascii_armour"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
<TextView android:id="@+id/label_pass_phrase_again"
android:text="@string/label_pass_phrase_again"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"/>
<CheckBox
android:id="@+id/ascii_armour"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="right|center_vertical"/>
<EditText android:id="@+id/pass_phrase_again"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:inputType="textPassword"/>
</TableRow>
</TableLayout>
<TabHost
android:id="@+id/tab_host"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="0dip">
</LinearLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="65dip"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="65dip">
<!-- -->
<LinearLayout
android:id="@+id/tab_asymmetric"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:orientation="horizontal">
<CheckBox
android:text="@string/sign"
android:id="@+id/sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center_vertical"
android:paddingRight="5dip">
<TextView
android:id="@+id/main_user_id"
android:text="Main User Id"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"/>
<TextView
android:id="@+id/main_user_id_rest"
android:text="Main User Id Rest"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"/>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"/>
<TextView
android:id="@+id/label_encrypt_keys"
android:text="@string/label_encrypt_keys"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ListView
android:id="@+id/public_key_list"
android:choiceMode="multipleChoice"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
<!-- -->
<LinearLayout
android:id="@+id/tab_symmetric"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingTop="3dip">
<TableLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:stretchColumns="1"
android:paddingLeft="6dip">
<TableRow>
<TextView android:id="@+id/label_pass_phrase"
android:text="Pass phrase"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"/>
<EditText android:id="@+id/pass_phrase"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:inputType="textPassword"/>
</TableRow>
<TableRow>
<TextView android:id="@+id/label_pass_phrase_again"
android:text="Again:"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"/>
<EditText android:id="@+id/pass_phrase_again"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:inputType="textPassword"/>
</TableRow>
</TableLayout>
</LinearLayout>
</FrameLayout>
</TabHost>
</ScrollView>
<LinearLayout
android:orientation="horizontal"

View File

@@ -30,21 +30,23 @@
android:inputType="text|textCapSentences|textMultiLine|textLongMessage"/>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:paddingBottom="3dip">
android:layout_height="wrap_content"
android:orientation="horizontal">
<CheckBox
android:text="@string/sign"
android:id="@+id/sign"
android:layout_width="wrap_content"
<TextView
android:id="@+id/label_sign"
android:text="@string/label_sign"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
<LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="5dip">
@@ -66,6 +68,36 @@
</LinearLayout>
<CheckBox
android:id="@+id/sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:orientation="horizontal">
<TextView
android:id="@+id/label_select_public_keys"
android:text="@string/label_select_public_keys"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
<Button
android:text="@string/btn_selectEncryptKeys"
android:id="@+id/btn_selectEncryptKeys"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/>
</LinearLayout>
<LinearLayout
@@ -74,18 +106,10 @@
android:layout_height="wrap_content"
style="@android:style/ButtonBar">
<Button
android:text="@string/btn_selectEncryptKeys"
android:id="@+id/btn_selectEncryptKeys"
android:layout_weight="1"
android:layout_width="0dip"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/btn_send"
android:text="@string/btn_send"
android:layout_weight="1"
android:layout_width="0dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</LinearLayout>

View File

@@ -45,24 +45,25 @@
<string name="btn_save">Save</string>
<string name="btn_doNotSave">Cancel</string>
<string name="tab_symmetric">Use Pass Phrase</string>
<string name="tab_asymmetric">Use Public Key</string>
<string name="menu_about">About</string>
<string name="menu_addAccount">Add GMail Account</string>
<string name="menu_managePublicKeys">Manage Public Keys</string>
<string name="menu_manageSecretKeys">Manage Secret Keys</string>
<string name="sign">Sign</string>
<string name="sign_as">Sign as</string>
<string name="no_keys_selected">Select Recipients</string>
<string name="one_key_selected">1 Recipient</string>
<string name="n_keys_selected">Recipients</string>
<string name="no_keys_selected">Select</string>
<string name="one_key_selected">1 Selected</string>
<string name="n_keys_selected">Selected</string>
<string name="unknown_user_id">&lt;unknown&gt;</string>
<string name="none">&lt;none&gt;</string>
<string name="label_file">File:</string>
<string name="label_encrypt_keys">Encrypt with:</string>
<string name="label_sign">Sign</string>
<string name="label_file">File</string>
<string name="label_pass_phrase">Pass Phrase</string>
<string name="label_pass_phrase_again">Again</string>
<string name="label_algorithm">Algorithm</string>
<string name="label_ascii_armour">ASCII Armour</string>
<string name="label_select_public_keys">Public Key(s)</string>
<string name="label_use_pass_phrase">Use Pass Phrase</string>
<string name="sign_only">Sign only</string>
<string name="encrypt_only">Encrypt only</string>
@@ -83,7 +84,5 @@
<string name="filemanager_title_save">Save As...</string>
<string name="filemanager_btn_save">Save</string>
<string name="ascii_armour">ASCII armour</string>
</resources>