Fixed Snackbar behind layout

Surrounded string with quotes
This commit is contained in:
Manoj Khanna 2015-04-22 18:30:35 +05:30
parent 43484c8236
commit aecebd2ac0
5 changed files with 29 additions and 29 deletions

View File

@ -202,7 +202,7 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
} catch (IOException e) { } catch (IOException e) {
Notify.create(getActivity(), Notify.create(getActivity(),
getActivity().getString(R.string.error_file_added_already, FileHelper.getFilename(getActivity(), inputUri)), getActivity().getString(R.string.error_file_added_already, FileHelper.getFilename(getActivity(), inputUri)),
Notify.Style.ERROR).show(); Notify.Style.ERROR).show(this);
return; return;
} }
mSelectedFiles.requestFocus(); mSelectedFiles.requestFocus();
@ -230,7 +230,7 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
private void encryptClicked(boolean share) { private void encryptClicked(boolean share) {
if (mFilesModels.isEmpty()) { if (mFilesModels.isEmpty()) {
Notify.create(getActivity(), R.string.error_no_file_selected, Notify.create(getActivity(), R.string.error_no_file_selected,
Notify.Style.ERROR).show(); Notify.Style.ERROR).show(this);
return; return;
} }
if (share) { if (share) {
@ -247,7 +247,7 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
} else { } else {
if (mFilesModels.size() > 1) { if (mFilesModels.size() > 1) {
Notify.create(getActivity(), R.string.error_multi_not_supported, Notify.create(getActivity(), R.string.error_multi_not_supported,
Notify.Style.ERROR).show(); Notify.Style.ERROR).show(this);
return; return;
} }
showOutputFileDialog(); showOutputFileDialog();
@ -330,7 +330,7 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
if (mFilesModels.isEmpty()) { if (mFilesModels.isEmpty()) {
Notify.create(getActivity(), R.string.no_file_selected, Notify.Style.ERROR) Notify.create(getActivity(), R.string.no_file_selected, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} else if (mFilesModels.size() > 1 && !mShareAfterEncrypt) { } else if (mFilesModels.size() > 1 && !mShareAfterEncrypt) {
Log.e(Constants.TAG, "Aborting: mInputUris.size() > 1 && !mShareAfterEncrypt"); Log.e(Constants.TAG, "Aborting: mInputUris.size() > 1 && !mShareAfterEncrypt");
@ -347,12 +347,12 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
if (mPassphrase == null) { if (mPassphrase == null) {
Notify.create(getActivity(), R.string.passphrases_do_not_match, Notify.Style.ERROR) Notify.create(getActivity(), R.string.passphrases_do_not_match, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
if (mPassphrase.isEmpty()) { if (mPassphrase.isEmpty()) {
Notify.create(getActivity(), R.string.passphrase_must_not_be_empty, Notify.Style.ERROR) Notify.create(getActivity(), R.string.passphrase_must_not_be_empty, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
@ -365,7 +365,7 @@ public class EncryptFilesFragment extends CryptoOperationFragment {
// Files must be encrypted, only text can be signed-only right now // Files must be encrypted, only text can be signed-only right now
if (!gotEncryptionKeys) { if (!gotEncryptionKeys) {
Notify.create(getActivity(), R.string.select_encryption_key, Notify.Style.ERROR) Notify.create(getActivity(), R.string.select_encryption_key, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
} }

View File

@ -288,9 +288,9 @@ public class EncryptTextFragment extends CryptoOperationFragment {
} }
protected boolean inputIsValid() { protected boolean inputIsValid() {
if (mMessage == null) { if (mMessage == null || mMessage.isEmpty()) {
Notify.create(getActivity(), R.string.error_message, Notify.Style.ERROR) Notify.create(getActivity(), R.string.error_empty_text, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
@ -299,12 +299,12 @@ public class EncryptTextFragment extends CryptoOperationFragment {
if (mSymmetricPassphrase == null) { if (mSymmetricPassphrase == null) {
Notify.create(getActivity(), R.string.passphrases_do_not_match, Notify.Style.ERROR) Notify.create(getActivity(), R.string.passphrases_do_not_match, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
if (mSymmetricPassphrase.isEmpty()) { if (mSymmetricPassphrase.isEmpty()) {
Notify.create(getActivity(), R.string.passphrase_must_not_be_empty, Notify.Style.ERROR) Notify.create(getActivity(), R.string.passphrase_must_not_be_empty, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
@ -316,7 +316,7 @@ public class EncryptTextFragment extends CryptoOperationFragment {
if (!gotEncryptionKeys && mSigningKeyId == 0) { if (!gotEncryptionKeys && mSigningKeyId == 0) {
Notify.create(getActivity(), R.string.select_encryption_or_signature_key, Notify.Style.ERROR) Notify.create(getActivity(), R.string.select_encryption_or_signature_key, Notify.Style.ERROR)
.show(); .show(this);
return false; return false;
} }
} }

View File

@ -1,5 +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" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
@ -12,4 +12,4 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </RelativeLayout>

View File

@ -1,25 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fillViewport="true"> android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<EditText <EditText
android:id="@+id/encrypt_text_text" android:id="@+id/encrypt_text_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dip" android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:gravity="top" android:gravity="top"
android:inputType="text|textCapSentences|textMultiLine|textLongMessage" android:inputType="text|textCapSentences|textMultiLine|textLongMessage"
android:hint="@string/encrypt_content_edit_text_hint" android:hint="@string/encrypt_content_edit_text_hint" />
android:layout_weight="1" />
</LinearLayout>
</ScrollView> </ScrollView>
</RelativeLayout>

View File

@ -1238,6 +1238,7 @@
<string name="swipe_to_update">"Swipe down to update from keyserver"</string> <string name="swipe_to_update">"Swipe down to update from keyserver"</string>
<string name="error_no_file_selected">"Select at least one file to encrypt!"</string> <string name="error_no_file_selected">"Select at least one file to encrypt!"</string>
<string name="error_multi_not_supported">"Saving of multiple files not supported. This is a limitation on current Android."</string> <string name="error_multi_not_supported">"Saving of multiple files not supported. This is a limitation on current Android."</string>
<string name="error_empty_text">"Type some text to encrypt!"</string>
<string name="key_colon">"Key:"</string> <string name="key_colon">"Key:"</string>
<string name="exchange_description">"To start a key exchange, choose the number of participants on the right side, then hit the “Start exchange” button.\n\nYou will be asked two more questions to make sure only the right participants are in the exchange and their fingerprints are correct."</string> <string name="exchange_description">"To start a key exchange, choose the number of participants on the right side, then hit the “Start exchange” button.\n\nYou will be asked two more questions to make sure only the right participants are in the exchange and their fingerprints are correct."</string>
<string name="btn_start_exchange">"Start exchange"</string> <string name="btn_start_exchange">"Start exchange"</string>