diff options
26 files changed, 500 insertions, 398 deletions
diff --git a/org_apg/res/values-da/strings.xml b/Resources/old values/values-da/strings.xml index 418372fb9..418372fb9 100644 --- a/org_apg/res/values-da/strings.xml +++ b/Resources/old values/values-da/strings.xml diff --git a/org_apg/res/values-de/strings.xml b/Resources/old values/values-de/strings.xml index 732d58b0a..732d58b0a 100644 --- a/org_apg/res/values-de/strings.xml +++ b/Resources/old values/values-de/strings.xml diff --git a/org_apg/res/values-es/strings.xml b/Resources/old values/values-es/strings.xml index a2faf56d9..a2faf56d9 100644 --- a/org_apg/res/values-es/strings.xml +++ b/Resources/old values/values-es/strings.xml diff --git a/org_apg/res/values-it/strings.xml b/Resources/old values/values-it/strings.xml index 21a6d3486..21a6d3486 100644 --- a/org_apg/res/values-it/strings.xml +++ b/Resources/old values/values-it/strings.xml diff --git a/org_apg/res/values-no/strings.xml b/Resources/old values/values-no/strings.xml index 825701f38..825701f38 100644 --- a/org_apg/res/values-no/strings.xml +++ b/Resources/old values/values-no/strings.xml diff --git a/org_apg/res/values-pt/strings.xml b/Resources/old values/values-pt/strings.xml index 76e0cb244..76e0cb244 100644 --- a/org_apg/res/values-pt/strings.xml +++ b/Resources/old values/values-pt/strings.xml diff --git a/org_apg/res/values-sl/strings.xml b/Resources/old values/values-sl/strings.xml index 576d6e56b..576d6e56b 100644 --- a/org_apg/res/values-sl/strings.xml +++ b/Resources/old values/values-sl/strings.xml diff --git a/org_apg/res/values-zh/strings.xml b/Resources/old values/values-zh/strings.xml index 8fa3d23fc..8fa3d23fc 100644 --- a/org_apg/res/values-zh/strings.xml +++ b/Resources/old values/values-zh/strings.xml diff --git a/org_apg/AndroidManifest.xml b/org_apg/AndroidManifest.xml index 12bfd07f3..ae86d6f80 100644 --- a/org_apg/AndroidManifest.xml +++ b/org_apg/AndroidManifest.xml @@ -72,7 +72,8 @@ <activity android:name=".ui.EditKeyActivity" android:configChanges="keyboardHidden|orientation|keyboard" - android:label="@string/title_editKey" /> + android:label="@string/title_editKey" + android:uiOptions="splitActionBarWhenNarrow" /> <activity android:name=".ui.SelectPublicKeyListActivity" android:configChanges="keyboardHidden|orientation|keyboard" diff --git a/org_apg/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png b/org_apg/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png Binary files differnew file mode 100644 index 000000000..73050476e --- /dev/null +++ b/org_apg/res/drawable-hdpi/abs__ab_bottom_solid_light_holo.9.png diff --git a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_default.png b/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_default.png Binary files differdeleted file mode 100644 index c7373054f..000000000 --- a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_default.png +++ /dev/null diff --git a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_pressed.png b/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_pressed.png Binary files differdeleted file mode 100644 index 8e71cc692..000000000 --- a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_file_pressed.png +++ /dev/null diff --git a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_default.png b/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_default.png Binary files differdeleted file mode 100644 index 95535bba0..000000000 --- a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_default.png +++ /dev/null diff --git a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_pressed.png b/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_pressed.png Binary files differdeleted file mode 100644 index 1da36b214..000000000 --- a/org_apg/res/drawable-hdpi/dashboard_encrypt_decrypt_text_pressed.png +++ /dev/null diff --git a/org_apg/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png b/org_apg/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png Binary files differnew file mode 100644 index 000000000..0706c8af6 --- /dev/null +++ b/org_apg/res/drawable-mdpi/abs__ab_bottom_solid_light_holo.9.png diff --git a/org_apg/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png b/org_apg/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png Binary files differnew file mode 100644 index 000000000..8155fe840 --- /dev/null +++ b/org_apg/res/drawable-xhdpi/abs__ab_bottom_solid_light_holo.9.png diff --git a/org_apg/res/layout/edit_key.xml b/org_apg/res/layout/edit_key.xml index 88be75d86..c93899bdf 100644 --- a/org_apg/res/layout/edit_key.xml +++ b/org_apg/res/layout/edit_key.xml @@ -62,26 +62,26 @@ </ScrollView> - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - style="@android:style/ButtonBar"> - - <Button - android:id="@+id/btn_save" - android:layout_width="0dip" - android:layout_height="fill_parent" - android:layout_weight="1" - android:text="@string/btn_save"/> - - <Button - android:id="@+id/btn_discard" - android:layout_width="0dip" - android:layout_height="fill_parent" - android:layout_weight="1" - android:text="@string/btn_doNotSave"/> - - </LinearLayout> +<!-- <LinearLayout --> +<!-- android:layout_width="fill_parent" --> +<!-- android:layout_height="wrap_content" --> +<!-- android:orientation="horizontal" --> +<!-- style="@android:style/ButtonBar"> --> + +<!-- <Button --> +<!-- android:id="@+id/btn_save" --> +<!-- android:layout_width="0dip" --> +<!-- android:layout_height="fill_parent" --> +<!-- android:layout_weight="1" --> +<!-- android:text="@string/btn_save"/> --> + +<!-- <Button --> +<!-- android:id="@+id/btn_discard" --> +<!-- android:layout_width="0dip" --> +<!-- android:layout_height="fill_parent" --> +<!-- android:layout_weight="1" --> +<!-- android:text="@string/btn_doNotSave"/> --> + +<!-- </LinearLayout> --> </LinearLayout> diff --git a/org_apg/res/layout/encrypt.xml b/org_apg/res/layout/encrypt.xml index 0862e4475..0b653a78b 100644 --- a/org_apg/res/layout/encrypt.xml +++ b/org_apg/res/layout/encrypt.xml @@ -1,348 +1,345 @@ <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<!-- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" --> +<!-- android:layout_width="fill_parent" --> +<!-- android:layout_height="fill_parent" --> +<!-- android:orientation="vertical" --> +<!-- android:paddingTop="5dip" > --> + +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical" - android:paddingTop="5dip" > + android:layout_margin="10dip" + android:fillViewport="true" > - <ScrollView + <LinearLayout android:layout_width="fill_parent" - android:layout_height="0dip" - android:layout_weight="1" - android:fillViewport="true" - android:padding="10dip" > + android:layout_height="fill_parent" + android:orientation="vertical" > <LinearLayout android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:layout_marginLeft="5dip" - android:orientation="vertical" > + android:layout_height="wrap_content" + android:orientation="horizontal" > - <LinearLayout - android:layout_width="fill_parent" + <ImageView + android:id="@+id/sourcePrevious" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_previous" /> + + <TextView + android:id="@+id/sourceLabel" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:text="@string/label_message" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <ImageView + android:id="@+id/sourceNext" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" > + android:src="@drawable/ic_next" /> + </LinearLayout> - <ImageView - android:id="@+id/sourcePrevious" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_previous" /> + <ViewFlipper + android:id="@+id/source" + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="1" > - <TextView - android:id="@+id/sourceLabel" - android:layout_width="0dip" + <LinearLayout + android:id="@+id/sourceMessage" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" > + + <EditText + android:id="@+id/message" + android:layout_width="fill_parent" android:layout_height="fill_parent" - android:layout_weight="1" - android:gravity="center_horizontal|center_vertical" - android:text="@string/label_message" - android:textAppearance="?android:attr/textAppearanceMedium" /> - - <ImageView - android:id="@+id/sourceNext" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_next" /> + android:gravity="top" + android:inputType="text|textCapSentences|textMultiLine|textLongMessage" /> </LinearLayout> - <ViewFlipper - android:id="@+id/source" + <LinearLayout + android:id="@+id/sourceFile" android:layout_width="fill_parent" - android:layout_height="0dip" - android:layout_weight="1" > + android:layout_height="fill_parent" + android:orientation="vertical" > <LinearLayout - android:id="@+id/sourceMessage" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" > + android:layout_height="wrap_content" + android:orientation="horizontal" > <EditText - android:id="@+id/message" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:gravity="top" - android:inputType="text|textCapSentences|textMultiLine|textLongMessage" /> + android:id="@+id/filename" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" /> + + <ImageButton + android:id="@+id/btn_browse" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_launcher_folder_small" /> </LinearLayout> <LinearLayout - android:id="@+id/sourceFile" android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" > + android:layout_height="wrap_content" + android:orientation="horizontal" > - <LinearLayout - android:layout_width="fill_parent" + <TextView + android:id="@+id/label_fileCompression" + android:layout_width="0dip" android:layout_height="wrap_content" - android:orientation="horizontal" > - - <EditText - android:id="@+id/filename" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_weight="1" /> - - <ImageButton - android:id="@+id/btn_browse" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_launcher_folder_small" /> - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:paddingRight="10dip" + android:text="@string/label_fileCompression" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <Spinner + android:id="@+id/fileCompression" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" > - - <TextView - android:id="@+id/label_fileCompression" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:paddingRight="10dip" - android:text="@string/label_fileCompression" - android:textAppearance="?android:attr/textAppearanceMedium" /> + android:layout_gravity="center_vertical" /> + </LinearLayout> - <Spinner - android:id="@+id/fileCompression" - 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" > - <LinearLayout - android:layout_width="fill_parent" + <TextView + android:id="@+id/label_deleteAfterEncryption" + android:layout_width="0dip" android:layout_height="wrap_content" - android:orientation="horizontal" > - - <TextView - android:id="@+id/label_deleteAfterEncryption" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:paddingRight="10dip" - android:text="@string/label_deleteAfterEncryption" - android:textAppearance="?android:attr/textAppearanceMedium" /> - - <CheckBox - android:id="@+id/deleteAfterEncryption" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" /> - </LinearLayout> - - <LinearLayout - android:layout_width="fill_parent" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:paddingRight="10dip" + android:text="@string/label_deleteAfterEncryption" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <CheckBox + android:id="@+id/deleteAfterEncryption" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" > + android:layout_gravity="center_vertical" /> + </LinearLayout> - <TextView - android:id="@+id/label_asciiArmour" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:paddingRight="10dip" - android:text="@string/label_asciiArmour" - android:textAppearance="?android:attr/textAppearanceMedium" /> + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" > - <CheckBox - android:id="@+id/asciiArmour" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" /> - </LinearLayout> + <TextView + android:id="@+id/label_asciiArmour" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:paddingRight="10dip" + android:text="@string/label_asciiArmour" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <CheckBox + android:id="@+id/asciiArmour" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" /> </LinearLayout> - </ViewFlipper> + </LinearLayout> + </ViewFlipper> - <View - android:layout_width="fill_parent" - android:layout_height="1dip" - android:layout_marginBottom="5dip" - android:background="?android:attr/listDivider" /> + <View + android:layout_width="fill_parent" + android:layout_height="1dip" + android:layout_marginBottom="5dip" + android:background="?android:attr/listDivider" /> - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" > + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" > - <ImageView - android:id="@+id/modePrevious" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_previous" /> + <ImageView + android:id="@+id/modePrevious" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_previous" /> + + <TextView + android:id="@+id/modeLabel" + android:layout_width="0dip" + android:layout_height="fill_parent" + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:text="@string/label_asymmetric" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <ImageView + android:id="@+id/modeNext" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_next" /> + </LinearLayout> - <TextView - android:id="@+id/modeLabel" - android:layout_width="0dip" - android:layout_height="fill_parent" - android:layout_weight="1" - android:gravity="center_horizontal|center_vertical" - android:text="@string/label_asymmetric" - android:textAppearance="?android:attr/textAppearanceMedium" /> - - <ImageView - android:id="@+id/modeNext" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_next" /> - </LinearLayout> + <ViewFlipper + android:id="@+id/mode" + android:layout_width="fill_parent" + android:layout_height="wrap_content" > - <ViewFlipper - android:id="@+id/mode" + <LinearLayout + android:id="@+id/modeAsymmetric" android:layout_width="fill_parent" - android:layout_height="wrap_content" > + android:layout_height="wrap_content" + android:orientation="vertical" > <LinearLayout - android:id="@+id/modeAsymmetric" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="vertical" > + android:orientation="horizontal" > - <LinearLayout - android:layout_width="fill_parent" + <TextView + android:id="@+id/label_sign" + android:layout_width="0dip" android:layout_height="wrap_content" - android:orientation="horizontal" > - - <TextView - android:id="@+id/label_sign" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:text="@string/label_sign" - android:textAppearance="?android:attr/textAppearanceMedium" /> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:orientation="vertical" - android:paddingRight="5dip" > - - <TextView - android:id="@+id/mainUserId" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="Main User Id" - android:textAppearance="?android:attr/textAppearanceMedium" /> - - <TextView - android:id="@+id/mainUserIdRest" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="Main User Id Rest" - android:textAppearance="?android:attr/textAppearanceSmall" /> - </LinearLayout> - - <CheckBox - android:id="@+id/sign" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" /> - </LinearLayout> + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:text="@string/label_sign" + android:textAppearance="?android:attr/textAppearanceMedium" /> <LinearLayout - android:layout_width="fill_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingBottom="3dip" > + android:layout_gravity="center_vertical" + android:orientation="vertical" + android:paddingRight="5dip" > <TextView - android:id="@+id/label_selectPublicKeys" - android:layout_width="0dip" + android:id="@+id/mainUserId" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:text="@string/label_selectPublicKeys" + android:layout_gravity="right" + android:text="Main User Id" android:textAppearance="?android:attr/textAppearanceMedium" /> - <Button - android:id="@+id/btn_selectEncryptKeys" + <TextView + android:id="@+id/mainUserIdRest" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:text="@string/btn_selectEncryptKeys" /> + android:layout_gravity="right" + android:text="Main User Id Rest" + android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> + + <CheckBox + android:id="@+id/sign" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" /> </LinearLayout> - <TableLayout - android:id="@+id/modeSymmetric" + <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:stretchColumns="1" > + android:orientation="horizontal" + android:paddingBottom="3dip" > - <TableRow> + <TextView + android:id="@+id/label_selectPublicKeys" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:text="@string/label_selectPublicKeys" + android:textAppearance="?android:attr/textAppearanceMedium" /> + + <Button + android:id="@+id/btn_selectEncryptKeys" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:text="@string/btn_selectEncryptKeys" /> + </LinearLayout> + </LinearLayout> - <TextView - android:id="@+id/label_passPhrase" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:paddingRight="10dip" - android:text="@string/label_passPhrase" - android:textAppearance="?android:attr/textAppearanceMedium" /> + <TableLayout + android:id="@+id/modeSymmetric" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:stretchColumns="1" > - <EditText - android:id="@+id/passPhrase" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:inputType="textPassword" /> - </TableRow> + <TableRow> - <TableRow> + <TextView + android:id="@+id/label_passPhrase" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:paddingRight="10dip" + android:text="@string/label_passPhrase" + android:textAppearance="?android:attr/textAppearanceMedium" /> - <TextView - android:id="@+id/label_passPhraseAgain" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:paddingRight="10dip" - android:text="@string/label_passPhraseAgain" - android:textAppearance="?android:attr/textAppearanceMedium" /> + <EditText + android:id="@+id/passPhrase" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:inputType="textPassword" /> + </TableRow> - <EditText - android:id="@+id/passPhraseAgain" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:inputType="textPassword" /> - </TableRow> - </TableLayout> - </ViewFlipper> + <TableRow> - <View - android:layout_width="fill_parent" - android:layout_height="1dip" - android:layout_marginBottom="5dip" - android:background="?android:attr/listDivider" /> - </LinearLayout> - </ScrollView> + <TextView + android:id="@+id/label_passPhraseAgain" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:paddingRight="10dip" + android:text="@string/label_passPhraseAgain" + android:textAppearance="?android:attr/textAppearanceMedium" /> - <LinearLayout - style="@android:style/ButtonBar" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" > - - <Button - android:id="@+id/btn_encryptToClipboard" - android:layout_width="0dip" - android:layout_height="fill_parent" - android:layout_weight="1" - android:text="@string/btn_encryptToClipboard" /> - - <Button - android:id="@+id/btn_encrypt" - android:layout_width="0dip" - android:layout_height="fill_parent" - android:layout_weight="1" - android:text="@string/btn_encrypt" /> + <EditText + android:id="@+id/passPhraseAgain" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:inputType="textPassword" /> + </TableRow> + </TableLayout> + </ViewFlipper> + + <View + android:layout_width="fill_parent" + android:layout_height="1dip" + android:layout_marginBottom="5dip" + android:background="?android:attr/listDivider" /> </LinearLayout> -</LinearLayout>
\ No newline at end of file +</ScrollView> <!-- <LinearLayout --> +<!-- style="@android:style/ButtonBar" --> +<!-- android:layout_width="fill_parent" --> +<!-- android:layout_height="wrap_content" --> +<!-- android:orientation="horizontal" > --> + +<!-- <Button --> +<!-- android:id="@+id/btn_encryptToClipboard" --> +<!-- android:layout_width="0dip" --> +<!-- android:layout_height="fill_parent" --> +<!-- android:layout_weight="1" --> +<!-- android:text="@string/btn_encryptToClipboard" /> --> + +<!-- <Button --> +<!-- android:id="@+id/btn_encrypt" --> +<!-- android:layout_width="0dip" --> +<!-- android:layout_height="fill_parent" --> +<!-- android:layout_weight="1" --> +<!-- android:text="@string/btn_encrypt" /> --> +<!-- </LinearLayout> --> + +<!-- </LinearLayout> --> diff --git a/org_apg/res/layout/key_list.xml b/org_apg/res/layout/key_list.xml index ac07801ab..ef43632e6 100644 --- a/org_apg/res/layout/key_list.xml +++ b/org_apg/res/layout/key_list.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org> +<!-- + Copyright (C) 2010 Thialfihar <thi@thialfihar.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,18 +15,31 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:orientation="vertical"> + android:orientation="vertical" > - <include android:id="@+id/layout_filter" layout="@layout/filter_info"/> + <include + android:id="@+id/layout_filter" + layout="@layout/filter_info" /> <ExpandableListView android:id="@+id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:isScrollContainer="true"/> + android:layout_weight="1" + android:isScrollContainer="true" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="90dp" + android:layout_weight="1" + android:background="@drawable/abs__ab_bottom_solid_light_holo" + android:paddingBottom="3dp" + android:paddingLeft="10dp" + android:paddingRight="10dp" + android:paddingTop="3dp" + android:text="@string/listInformation" /> </LinearLayout>
\ No newline at end of file diff --git a/org_apg/res/values/strings.xml b/org_apg/res/values/strings.xml index aa0a99a30..4714fe190 100644 --- a/org_apg/res/values/strings.xml +++ b/org_apg/res/values/strings.xml @@ -55,10 +55,10 @@ <string name="section_advanced">Advanced</string> <!-- btn_lowerCase: capitalized words, no punctuation --> - <string name="btn_signToClipboard">Sign To Clipboard</string> - <string name="btn_encryptToClipboard">Encrypt To Clipboard</string> - <string name="btn_encryptAndEmail">Encrypt And Email</string> - <string name="btn_signAndEmail">Sign And Email</string> + <string name="btn_signToClipboard">Sign (Clipboard)</string> + <string name="btn_encryptToClipboard">Encrypt (Clipboard)</string> + <string name="btn_encryptAndEmail">Encrypt (Email)</string> + <string name="btn_signAndEmail">Sign (Email)</string> <string name="btn_encrypt">Encrypt</string> <string name="btn_sign">Sign</string> <string name="btn_decrypt">Decrypt</string> @@ -222,6 +222,7 @@ <string name="keySendSuccess">Successfully sent key to server</string> <string name="keySignSuccess">Successfully signed key</string> <string name="qrScanImportSuccess">Successfully validated and imported key</string> + <string name="listInformation">Long press one entry in this list to show more options!</string> <!-- error_lowerCase: phrases, no punctuation, all lowercase, diff --git a/org_apg/src/org/apg/Id.java b/org_apg/src/org/apg/Id.java index 7f5a30a45..f64038e48 100644 --- a/org_apg/src/org/apg/Id.java +++ b/org_apg/src/org/apg/Id.java @@ -45,8 +45,11 @@ public final class Id { public static final int key_server = 0x21070011; public static final int scanQRCode = 0x21070012; public static final int encrypt = 0x21070013; - public static final int decrypt = 0x21070014; - public static final int encrypt_ = 0x21070015; + public static final int encrypt_to_clipboard = 0x21070014; + public static final int decrypt = 0x21070015; + public static final int decrypt_to_clipboard = 0x21070016; + public static final int cancel = 0x21070017; + public static final int save = 0x21070018; } } @@ -92,7 +95,7 @@ public final class Id { public static final int export_keys = 0x2107000c; public static final int exporting = 0x2107000d; public static final int new_account = 0x2107000e; -// public static final int about = 0x2107000f; + // public static final int about = 0x2107000f; public static final int change_log = 0x21070010; public static final int output_filename = 0x21070011; public static final int delete_file = 0x21070012; diff --git a/org_apg/src/org/apg/ui/EditKeyActivity.java b/org_apg/src/org/apg/ui/EditKeyActivity.java index 8d0ed6589..d61260814 100644 --- a/org_apg/src/org/apg/ui/EditKeyActivity.java +++ b/org_apg/src/org/apg/ui/EditKeyActivity.java @@ -29,6 +29,7 @@ import org.spongycastle.openpgp.PGPSecretKeyRing; import org.apg.R; import com.actionbarsherlock.view.Menu; +import com.actionbarsherlock.view.MenuItem; import android.app.AlertDialog; import android.app.Dialog; @@ -51,15 +52,15 @@ import java.security.NoSuchProviderException; import java.security.SignatureException; import java.util.Vector; -public class EditKeyActivity extends BaseActivity implements OnClickListener { +public class EditKeyActivity extends BaseActivity { private PGPSecretKeyRing mKeyRing = null; private SectionView mUserIds; private SectionView mKeys; - private Button mSaveButton; - private Button mDiscardButton; + // private Button mSaveButton; + // private Button mDiscardButton; private String mCurrentPassPhrase = null; private String mNewPassPhrase = null; @@ -67,6 +68,40 @@ public class EditKeyActivity extends BaseActivity implements OnClickListener { private Button mChangePassPhrase; @Override + public boolean onCreateOptionsMenu(Menu menu) { + menu.add(2, Id.menu.option.cancel, 0, R.string.btn_doNotSave) + // .setIcon(R.drawable.ic_menu_search_holo_light) + .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + menu.add(2, Id.menu.option.save, 1, R.string.btn_save) + // .setIcon(R.drawable.ic_suggestions_add) + .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + + case android.R.id.home: + startActivity(new Intent(this, SecretKeyListActivity.class)); + return true; + + case Id.menu.option.save: + saveClicked(); + return true; + + case Id.menu.option.cancel: + finish(); + return true; + + default: + break; + + } + return false; + } + + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.edit_key); @@ -103,11 +138,11 @@ public class EditKeyActivity extends BaseActivity implements OnClickListener { } }); - mSaveButton = (Button) findViewById(R.id.btn_save); - mDiscardButton = (Button) findViewById(R.id.btn_discard); + // mSaveButton = (Button) findViewById(R.id.btn_save); + // mDiscardButton = (Button) findViewById(R.id.btn_discard); - mSaveButton.setOnClickListener(this); - mDiscardButton.setOnClickListener(this); + // mSaveButton.setOnClickListener(this); + // mDiscardButton.setOnClickListener(this); LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); @@ -128,9 +163,9 @@ public class EditKeyActivity extends BaseActivity implements OnClickListener { updatePassPhraseButtonText(); - Toast.makeText(this, - getString(R.string.warningMessage, getString(R.string.keyEditingIsBeta)), - Toast.LENGTH_LONG).show(); + // Toast.makeText(this, + // getString(R.string.warningMessage, getString(R.string.keyEditingIsBeta)), + // Toast.LENGTH_LONG).show(); } private long getMasterKeyId() { @@ -145,14 +180,14 @@ public class EditKeyActivity extends BaseActivity implements OnClickListener { || (mNewPassPhrase != null && !mNewPassPhrase.equals("")); } - @Override - public boolean onCreateOptionsMenu(Menu menu) { - menu.add(0, Id.menu.option.preferences, 0, R.string.menu_preferences).setIcon( - android.R.drawable.ic_menu_preferences); - menu.add(0, Id.menu.option.about, 1, R.string.menu_about).setIcon( - android.R.drawable.ic_menu_info_details); - return true; - } + // @Override + // public boolean onCreateOptionsMenu(Menu menu) { + // menu.add(0, Id.menu.option.preferences, 0, R.string.menu_preferences).setIcon( + // android.R.drawable.ic_menu_preferences); + // menu.add(0, Id.menu.option.about, 1, R.string.menu_about).setIcon( + // android.R.drawable.ic_menu_info_details); + // return true; + // } @Override protected Dialog onCreateDialog(int id) { @@ -210,14 +245,14 @@ public class EditKeyActivity extends BaseActivity implements OnClickListener { } } - public void onClick(View v) { - if (v == mSaveButton) { - // TODO: some warning - saveClicked(); - } else if (v == mDiscardButton) { - finish(); - } - } + // public void onClick(View v) { + // if (v == mSaveButton) { + // // TODO: some warning + // saveClicked(); + // } else if (v == mDiscardButton) { + // finish(); + // } + // } private void saveClicked() { if (!havePassPhrase()) { diff --git a/org_apg/src/org/apg/ui/EncryptActivity.java b/org_apg/src/org/apg/ui/EncryptActivity.java index 8e19e09a1..1f0c39fe5 100644 --- a/org_apg/src/org/apg/ui/EncryptActivity.java +++ b/org_apg/src/org/apg/ui/EncryptActivity.java @@ -76,8 +76,13 @@ public class EncryptActivity extends BaseActivity { private boolean mReturnResult = false; private EditText mMessage = null; private Button mSelectKeysButton = null; - private Button mEncryptButton = null; - private Button mEncryptToClipboardButton = null; +// private Button mEncryptButton = null; + private boolean mEncryptEnabled = false; + private String mEncryptString = ""; +// private Button mEncryptToClipboardButton = null; + private boolean mEncryptToClipboardEnabled = false; + private String mEncryptToClipboardString = ""; + private CheckBox mSign = null; private TextView mMainUserId = null; private TextView mMainUserIdRest = null; @@ -118,24 +123,30 @@ public class EncryptActivity extends BaseActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { - menu.add(1, Id.menu.option.encrypt, 0, R.string.btn_encrypt) - .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + + if (mEncryptToClipboardEnabled) { + menu.add(1, Id.menu.option.encrypt_to_clipboard, 0, mEncryptToClipboardString) + .setShowAsAction( + MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + } + if (mEncryptEnabled) { + menu.add(1, Id.menu.option.encrypt, 1, mEncryptString).setShowAsAction( + MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + } return true; } - + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { - case Id.menu.option.key_server: { - startActivity(new Intent(this, KeyServerQueryActivity.class)); + case Id.menu.option.encrypt_to_clipboard: { + encryptToClipboardClicked(); return true; } - case Id.menu.option.scanQRCode: { - Intent intent = new Intent(this, ImportFromQRCodeActivity.class); - intent.setAction(Apg.Intent.IMPORT_FROM_QR_CODE); - startActivityForResult(intent, Id.request.import_from_qr_code); + case Id.menu.option.encrypt: { + encryptClicked(); return true; } @@ -220,8 +231,8 @@ public class EncryptActivity extends BaseActivity { mMessage = (EditText) findViewById(R.id.message); mSelectKeysButton = (Button) findViewById(R.id.btn_selectEncryptKeys); - mEncryptButton = (Button) findViewById(R.id.btn_encrypt); - mEncryptToClipboardButton = (Button) findViewById(R.id.btn_encryptToClipboard); +// mEncryptButton = (Button) findViewById(R.id.btn_encrypt); +// mEncryptToClipboardButton = (Button) findViewById(R.id.btn_encryptToClipboard); mSign = (CheckBox) findViewById(R.id.sign); mMainUserId = (TextView) findViewById(R.id.mainUserId); mMainUserIdRest = (TextView) findViewById(R.id.mainUserIdRest); @@ -275,17 +286,17 @@ public class EncryptActivity extends BaseActivity { } }); - mEncryptToClipboardButton.setOnClickListener(new OnClickListener() { - public void onClick(View v) { - encryptToClipboardClicked(); - } - }); +// mEncryptToClipboardButton.setOnClickListener(new OnClickListener() { +// public void onClick(View v) { +// encryptToClipboardClicked(); +// } +// }); - mEncryptButton.setOnClickListener(new OnClickListener() { - public void onClick(View v) { - encryptClicked(); - } - }); +// mEncryptButton.setOnClickListener(new OnClickListener() { +// public void onClick(View v) { +// encryptClicked(); +// } +// }); mSelectKeysButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { @@ -479,57 +490,93 @@ public class EncryptActivity extends BaseActivity { private void updateButtons() { switch (mSource.getCurrentView().getId()) { case R.id.sourceFile: { - mEncryptToClipboardButton.setVisibility(View.INVISIBLE); - mEncryptButton.setText(R.string.btn_encrypt); + mEncryptEnabled = true; + mEncryptToClipboardEnabled = false; + + // mEncryptToClipboardButton.setVisibility(View.INVISIBLE); + // mEncryptButton.setText(R.string.btn_encrypt); break; } case R.id.sourceMessage: { mSourceLabel.setText(R.string.label_message); if (mReturnResult) { - mEncryptToClipboardButton.setVisibility(View.INVISIBLE); + mEncryptToClipboardEnabled = false; + // mEncryptToClipboardButton.setVisibility(View.INVISIBLE); } else { - mEncryptToClipboardButton.setVisibility(View.VISIBLE); + mEncryptToClipboardEnabled = true; + // mEncryptToClipboardButton.setVisibility(View.VISIBLE); } if (mMode.getCurrentView().getId() == R.id.modeSymmetric) { if (mReturnResult) { - mEncryptButton.setText(R.string.btn_encrypt); + mEncryptString = getString(R.string.btn_encrypt); + // mEncryptButton.setText(R.string.btn_encrypt); } else { - mEncryptButton.setText(R.string.btn_encryptAndEmail); + mEncryptString = getString(R.string.btn_encryptAndEmail); + + // mEncryptButton.setText(R.string.btn_encryptAndEmail); } - mEncryptButton.setEnabled(true); - mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); - mEncryptToClipboardButton.setEnabled(true); + mEncryptEnabled = true; + mEncryptToClipboardString = getString(R.string.btn_encryptToClipboard); + mEncryptToClipboardEnabled = true; + + // mEncryptButton.setEnabled(true); + // mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); + // mEncryptToClipboardButton.setEnabled(true); } else { if (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0) { if (getSecretKeyId() == 0) { if (mReturnResult) { - mEncryptButton.setText(R.string.btn_encrypt); + mEncryptString = getString(R.string.btn_encrypt); + // mEncryptButton.setText(R.string.btn_encrypt); } else { - mEncryptButton.setText(R.string.btn_encryptAndEmail); + mEncryptString = getString(R.string.btn_encryptAndEmail); + + // mEncryptButton.setText(R.string.btn_encryptAndEmail); } - mEncryptButton.setEnabled(false); - mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); - mEncryptToClipboardButton.setEnabled(false); + mEncryptEnabled = false; + mEncryptToClipboardString = getString(R.string.btn_encryptToClipboard); + mEncryptToClipboardEnabled = false; + + // mEncryptButton.setEnabled(false); + // mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); + // mEncryptToClipboardButton.setEnabled(false); } else { if (mReturnResult) { - mEncryptButton.setText(R.string.btn_sign); + mEncryptString = getString(R.string.btn_sign); + + // mEncryptButton.setText(R.string.btn_sign); } else { - mEncryptButton.setText(R.string.btn_signAndEmail); + mEncryptString = getString(R.string.btn_signAndEmail); + + // mEncryptButton.setText(R.string.btn_signAndEmail); } - mEncryptButton.setEnabled(true); - mEncryptToClipboardButton.setText(R.string.btn_signToClipboard); - mEncryptToClipboardButton.setEnabled(true); + + mEncryptEnabled = true; + mEncryptToClipboardString = getString(R.string.btn_signToClipboard); + mEncryptToClipboardEnabled = true; + + // mEncryptButton.setEnabled(true); + // mEncryptToClipboardButton.setText(R.string.btn_signToClipboard); + // mEncryptToClipboardButton.setEnabled(true); } } else { if (mReturnResult) { - mEncryptButton.setText(R.string.btn_encrypt); + mEncryptString = getString(R.string.btn_encrypt); + + // mEncryptButton.setText(R.string.btn_encrypt); } else { - mEncryptButton.setText(R.string.btn_encryptAndEmail); + mEncryptString = getString(R.string.btn_encryptAndEmail); + + // mEncryptButton.setText(R.string.btn_encryptAndEmail); } - mEncryptButton.setEnabled(true); - mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); - mEncryptToClipboardButton.setEnabled(true); + + mEncryptEnabled = true; + mEncryptToClipboardString = getString(R.string.btn_encryptToClipboard); + mEncryptToClipboardEnabled = true; + // mEncryptButton.setEnabled(true); + // mEncryptToClipboardButton.setText(R.string.btn_encryptToClipboard); + // mEncryptToClipboardButton.setEnabled(true); } } break; @@ -539,6 +586,9 @@ public class EncryptActivity extends BaseActivity { break; } } + + // build new action bar + invalidateOptionsMenu(); } private void updateMode() { diff --git a/org_apg/src/org/apg/ui/MainActivity.java b/org_apg/src/org/apg/ui/MainActivity.java index c009b36dd..d92cd7e07 100644 --- a/org_apg/src/org/apg/ui/MainActivity.java +++ b/org_apg/src/org/apg/ui/MainActivity.java @@ -68,7 +68,7 @@ public class MainActivity extends BaseActivity { } public void decryptOnClick(View view) { - Intent intent = new Intent(MainActivity.this, EncryptActivity.class); + Intent intent = new Intent(MainActivity.this, DecryptActivity.class); intent.setAction(Apg.Intent.DECRYPT); startActivity(intent); } diff --git a/org_apg/src/org/apg/ui/PublicKeyListActivity.java b/org_apg/src/org/apg/ui/PublicKeyListActivity.java index f0e7ce569..f91683748 100644 --- a/org_apg/src/org/apg/ui/PublicKeyListActivity.java +++ b/org_apg/src/org/apg/ui/PublicKeyListActivity.java @@ -49,23 +49,24 @@ public class PublicKeyListActivity extends KeyListActivity { @Override public boolean onCreateOptionsMenu(Menu menu) { - menu.add(1, Id.menu.option.key_server, 0, R.string.menu_keyServer) - .setIcon(R.drawable.ic_menu_find_holo_light) - .setShowAsAction( - MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + menu.add(1, Id.menu.option.search, 0, R.string.menu_search) + .setIcon(R.drawable.ic_menu_search_holo_light) + .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); menu.add(1, Id.menu.option.scanQRCode, 1, R.string.menu_scanQRCode) // .setIcon(R.drawable.ic_suggestions_add) .setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(0, Id.menu.option.import_keys, 2, R.string.menu_importKeys) + + menu.add(1, Id.menu.option.key_server, 2, R.string.menu_keyServer) + .setIcon(R.drawable.ic_menu_find_holo_light) + .setShowAsAction( + MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); + menu.add(0, Id.menu.option.import_keys, 3, R.string.menu_importKeys) // .setIcon(R.drawable.ic_suggestions_add) .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(0, Id.menu.option.export_keys, 3, R.string.menu_exportKeys) + menu.add(0, Id.menu.option.export_keys, 4, R.string.menu_exportKeys) // .setIcon(R.drawable.ic_menu_share_holo_light) .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(1, Id.menu.option.search, 4, R.string.menu_search) - .setIcon(R.drawable.ic_menu_search_holo_light) - .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); return true; } diff --git a/org_apg/src/org/apg/ui/SecretKeyListActivity.java b/org_apg/src/org/apg/ui/SecretKeyListActivity.java index db9c2903e..95436565d 100644 --- a/org_apg/src/org/apg/ui/SecretKeyListActivity.java +++ b/org_apg/src/org/apg/ui/SecretKeyListActivity.java @@ -54,20 +54,20 @@ public class SecretKeyListActivity extends KeyListActivity implements OnChildCli @Override public boolean onCreateOptionsMenu(Menu menu) { - menu.add(1, Id.menu.option.create, 0, R.string.menu_createKey) + menu.add(3, Id.menu.option.search, 0, R.string.menu_search) + .setIcon(R.drawable.ic_menu_search_holo_light) + .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); + menu.add(1, Id.menu.option.create, 1, R.string.menu_createKey) .setIcon(R.drawable.ic_suggestions_add) .setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(0, Id.menu.option.import_keys, 1, R.string.menu_importKeys) + menu.add(0, Id.menu.option.import_keys, 2, R.string.menu_importKeys) // .setIcon(R.drawable.ic_menu_find_holo_light) .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(0, Id.menu.option.export_keys, 2, R.string.menu_exportKeys) + menu.add(0, Id.menu.option.export_keys, 3, R.string.menu_exportKeys) // .setIcon(R.drawable.ic_menu_find_holo_light) .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER | MenuItem.SHOW_AS_ACTION_WITH_TEXT); - menu.add(3, Id.menu.option.search, 3, R.string.menu_search) - .setIcon(R.drawable.ic_menu_search_holo_light) - .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); return true; } |