aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authorManoj Khanna <manojkhannakm@gmail.com>2015-03-20 18:35:20 +0530
committerManoj Khanna <manojkhannakm@gmail.com>2015-03-20 19:49:43 +0530
commitfa8d5657bec8fc8106635fd7a5d4ad17256fb93b (patch)
tree9496ab05b4f85f688b94947a80fc511e1ce9e8f9 /OpenKeychain
parent4e4b8efd6ea275d5fe2d07c188ab8a2581617ec6 (diff)
downloadopen-keychain-fa8d5657bec8fc8106635fd7a5d4ad17256fb93b.tar.gz
open-keychain-fa8d5657bec8fc8106635fd7a5d4ad17256fb93b.tar.bz2
open-keychain-fa8d5657bec8fc8106635fd7a5d4ad17256fb93b.zip
Fixed Snackbar behind keyboard on ImportKeysActivity
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java13
-rw-r--r--OpenKeychain/src/main/res/layout/import_keys_activity.xml20
2 files changed, 24 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
index d59936967..9143609ad 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ImportKeysActivity.java
@@ -26,6 +26,7 @@ import android.os.Messenger;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.View.OnClickListener;
+import android.view.ViewGroup;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
@@ -277,7 +278,8 @@ public class ImportKeysActivity extends BaseActivity {
private boolean isFingerprintValid(String fingerprint) {
if (fingerprint == null || fingerprint.length() < 40) {
- Notify.create(this, R.string.import_qr_code_too_short_fingerprint, Notify.Style.ERROR).show();
+ Notify.create(this, R.string.import_qr_code_too_short_fingerprint, Notify.Style.ERROR)
+ .show((ViewGroup) findViewById(R.id.import_snackbar));
return false;
} else {
return true;
@@ -329,7 +331,8 @@ public class ImportKeysActivity extends BaseActivity {
return;
}
- result.createNotify(ImportKeysActivity.this).show();
+ result.createNotify(ImportKeysActivity.this)
+ .show((ViewGroup) findViewById(R.id.import_snackbar));
}
}
};
@@ -372,7 +375,8 @@ public class ImportKeysActivity extends BaseActivity {
startService(intent);
} catch (IOException e) {
Log.e(Constants.TAG, "Problem writing cache file", e);
- Notify.create(this, "Problem writing cache file!", Notify.Style.ERROR).show();
+ Notify.create(this, "Problem writing cache file!", Notify.Style.ERROR)
+ .show((ViewGroup) findViewById(R.id.import_snackbar));
}
} else if (ls instanceof ImportKeysListFragment.CloudLoaderState) {
ImportKeysListFragment.CloudLoaderState sls = (ImportKeysListFragment.CloudLoaderState) ls;
@@ -412,7 +416,8 @@ public class ImportKeysActivity extends BaseActivity {
// start service with intent
startService(intent);
} else {
- Notify.create(this, R.string.error_nothing_import, Notify.Style.ERROR).show();
+ Notify.create(this, R.string.error_nothing_import, Notify.Style.ERROR)
+ .show((ViewGroup) findViewById(R.id.import_snackbar));
}
}
diff --git a/OpenKeychain/src/main/res/layout/import_keys_activity.xml b/OpenKeychain/src/main/res/layout/import_keys_activity.xml
index 2cba78f37..332b95ce5 100644
--- a/OpenKeychain/src/main/res/layout/import_keys_activity.xml
+++ b/OpenKeychain/src/main/res/layout/import_keys_activity.xml
@@ -50,18 +50,19 @@
android:layout_weight="1"
android:background="@android:color/white" />
- <LinearLayout
+ <RelativeLayout
android:id="@+id/import_footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
android:background="@android:color/white">
<View
+ android:id="@+id/import_divider"
android:layout_width="match_parent"
android:layout_height="1dip"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
android:background="?android:attr/listDivider" />
<TextView
@@ -70,7 +71,10 @@
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_below="@id/import_divider"
android:text="@string/import_import"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_file_download_grey_24dp"
@@ -79,6 +83,12 @@
android:clickable="true"
android:background="?android:selectableItemBackground" />
- </LinearLayout>
+ <RelativeLayout
+ android:id="@+id/import_snackbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignBottom="@id/import_import" />
+
+ </RelativeLayout>
</LinearLayout>
</RelativeLayout> \ No newline at end of file