mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-17 07:30:14 -05:00
UI fixes for Android < 5
This commit is contained in:
parent
4732bc5744
commit
4c74dbe11e
@ -6,8 +6,8 @@ dependencies {
|
|||||||
// NOTE: libraries are pinned to a specific build, see below
|
// NOTE: libraries are pinned to a specific build, see below
|
||||||
|
|
||||||
// from local Android SDK
|
// from local Android SDK
|
||||||
compile 'com.android.support:support-v4:22.1.0'
|
compile 'com.android.support:support-v4:22.1.1'
|
||||||
compile 'com.android.support:appcompat-v7:22.1.0'
|
compile 'com.android.support:appcompat-v7:22.1.1'
|
||||||
compile 'com.android.support:recyclerview-v7:22.1.0'
|
compile 'com.android.support:recyclerview-v7:22.1.0'
|
||||||
compile 'com.android.support:cardview-v7:22.1.0'
|
compile 'com.android.support:cardview-v7:22.1.0'
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ dependencies {
|
|||||||
// Comment out the libs referenced as git submodules!
|
// Comment out the libs referenced as git submodules!
|
||||||
dependencyVerification {
|
dependencyVerification {
|
||||||
verify = [
|
verify = [
|
||||||
'com.android.support:support-v4:74cb322740317b11a785eee1a94969426fade946123c4ae3f471276adaaaf54b',
|
'com.android.support:support-v4:1e2e4d35ac7fd30db5ce3bc177b92e4d5af86acef2ef93e9221599d733346f56',
|
||||||
'com.android.support:appcompat-v7:6cc7fc2df4be0676f78ecfc5d3cda388e59890d11308811944f54efd84b047b7',
|
'com.android.support:appcompat-v7:9a2355537c2f01cf0b95523605c18606b8d824017e6e94a05c77b0cfc8f21c96',
|
||||||
'com.android.support:recyclerview-v7:522d323079a29bcd76173bd9bc7535223b4af3e5eefef9d9287df1f9e54d0c10',
|
'com.android.support:recyclerview-v7:522d323079a29bcd76173bd9bc7535223b4af3e5eefef9d9287df1f9e54d0c10',
|
||||||
'com.android.support:cardview-v7:8dc99af71fec000baa4470c3907755264f15f816920861bc015b2babdbb49807',
|
'com.android.support:cardview-v7:8dc99af71fec000baa4470c3907755264f15f816920861bc015b2babdbb49807',
|
||||||
'com.eftimoff:android-patternview:cec80e7265b8d8278b3c55b5fcdf551e4600ac2c8bf60d8dd76adca538af0b1e',
|
'com.eftimoff:android-patternview:cec80e7265b8d8278b3c55b5fcdf551e4600ac2c8bf60d8dd76adca538af0b1e',
|
||||||
@ -74,7 +74,7 @@ dependencyVerification {
|
|||||||
// 'OpenKeychain.extern.KeybaseLib:Lib:c91cda4a75692d8664644cd17d8ac962ce5bc0e266ea26673a639805f1eccbdf',
|
// 'OpenKeychain.extern.KeybaseLib:Lib:c91cda4a75692d8664644cd17d8ac962ce5bc0e266ea26673a639805f1eccbdf',
|
||||||
// 'OpenKeychain.extern:safeslinger-exchange:d222721bb35408daaab9f46449364b2657112705ee571d7532f81cbeb9c4a73f',
|
// 'OpenKeychain.extern:safeslinger-exchange:d222721bb35408daaab9f46449364b2657112705ee571d7532f81cbeb9c4a73f',
|
||||||
// 'OpenKeychain.extern.snackbar:lib:52357426e5275412e2063bdf6f0e6b957a3ea74da45e0aef35d22d9afc542e23',
|
// 'OpenKeychain.extern.snackbar:lib:52357426e5275412e2063bdf6f0e6b957a3ea74da45e0aef35d22d9afc542e23',
|
||||||
'com.android.support:support-annotations:9c59286413a2bb93e199c73261e58d5af32da7ae0a12cbd075f581a5de1fb446',
|
'com.android.support:support-annotations:7bc07519aa613b186001160403bcfd68260fa82c61cc7e83adeedc9b862b94ae',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,11 +125,7 @@ public class CreateKeyEmailFragment extends Fragment {
|
|||||||
// initial values
|
// initial values
|
||||||
if (mAdditionalEmailModels == null) {
|
if (mAdditionalEmailModels == null) {
|
||||||
mAdditionalEmailModels = new ArrayList<>();
|
mAdditionalEmailModels = new ArrayList<>();
|
||||||
if (mCreateKeyActivity.mAdditionalEmails != null) {
|
|
||||||
mEmailAdapter.addAll(mCreateKeyActivity.mAdditionalEmails);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mEmailAdapter == null) {
|
if (mEmailAdapter == null) {
|
||||||
mEmailAdapter = new EmailAdapter(mAdditionalEmailModels, new View.OnClickListener() {
|
mEmailAdapter = new EmailAdapter(mAdditionalEmailModels, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -138,6 +134,9 @@ public class CreateKeyEmailFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (mAdditionalEmailModels.isEmpty() && mCreateKeyActivity.mAdditionalEmails != null) {
|
||||||
|
mEmailAdapter.addAll(mCreateKeyActivity.mAdditionalEmails);
|
||||||
|
}
|
||||||
|
|
||||||
mEmailsRecyclerView.setAdapter(mEmailAdapter);
|
mEmailsRecyclerView.setAdapter(mEmailAdapter);
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ import android.app.Activity;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.method.HideReturnsTransformationMethod;
|
import android.text.method.HideReturnsTransformationMethod;
|
||||||
import android.text.method.PasswordTransformationMethod;
|
import android.text.method.PasswordTransformationMethod;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -37,9 +36,6 @@ import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
|
|||||||
import org.sufficientlysecure.keychain.ui.widget.PassphraseEditText;
|
import org.sufficientlysecure.keychain.ui.widget.PassphraseEditText;
|
||||||
import org.sufficientlysecure.keychain.util.Passphrase;
|
import org.sufficientlysecure.keychain.util.Passphrase;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
public class CreateKeyPassphraseFragment extends Fragment {
|
public class CreateKeyPassphraseFragment extends Fragment {
|
||||||
|
|
||||||
// view
|
// view
|
||||||
@ -111,8 +107,8 @@ public class CreateKeyPassphraseFragment extends Fragment {
|
|||||||
// initial values
|
// initial values
|
||||||
// TODO: using String here is unsafe...
|
// TODO: using String here is unsafe...
|
||||||
if (mCreateKeyActivity.mPassphrase != null) {
|
if (mCreateKeyActivity.mPassphrase != null) {
|
||||||
mPassphraseEdit.setText(Arrays.toString(mCreateKeyActivity.mPassphrase.getCharArray()));
|
mPassphraseEdit.setText(new String(mCreateKeyActivity.mPassphrase.getCharArray()));
|
||||||
mPassphraseEditAgain.setText(Arrays.toString(mCreateKeyActivity.mPassphrase.getCharArray()));
|
mPassphraseEditAgain.setText(new String(mCreateKeyActivity.mPassphrase.getCharArray()));
|
||||||
}
|
}
|
||||||
|
|
||||||
mPassphraseEdit.requestFocus();
|
mPassphraseEdit.requestFocus();
|
||||||
|
@ -64,7 +64,7 @@ public class MainActivity extends AppCompatActivity implements FabContainer {
|
|||||||
transaction.replace(R.id.main_fragment_container, mainFragment);
|
transaction.replace(R.id.main_fragment_container, mainFragment);
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
|
|
||||||
mToolbar = (Toolbar) findViewById(R.id.activity_main_toolbar);
|
mToolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
mToolbar.setTitle(R.string.app_name);
|
mToolbar.setTitle(R.string.app_name);
|
||||||
setSupportActionBar(mToolbar);
|
setSupportActionBar(mToolbar);
|
||||||
|
|
||||||
|
@ -1,19 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar
|
||||||
android:id="@+id/activity_main_toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="wrap_content"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
android:background="?attr/colorPrimary"/>
|
android:background="?attr/colorPrimary"
|
||||||
|
android:minHeight="?attr/actionBarSize"
|
||||||
|
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||||
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
|
||||||
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/main_fragment_container"
|
android:id="@+id/main_fragment_container"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"/>
|
android:layout_width="match_parent" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -8,17 +8,12 @@
|
|||||||
<item name="colorPrimaryDark">@color/primary_dark</item>
|
<item name="colorPrimaryDark">@color/primary_dark</item>
|
||||||
<item name="colorAccent">@color/accent</item>
|
<item name="colorAccent">@color/accent</item>
|
||||||
|
|
||||||
|
<!-- remove actionbar and title, we use toolbar! -->
|
||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
<!-- remove actionbar, we use toolbar! -->
|
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
<!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 -->
|
<!-- multi selection should overlay Toolbar! http://stackoverflow.com/a/26450875 -->
|
||||||
<item name="windowActionModeOverlay">true</item>
|
<item name="windowActionModeOverlay">true</item>
|
||||||
<item name="searchViewStyle">@style/MySearchViewStyle</item>
|
<item name="searchViewStyle">@style/MySearchViewStyle</item>
|
||||||
|
|
||||||
<!-- dark action bar... -->
|
|
||||||
<item name="theme">@style/ThemeOverlay.AppCompat.Dark</item>
|
|
||||||
<!-- ...but light popup menu (white background) -->
|
|
||||||
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html -->
|
<!-- http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html -->
|
||||||
|
Loading…
Reference in New Issue
Block a user