Use Toolbar and new BaseActivity

This commit is contained in:
Dominik Schürmann
2015-01-13 23:15:13 +01:00
parent 862d1f1971
commit d8ff737fc5
43 changed files with 1199 additions and 887 deletions

View File

@@ -26,17 +26,15 @@ import org.sufficientlysecure.keychain.R;
/** /**
* Signs the specified public key with the specified secret master key * Signs the specified public key with the specified secret master key
*/ */
public class CertifyKeyActivity extends ActionBarActivity { public class CertifyKeyActivity extends BaseActivity {
public static final String EXTRA_RESULT = "operation_result"; public static final String EXTRA_RESULT = "operation_result";
public static final String EXTRA_KEY_IDS = "extra_key_ids"; public static final String EXTRA_KEY_IDS = "extra_key_ids";
public static final String EXTRA_CERTIFY_KEY_ID = "certify_key_id"; public static final String EXTRA_CERTIFY_KEY_ID = "certify_key_id";
@Override @Override
public void onCreate(Bundle savedInstanceState) { protected int getLayoutResource() {
super.onCreate(savedInstanceState); return R.layout.certify_key_activity;
setContentView(R.layout.certify_key_activity);
} }
} }

View File

@@ -24,7 +24,7 @@ import android.support.v7.app.ActionBarActivity;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
public class CreateKeyActivity extends ActionBarActivity { public class CreateKeyActivity extends BaseActivity {
public static final String EXTRA_NAME = "name"; public static final String EXTRA_NAME = "name";
public static final String EXTRA_EMAIL = "email"; public static final String EXTRA_EMAIL = "email";
@@ -37,8 +37,6 @@ public class CreateKeyActivity extends ActionBarActivity {
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.create_key_activity);
// pass extras into fragment // pass extras into fragment
CreateKeyInputFragment frag = CreateKeyInputFragment frag =
CreateKeyInputFragment.newInstance( CreateKeyInputFragment.newInstance(
@@ -48,6 +46,11 @@ public class CreateKeyActivity extends ActionBarActivity {
loadFragment(null, frag, FRAG_ACTION_START); loadFragment(null, frag, FRAG_ACTION_START);
} }
@Override
protected int getLayoutResource() {
return R.layout.create_key_activity;
}
public void loadFragment(Bundle savedInstanceState, Fragment fragment, int action) { public void loadFragment(Bundle savedInstanceState, Fragment fragment, int action) {
// However, if we're being restored from a previous state, // However, if we're being restored from a previous state,
// then we don't need to do anything and should return or else // then we don't need to do anything and should return or else

View File

@@ -26,7 +26,7 @@ import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.service.SaveKeyringParcel; import org.sufficientlysecure.keychain.service.SaveKeyringParcel;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
public class EditKeyActivity extends ActionBarActivity { public class EditKeyActivity extends BaseActivity {
public static final String EXTRA_SAVE_KEYRING_PARCEL = "save_keyring_parcel"; public static final String EXTRA_SAVE_KEYRING_PARCEL = "save_keyring_parcel";
@@ -36,8 +36,6 @@ public class EditKeyActivity extends ActionBarActivity {
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.edit_key_activity);
Uri dataUri = getIntent().getData(); Uri dataUri = getIntent().getData();
SaveKeyringParcel saveKeyringParcel = getIntent().getParcelableExtra(EXTRA_SAVE_KEYRING_PARCEL); SaveKeyringParcel saveKeyringParcel = getIntent().getParcelableExtra(EXTRA_SAVE_KEYRING_PARCEL);
if (dataUri == null && saveKeyringParcel == null) { if (dataUri == null && saveKeyringParcel == null) {
@@ -49,6 +47,11 @@ public class EditKeyActivity extends ActionBarActivity {
loadFragment(savedInstanceState, dataUri, saveKeyringParcel); loadFragment(savedInstanceState, dataUri, saveKeyringParcel);
} }
@Override
protected int getLayoutResource() {
return R.layout.edit_key_activity;
}
private void loadFragment(Bundle savedInstanceState, Uri dataUri, SaveKeyringParcel saveKeyringParcel) { private void loadFragment(Bundle savedInstanceState, Uri dataUri, SaveKeyringParcel saveKeyringParcel) {
// However, if we're being restored from a previous state, // However, if we're being restored from a previous state,
// then we don't need to do anything and should return or else // then we don't need to do anything and should return or else

View File

@@ -29,7 +29,7 @@ import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.util.Preferences; import org.sufficientlysecure.keychain.util.Preferences;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
public class FirstTimeActivity extends ActionBarActivity { public class FirstTimeActivity extends BaseActivity {
View mCreateKey; View mCreateKey;
View mImportKey; View mImportKey;
@@ -43,8 +43,6 @@ public class FirstTimeActivity extends ActionBarActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.first_time_activity);
mCreateKey = findViewById(R.id.first_time_create_key); mCreateKey = findViewById(R.id.first_time_create_key);
mImportKey = findViewById(R.id.first_time_import_key); mImportKey = findViewById(R.id.first_time_import_key);
mSkipSetup = findViewById(R.id.first_time_cancel); mSkipSetup = findViewById(R.id.first_time_cancel);
@@ -72,7 +70,11 @@ public class FirstTimeActivity extends ActionBarActivity {
startActivityForResult(intent, REQUEST_CODE_CREATE_OR_IMPORT_KEY); startActivityForResult(intent, REQUEST_CODE_CREATE_OR_IMPORT_KEY);
} }
}); });
}
@Override
protected int getLayoutResource() {
return R.layout.first_time_activity;
} }
@Override @Override

View File

@@ -27,7 +27,7 @@ import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter; import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter;
import org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout; import org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout;
public class HelpActivity extends ActionBarActivity { public class HelpActivity extends BaseActivity {
public static final String EXTRA_SELECTED_TAB = "selected_tab"; public static final String EXTRA_SELECTED_TAB = "selected_tab";
public static final int TAB_START = 0; public static final int TAB_START = 0;
@@ -49,8 +49,6 @@ public class HelpActivity extends ActionBarActivity {
actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setHomeButtonEnabled(false); actionBar.setHomeButtonEnabled(false);
setContentView(R.layout.help_activity);
mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager = (ViewPager) findViewById(R.id.pager);
SlidingTabLayout slidingTabLayout = SlidingTabLayout slidingTabLayout =
(SlidingTabLayout) findViewById(R.id.sliding_tab_layout); (SlidingTabLayout) findViewById(R.id.sliding_tab_layout);
@@ -98,4 +96,9 @@ public class HelpActivity extends ActionBarActivity {
// switch to tab selected by extra // switch to tab selected by extra
mViewPager.setCurrentItem(selectedTab); mViewPager.setCurrentItem(selectedTab);
} }
@Override
protected int getLayoutResource() {
return R.layout.help_activity;
}
} }

View File

@@ -51,7 +51,7 @@ import org.sufficientlysecure.keychain.util.ParcelableFileCache.IteratorWithSize
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
public class ImportKeysActivity extends ActionBarActivity { public class ImportKeysActivity extends BaseActivity {
public static final String ACTION_IMPORT_KEY = OpenKeychainIntents.IMPORT_KEY; public static final String ACTION_IMPORT_KEY = OpenKeychainIntents.IMPORT_KEY;
public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER = OpenKeychainIntents.IMPORT_KEY_FROM_KEYSERVER; public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER = OpenKeychainIntents.IMPORT_KEY_FROM_KEYSERVER;
public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER_AND_RETURN_RESULT = public static final String ACTION_IMPORT_KEY_FROM_KEYSERVER_AND_RETURN_RESULT =
@@ -90,8 +90,6 @@ public class ImportKeysActivity extends ActionBarActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.import_keys_activity);
mImportButton = findViewById(R.id.import_import); mImportButton = findViewById(R.id.import_import);
mImportButton.setOnClickListener(new OnClickListener() { mImportButton.setOnClickListener(new OnClickListener() {
@Override @Override
@@ -103,6 +101,11 @@ public class ImportKeysActivity extends ActionBarActivity {
handleActions(savedInstanceState, getIntent()); handleActions(savedInstanceState, getIntent());
} }
@Override
protected int getLayoutResource() {
return R.layout.import_keys_activity;
}
protected void handleActions(Bundle savedInstanceState, Intent intent) { protected void handleActions(Bundle savedInstanceState, Intent intent) {
String action = intent.getAction(); String action = intent.getAction();
Bundle extras = intent.getExtras(); Bundle extras = intent.getExtras();

View File

@@ -25,7 +25,7 @@ import android.view.View;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.ui.util.ActionBarHelper; import org.sufficientlysecure.keychain.ui.util.ActionBarHelper;
public class LogDisplayActivity extends ActionBarActivity { public class LogDisplayActivity extends BaseActivity {
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
@@ -42,8 +42,11 @@ public class LogDisplayActivity extends ActionBarActivity {
} }
} }
); );
}
setContentView(R.layout.log_display_activity); @Override
protected int getLayoutResource() {
return R.layout.log_display_activity;
} }
} }

View File

@@ -38,7 +38,7 @@ import java.util.Locale;
* For the full specs, see http://g10code.com/docs/openpgp-card-2.0.pdf * For the full specs, see http://g10code.com/docs/openpgp-card-2.0.pdf
*/ */
@TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1) @TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1)
public class NfcActivity extends ActionBarActivity { public class NfcActivity extends BaseActivity {
// actions // actions
public static final String ACTION_SIGN_HASH = "sign_hash"; public static final String ACTION_SIGN_HASH = "sign_hash";
@@ -82,8 +82,6 @@ public class NfcActivity extends ActionBarActivity {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.nfc_activity);
Intent intent = getIntent(); Intent intent = getIntent();
Bundle data = intent.getExtras(); Bundle data = intent.getExtras();
String action = intent.getAction(); String action = intent.getAction();
@@ -123,6 +121,11 @@ public class NfcActivity extends ActionBarActivity {
} }
} }
@Override
protected int getLayoutResource() {
return R.layout.nfc_activity;
}
/** /**
* Called when the system is about to start resuming a previous activity, * Called when the system is about to start resuming a previous activity,
* disables NFC Foreground Dispatch * disables NFC Foreground Dispatch

View File

@@ -36,7 +36,7 @@ import java.nio.ByteBuffer;
* For the full specs, see http://g10code.com/docs/openpgp-card-2.0.pdf * For the full specs, see http://g10code.com/docs/openpgp-card-2.0.pdf
*/ */
@TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1) @TargetApi(Build.VERSION_CODES.GINGERBREAD_MR1)
public class NfcIntentActivity extends ActionBarActivity { public class NfcIntentActivity extends BaseActivity {
// special extra for OpenPgpService // special extra for OpenPgpService
public static final String EXTRA_DATA = "data"; public static final String EXTRA_DATA = "data";
@@ -54,8 +54,6 @@ public class NfcIntentActivity extends ActionBarActivity {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.nfc_activity);
Intent intent = getIntent(); Intent intent = getIntent();
Bundle data = intent.getExtras(); Bundle data = intent.getExtras();
String action = intent.getAction(); String action = intent.getAction();
@@ -87,7 +85,11 @@ public class NfcIntentActivity extends ActionBarActivity {
Log.e(Constants.TAG, "IOException!", e); Log.e(Constants.TAG, "IOException!", e);
finish(); finish();
} }
}
@Override
protected int getLayoutResource() {
return R.layout.nfc_activity;
} }
/** /**

View File

@@ -36,7 +36,7 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
import org.sufficientlysecure.keychain.ui.util.Notify.Style; import org.sufficientlysecure.keychain.ui.util.Notify.Style;
import org.sufficientlysecure.keychain.ui.util.QrCodeUtils; import org.sufficientlysecure.keychain.ui.util.QrCodeUtils;
public class QrCodeViewActivity extends ActionBarActivity { public class QrCodeViewActivity extends BaseActivity {
private ImageView mFingerprintQrCode; private ImageView mFingerprintQrCode;
@@ -56,8 +56,6 @@ public class QrCodeViewActivity extends ActionBarActivity {
} }
); );
setContentView(R.layout.qr_code_activity);
Uri dataUri = getIntent().getData(); Uri dataUri = getIntent().getData();
if (dataUri == null) { if (dataUri == null) {
Log.e(Constants.TAG, "Data missing. Should be Uri of key!"); Log.e(Constants.TAG, "Data missing. Should be Uri of key!");
@@ -108,6 +106,11 @@ public class QrCodeViewActivity extends ActionBarActivity {
} }
} }
@Override
protected int getLayoutResource() {
return R.layout.qr_code_activity;
}
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();

View File

@@ -56,7 +56,7 @@ import edu.cmu.cylab.starslinger.exchange.ExchangeActivity;
import edu.cmu.cylab.starslinger.exchange.ExchangeConfig; import edu.cmu.cylab.starslinger.exchange.ExchangeConfig;
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class SafeSlingerActivity extends ActionBarActivity { public class SafeSlingerActivity extends BaseActivity {
private static final int REQUEST_CODE_SAFE_SLINGER = 211; private static final int REQUEST_CODE_SAFE_SLINGER = 211;
@@ -69,8 +69,6 @@ public class SafeSlingerActivity extends ActionBarActivity {
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.safe_slinger_activity);
mMasterKeyId = getIntent().getLongExtra(EXTRA_MASTER_KEY_ID, 0); mMasterKeyId = getIntent().getLongExtra(EXTRA_MASTER_KEY_ID, 0);
NumberPicker picker = (NumberPicker) findViewById(R.id.safe_slinger_picker); NumberPicker picker = (NumberPicker) findViewById(R.id.safe_slinger_picker);
@@ -96,6 +94,11 @@ public class SafeSlingerActivity extends ActionBarActivity {
}); });
} }
@Override
protected int getLayoutResource() {
return R.layout.safe_slinger_activity;
}
private void startExchange(long masterKeyId, int number) { private void startExchange(long masterKeyId, int number) {
// retrieve public key blob and start SafeSlinger // retrieve public key blob and start SafeSlinger
Uri uri = KeychainContract.KeyRingData.buildPublicKeyRingUri(masterKeyId); Uri uri = KeychainContract.KeyRingData.buildPublicKeyRingUri(masterKeyId);

View File

@@ -27,7 +27,7 @@ import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.ui.util.ActionBarHelper; import org.sufficientlysecure.keychain.ui.util.ActionBarHelper;
public class SelectPublicKeyActivity extends ActionBarActivity { public class SelectPublicKeyActivity extends BaseActivity {
// Actions for internal use only: // Actions for internal use only:
public static final String ACTION_SELECT_PUBLIC_KEYS = Constants.INTENT_PREFIX public static final String ACTION_SELECT_PUBLIC_KEYS = Constants.INTENT_PREFIX
@@ -63,8 +63,6 @@ public class SelectPublicKeyActivity extends ActionBarActivity {
} }
); );
setContentView(R.layout.select_public_key_activity);
setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);
handleIntent(getIntent()); handleIntent(getIntent());
@@ -101,6 +99,11 @@ public class SelectPublicKeyActivity extends ActionBarActivity {
} }
@Override
protected int getLayoutResource() {
return R.layout.select_public_key_activity;
}
@Override @Override
protected void onNewIntent(Intent intent) { protected void onNewIntent(Intent intent) {
super.onNewIntent(intent); super.onNewIntent(intent);

View File

@@ -44,7 +44,7 @@ import org.sufficientlysecure.keychain.util.Log;
/** /**
* Sends the selected public key to a keyserver * Sends the selected public key to a keyserver
*/ */
public class UploadKeyActivity extends ActionBarActivity { public class UploadKeyActivity extends BaseActivity {
private View mUploadButton; private View mUploadButton;
private Spinner mKeyServerSpinner; private Spinner mKeyServerSpinner;
@@ -54,8 +54,6 @@ public class UploadKeyActivity extends ActionBarActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.upload_key_activity);
mUploadButton = findViewById(R.id.upload_key_action_upload); mUploadButton = findViewById(R.id.upload_key_action_upload);
mKeyServerSpinner = (Spinner) findViewById(R.id.upload_key_keyserver); mKeyServerSpinner = (Spinner) findViewById(R.id.upload_key_keyserver);
@@ -86,6 +84,11 @@ public class UploadKeyActivity extends ActionBarActivity {
} }
} }
@Override
protected int getLayoutResource() {
return R.layout.upload_key_activity;
}
private void uploadKey() { private void uploadKey() {
// Send all information needed to service to upload key in other thread // Send all information needed to service to upload key in other thread
Intent intent = new Intent(this, KeychainIntentService.class); Intent intent = new Intent(this, KeychainIntentService.class);

View File

@@ -49,7 +49,7 @@ import org.sufficientlysecure.keychain.util.Log;
import java.util.Date; import java.util.Date;
public class ViewCertActivity extends ActionBarActivity public class ViewCertActivity extends BaseActivity
implements LoaderManager.LoaderCallbacks<Cursor> { implements LoaderManager.LoaderCallbacks<Cursor> {
// These are the rows that we will retrieve. // These are the rows that we will retrieve.
@@ -86,8 +86,6 @@ public class ViewCertActivity extends ActionBarActivity
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.view_cert_activity);
mSigneeKey = (TextView) findViewById(R.id.signee_key); mSigneeKey = (TextView) findViewById(R.id.signee_key);
mSigneeUid = (TextView) findViewById(R.id.signee_uid); mSigneeUid = (TextView) findViewById(R.id.signee_uid);
mAlgorithm = (TextView) findViewById(R.id.algorithm); mAlgorithm = (TextView) findViewById(R.id.algorithm);
@@ -112,6 +110,11 @@ public class ViewCertActivity extends ActionBarActivity
getSupportLoaderManager().initLoader(0, null, this); getSupportLoaderManager().initLoader(0, null, this);
} }
@Override
protected int getLayoutResource() {
return R.layout.view_cert_activity;
}
@Override @Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) { public Loader<Cursor> onCreateLoader(int id, Bundle args) {
// Now create and return a CursorLoader that will take care of // Now create and return a CursorLoader that will take care of

View File

@@ -67,7 +67,7 @@ import org.sufficientlysecure.keychain.ui.util.Notify;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
public class ViewKeyActivity extends ActionBarActivity implements public class ViewKeyActivity extends BaseActivity implements
LoaderManager.LoaderCallbacks<Cursor> { LoaderManager.LoaderCallbacks<Cursor> {
ExportHelper mExportHelper; ExportHelper mExportHelper;
@@ -111,8 +111,6 @@ public class ViewKeyActivity extends ActionBarActivity implements
actionBar.setIcon(android.R.color.transparent); actionBar.setIcon(android.R.color.transparent);
actionBar.setHomeButtonEnabled(true); actionBar.setHomeButtonEnabled(true);
setContentView(R.layout.view_key_activity);
mStatusLayout = (LinearLayout) findViewById(R.id.view_key_status_layout); mStatusLayout = (LinearLayout) findViewById(R.id.view_key_status_layout);
mStatusText = (TextView) findViewById(R.id.view_key_status_text); mStatusText = (TextView) findViewById(R.id.view_key_status_text);
mStatusImage = (ImageView) findViewById(R.id.view_key_status_image); mStatusImage = (ImageView) findViewById(R.id.view_key_status_image);
@@ -124,7 +122,7 @@ public class ViewKeyActivity extends ActionBarActivity implements
mSlidingTabLayout.setCustomTabColorizer(new TabColorizer() { mSlidingTabLayout.setCustomTabColorizer(new TabColorizer() {
@Override @Override
public int getIndicatorColor(int position) { public int getIndicatorColor(int position) {
return 0xFFAA66CC; return 0xFF4caf50;
} }
@Override @Override
@@ -169,6 +167,11 @@ public class ViewKeyActivity extends ActionBarActivity implements
mViewPager.setCurrentItem(switchToTab); mViewPager.setCurrentItem(switchToTab);
} }
@Override
protected int getLayoutResource() {
return R.layout.view_key_activity;
}
private void initTabs(Uri dataUri) { private void initTabs(Uri dataUri) {
mTabsAdapter = new PagerTabStripAdapter(this); mTabsAdapter = new PagerTabStripAdapter(this);
mViewPager.setAdapter(mTabsAdapter); mViewPager.setAdapter(mTabsAdapter);

View File

@@ -31,7 +31,7 @@ import org.sufficientlysecure.keychain.ui.util.ActionBarHelper;
import org.sufficientlysecure.keychain.util.ExportHelper; import org.sufficientlysecure.keychain.util.ExportHelper;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
public class ViewKeyAdvancedActivity extends ActionBarActivity { public class ViewKeyAdvancedActivity extends BaseActivity {
ExportHelper mExportHelper; ExportHelper mExportHelper;
ProviderHelper mProviderHelper; ProviderHelper mProviderHelper;
@@ -55,8 +55,6 @@ public class ViewKeyAdvancedActivity extends ActionBarActivity {
} }
); );
setContentView(R.layout.view_key_advanced_activity);
Uri dataUri = getIntent().getData(); Uri dataUri = getIntent().getData();
if (dataUri == null) { if (dataUri == null) {
Log.e(Constants.TAG, "Data missing. Should be uri of key!"); Log.e(Constants.TAG, "Data missing. Should be uri of key!");
@@ -69,6 +67,11 @@ public class ViewKeyAdvancedActivity extends ActionBarActivity {
startFragment(savedInstanceState, dataUri); startFragment(savedInstanceState, dataUri);
} }
@Override
protected int getLayoutResource() {
return R.layout.view_key_advanced_activity;
}
private void startFragment(Bundle savedInstanceState, Uri dataUri) { private void startFragment(Bundle savedInstanceState, Uri dataUri) {
// However, if we're being restored from a previous state, // However, if we're being restored from a previous state,

View File

@@ -1,28 +1,37 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <LinearLayout
android:layout_below="@id/toolbar"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <include layout="@layout/notify_area" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:padding="16dp"
android:orientation="vertical">
<fragment <LinearLayout
android:id="@+id/api_account_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AccountSettingsFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:padding="16dp"
android:orientation="vertical">
</LinearLayout> <fragment
</ScrollView> android:id="@+id/api_account_settings_fragment"
</LinearLayout> android:name="org.sufficientlysecure.keychain.remote.ui.AccountSettingsFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,41 +1,51 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <LinearLayout
android:layout_below="@id/toolbar"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <include layout="@layout/notify_area" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:padding="16dp"
android:orientation="vertical">
<fragment <LinearLayout
android:id="@+id/api_app_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" /> android:padding="16dp"
android:orientation="vertical">
<TextView <fragment
style="@style/SectionHeader" android:id="@+id/api_app_settings_fragment"
android:layout_width="match_parent" android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:text="@string/api_settings_accounts" /> android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" />
<FrameLayout <TextView
android:id="@+id/api_accounts_list_fragment" style="@style/SectionHeader"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" /> android:text="@string/api_settings_accounts" />
</LinearLayout> <FrameLayout
</ScrollView> android:id="@+id/api_accounts_list_fragment"
</LinearLayout> android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,14 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout
android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content_frame" android:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding" android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<fragment <fragment
android:id="@+id/crypto_consumers_list_fragment" android:id="@+id/crypto_consumers_list_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppsListFragment" android:name="org.sufficientlysecure.keychain.remote.ui.AppsListFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent" />
</FrameLayout> </FrameLayout>
</RelativeLayout>

View File

@@ -1,37 +1,48 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <LinearLayout
android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout <include layout="@layout/notify_area" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:padding="16dp"
android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/api_remote_create_account_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:text="@string/api_create_account_text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<fragment
android:id="@+id/api_account_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AccountSettingsFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" /> android:padding="16dp"
android:orientation="vertical">
</LinearLayout> <TextView
</ScrollView> android:id="@+id/api_remote_create_account_text"
</LinearLayout> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:text="@string/api_create_account_text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<fragment
android:id="@+id/api_account_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AccountSettingsFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,16 +1,27 @@
<?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="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent">
android:orientation="vertical" >
<TextView <include
android:id="@+id/api_app_error_message_text" android:id="@+id/toolbar"
android:layout_width="wrap_content" layout="@layout/toolbar" />
android:layout_height="wrap_content"
android:padding="8dp"
android:paddingBottom="0dip"
android:text="Set in-code!"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout> <LinearLayout
android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<TextView
android:id="@+id/api_app_error_message_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:paddingBottom="0dip"
android:text="Set in-code!"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,29 +1,40 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent">
<LinearLayout <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:padding="16dp"
android:orientation="vertical">
<TextView <LinearLayout
android:id="@+id/api_register_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:text="@string/api_register_text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<fragment
android:id="@+id/api_app_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" /> android:padding="16dp"
android:orientation="vertical">
</LinearLayout> <TextView
</ScrollView> android:id="@+id/api_register_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="3dip"
android:text="@string/api_register_text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<fragment
android:id="@+id/api_app_settings_fragment"
android:name="org.sufficientlysecure.keychain.remote.ui.AppSettingsFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout="@layout/api_app_settings_fragment" />
</LinearLayout>
</ScrollView>
</RelativeLayout>

View File

@@ -1,21 +1,32 @@
<?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="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent">
android:orientation="vertical" >
<TextView <include
android:id="@+id/api_select_pub_keys_text" android:id="@+id/toolbar"
android:layout_width="match_parent" layout="@layout/toolbar" />
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
<FrameLayout <LinearLayout
android:id="@+id/api_select_pub_keys_fragment_container" android:layout_below="@id/toolbar"
android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent" /> android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
</LinearLayout> <TextView
android:id="@+id/api_select_pub_keys_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
<FrameLayout
android:id="@+id/api_select_pub_keys_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,21 +1,32 @@
<?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:orientation="vertical" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="match_parent">
android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/content_frame" android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<fragment <include layout="@layout/notify_area" />
android:id="@+id/multi_certify_key_fragment"
android:name="org.sufficientlysecure.keychain.ui.CertifyKeyFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout> <FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/multi_certify_key_fragment"
android:name="org.sufficientlysecure.keychain.ui.CertifyKeyFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,15 +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" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/create_key_fragment_container" android:layout_below="@id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical" />
</LinearLayout> <include layout="@layout/notify_area" />
<FrameLayout
android:id="@+id/create_key_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,109 +1,117 @@
<?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:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout <LinearLayout
android:layout_below="@id/toolbar"
android:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingTop="4dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <include layout="@layout/notify_area" />
style="@style/SectionHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/section_decrypt_files" />
<TextView
android:id="@+id/decrypt_files"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:text="@string/btn_decrypt_files"
android:drawableRight="@drawable/ic_action_collection"
android:drawablePadding="8dp"
android:gravity="center_vertical" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:layout_marginBottom="8dp" />
<TextView
style="@style/SectionHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/section_decrypt_text" />
<LinearLayout <LinearLayout
android:id="@+id/decrypt_from_clipboard"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight" android:layout_height="match_parent"
android:clickable="true" android:paddingTop="4dp"
android:paddingRight="4dp" android:paddingLeft="16dp"
style="@style/SelectableItem" android:paddingRight="16dp"
android:orientation="horizontal"> android:orientation="vertical">
<TextView
style="@style/SectionHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/section_decrypt_files" />
<TextView
android:id="@+id/decrypt_files"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:text="@string/btn_decrypt_files"
android:drawableRight="@drawable/ic_action_collection"
android:drawablePadding="8dp"
android:gravity="center_vertical" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:layout_marginBottom="8dp" />
<TextView
style="@style/SectionHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/section_decrypt_text" />
<LinearLayout <LinearLayout
android:layout_width="0dp" android:id="@+id/decrypt_from_clipboard"
android:layout_height="match_parent" android:layout_width="match_parent"
android:layout_weight="1" android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
android:paddingRight="4dp" android:paddingRight="4dp"
android:gravity="center_vertical" style="@style/SelectableItem"
android:orientation="vertical"> android:orientation="horizontal">
<TextView <LinearLayout
android:paddingLeft="8dp" android:layout_width="0dp"
android:textAppearance="?android:attr/textAppearanceMedium" android:layout_height="match_parent"
android:layout_width="match_parent" android:layout_weight="1"
android:layout_height="wrap_content" android:paddingRight="4dp"
android:text="@string/btn_decrypt_clipboard" /> android:gravity="center_vertical"
android:orientation="vertical">
<TextView <TextView
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/tertiary_text_light" android:text="@string/btn_decrypt_clipboard" />
android:text="@string/btn_decrypt_and_verify"
android:gravity="center_vertical" /> <TextView
android:paddingLeft="8dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/tertiary_text_light"
android:text="@string/btn_decrypt_and_verify"
android:gravity="center_vertical" />
</LinearLayout>
<ImageView
android:id="@+id/clipboard_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_action_paste"
android:layout_gravity="center_vertical" />
</LinearLayout> </LinearLayout>
<ImageView <View
android:id="@+id/clipboard_icon" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="1dip"
android:layout_height="match_parent" android:background="?android:attr/listDivider"
android:padding="8dp" android:layout_marginBottom="8dp" />
android:src="@drawable/ic_action_paste"
android:layout_gravity="center_vertical" />
</LinearLayout> </LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:layout_marginBottom="8dp" />
</LinearLayout> </LinearLayout>
</RelativeLayout>
</LinearLayout>

View File

@@ -1,14 +1,24 @@
<?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">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/decrypt_text_fragment_container" android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout> <include layout="@layout/notify_area" />
<FrameLayout
android:id="@+id/decrypt_text_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,15 +1,25 @@
<?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:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area"/> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/edit_key_fragment_container" android:layout_below="@id/toolbar"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical" />
</LinearLayout> <include layout="@layout/notify_area" />
<FrameLayout
android:id="@+id/edit_key_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"> <merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:id="@+id/label_fileCompression" android:id="@+id/label_fileCompression"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:paddingRight="10dip" android:paddingRight="10dip"
android:text="@string/label_file_compression" android:text="@string/label_file_compression"
android:textAppearance="?android:attr/textAppearanceSmall"/> android:textAppearance="?android:attr/textAppearanceSmall" />
<Spinner <Spinner
android:id="@+id/fileCompression" android:id="@+id/fileCompression"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"/> android:layout_gravity="center_vertical" />
</LinearLayout> </LinearLayout>
</merge> </merge>

View File

@@ -1,23 +1,33 @@
<?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:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/encrypt_pager_mode" android:layout_below="@id/toolbar"
android:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical" /> android:orientation="vertical">
<fragment <include layout="@layout/notify_area" />
android:id="@+id/encrypt_file_fragment"
android:name="org.sufficientlysecure.keychain.ui.EncryptFilesFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout> <FrameLayout
android:id="@+id/encrypt_pager_mode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<fragment
android:id="@+id/encrypt_file_fragment"
android:name="org.sufficientlysecure.keychain.ui.EncryptFilesFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,24 +1,33 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout
android:layout_below="@id/toolbar"
android:id="@+id/content_frame" android:id="@+id/content_frame"
android:layout_marginLeft="@dimen/drawer_content_padding" android:layout_marginLeft="@dimen/drawer_content_padding"
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">
<include layout="@layout/notify_area"/> <include layout="@layout/notify_area" />
<FrameLayout <FrameLayout
android:id="@+id/encrypt_pager_mode" android:id="@+id/encrypt_pager_mode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" /> android:orientation="vertical" />
<fragment <fragment
android:id="@+id/encrypt_text_fragment" android:id="@+id/encrypt_text_fragment"
android:name="org.sufficientlysecure.keychain.ui.EncryptTextFragment" android:name="org.sufficientlysecure.keychain.ui.EncryptTextFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>
</RelativeLayout>

View File

@@ -1,17 +1,28 @@
<?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" >
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout
android:layout_below="@id/toolbar"
<org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout
android:id="@+id/sliding_tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager <org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout
android:id="@+id/pager" android:id="@+id/sliding_tab_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="wrap_content" />
</LinearLayout> <android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,68 +1,78 @@
<?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">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
<FrameLayout layout="@layout/toolbar" />
android:id="@+id/import_keys_top_container"
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="vertical"
android:background="@android:color/white" />
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="?android:attr/listDivider" />
<View
android:layout_width="match_parent"
android:layout_height="16dp" />
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="?android:attr/listDivider" />
<FrameLayout
android:id="@+id/import_keys_list_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="1"
android:background="@android:color/white" />
<LinearLayout <LinearLayout
android:id="@+id/import_footer" android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical">
android:paddingLeft="16dp"
android:paddingRight="16dp" <include layout="@layout/notify_area" />
android:background="@android:color/white">
<FrameLayout
android:id="@+id/import_keys_top_container"
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="vertical"
android:background="@android:color/white" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dip" android:layout_height="2dip"
android:background="?android:attr/listDivider" /> android:background="?android:attr/listDivider" />
<TextView <View
android:id="@+id/import_import"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="16dp" />
android:text="@string/import_import"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_download"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
<View
android:layout_width="match_parent"
android:layout_height="2dip"
android:background="?android:attr/listDivider" />
<FrameLayout
android:id="@+id/import_keys_list_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:layout_weight="1"
android:background="@android:color/white" />
<LinearLayout
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:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/import_import"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/import_import"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_download"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </RelativeLayout>

View File

@@ -1,82 +1,94 @@
<?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="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent">
android:orientation="vertical" >
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout <LinearLayout
android:id="@+id/text_layout" android:layout_below="@id/toolbar"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="fill_parent"
android:gravity="center_vertical" android:orientation="vertical">
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal" >
<LinearLayout <LinearLayout
android:layout_width="0dip" android:id="@+id/text_layout"
android:layout_height="wrap_content"
android:layout_marginBottom="6sp"
android:layout_marginLeft="16sp"
android:layout_marginRight="6sp"
android:layout_marginTop="6sp"
android:layout_weight="1"
android:background="@android:drawable/menuitem_background"
android:orientation="vertical"
android:focusable="true" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<Button
android:id="@+id/rotate"
android:layout_width="wrap_content"
android:layout_height="31dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dip"
android:layout_marginRight="6dip"
android:text="rotate"
android:textColor="#ffffffff"
android:textStyle="bold"
android:background="@drawable/button_rounded_blue"
/>
<ImageButton
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="10dp"
android:src="@drawable/plus"
android:background="@drawable/button_rounded_green"/>
</LinearLayout>
<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/editors"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" /> android:gravity="center_vertical"
</ScrollView> android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal">
</LinearLayout> <LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginBottom="6sp"
android:layout_marginLeft="16sp"
android:layout_marginRight="6sp"
android:layout_marginTop="6sp"
android:layout_weight="1"
android:background="@android:drawable/menuitem_background"
android:orientation="vertical"
android:focusable="true">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
<Button
android:id="@+id/rotate"
android:layout_width="wrap_content"
android:layout_height="31dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4dip"
android:layout_marginRight="6dip"
android:text="rotate"
android:textColor="#ffffffff"
android:textStyle="bold"
android:background="@drawable/button_rounded_blue" />
<ImageButton
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="10dp"
android:src="@drawable/plus"
android:background="@drawable/button_rounded_green" />
</LinearLayout>
<View
android:id="@+id/separator"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout
android:id="@+id/editors"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,16 +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" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:paddingLeft="8dp"
android:paddingRight="8dp">
<fragment <include
android:id="@+id/list" android:id="@+id/toolbar"
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment" layout="@layout/toolbar" />
<LinearLayout
android:layout_below="@id/toolbar"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:layout_weight="0.9" /> android:paddingLeft="8dp"
android:paddingRight="8dp">
</LinearLayout> <fragment
android:id="@+id/list"
android:name="org.sufficientlysecure.keychain.ui.LogDisplayFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.9" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,24 +1,35 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <?xml version="1.0" encoding="utf-8"?>
<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:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp">
<TextView <include
android:text="@string/nfc_text" android:id="@+id/toolbar"
android:layout_width="wrap_content" layout="@layout/toolbar" />
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Large"
android:id="@+id/nfc_text"
android:gravity="center"
android:layout_gravity="center" />
<ImageView <LinearLayout
android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:src="@drawable/yubikey_phone" /> android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingTop="16dp"
android:paddingBottom="16dp">
</LinearLayout> <TextView
android:text="@string/nfc_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Large"
android:id="@+id/nfc_text"
android:gravity="center"
android:layout_gravity="center" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/yubikey_phone" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,14 +1,24 @@
<?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">
<ImageView <include
android:id="@+id/qr_code_image" android:id="@+id/toolbar"
android:padding="32dp" layout="@layout/toolbar" />
<LinearLayout
android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
style="@style/SelectableItem" /> android:orientation="vertical">
</LinearLayout> <ImageView
android:id="@+id/qr_code_image"
android:padding="32dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/SelectableItem" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,75 +1,86 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <?xml version="1.0" encoding="utf-8"?>
<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">
<LinearLayout <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView <LinearLayout
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/exchange_description"
android:layout_weight="1"
android:gravity="center_vertical"/>
<NumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/safe_slinger_picker" android:orientation="horizontal">
/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/exchange_description"
android:layout_weight="1"
android:gravity="center_vertical" />
<NumberPicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/safe_slinger_picker" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/safe_slinger_button"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
android:paddingRight="4dp"
style="@style/SelectableItem"
android:orientation="horizontal">
<TextView
android:paddingLeft="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="match_parent"
android:text="Start exchange"
android:layout_weight="1"
android:gravity="center_vertical" />
<!-- separate ImageView required for recoloring -->
<ImageView
android:id="@+id/safe_slinger_button_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_action_safeslinger"
android:layout_gravity="center_vertical" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginBottom="4dp"
android:background="?android:attr/listDivider" />
</LinearLayout> </LinearLayout>
</ScrollView>
<View </RelativeLayout>
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<LinearLayout
android:id="@+id/safe_slinger_button"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:clickable="true"
android:paddingRight="4dp"
style="@style/SelectableItem"
android:orientation="horizontal">
<TextView
android:paddingLeft="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="0dip"
android:layout_height="match_parent"
android:text="Start exchange"
android:layout_weight="1"
android:gravity="center_vertical" />
<!-- separate ImageView required for recoloring -->
<ImageView
android:id="@+id/safe_slinger_button_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:src="@drawable/ic_action_safeslinger"
android:layout_gravity="center_vertical" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginBottom="4dp"
android:background="?android:attr/listDivider" />
</LinearLayout>
</ScrollView>

View File

@@ -1,12 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_centerHorizontal="true" >
<FrameLayout <include
android:id="@+id/select_public_key_fragment_container" android:id="@+id/toolbar"
layout="@layout/toolbar" />
<RelativeLayout
android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
android:layout_centerHorizontal="true">
<FrameLayout
android:id="@+id/select_public_key_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</RelativeLayout> </RelativeLayout>

View File

@@ -1,62 +1,72 @@
<?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:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <LinearLayout
android:layout_below="@id/toolbar"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <include layout="@layout/notify_area" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:orientation="vertical">
<TextView <LinearLayout
style="@style/SectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/section_key_server" />
<Spinner
android:id="@+id/upload_key_keyserver"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:paddingLeft="16dp"
android:layout_marginTop="4dp" /> android:paddingRight="16dp"
android:orientation="vertical">
<TextView <TextView
style="@style/SectionHeader" style="@style/SectionHeader"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_marginTop="14dp" android:layout_marginBottom="4dp"
android:text="@string/section_actions" android:layout_marginTop="14dp"
android:layout_weight="1" /> android:text="@string/section_key_server" />
<TextView <Spinner
android:id="@+id/upload_key_action_upload" android:id="@+id/upload_key_keyserver"
android:paddingLeft="8dp" android:layout_width="match_parent"
android:paddingRight="8dp" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="4dp"
android:textAppearance="?android:attr/textAppearanceMedium" android:layout_marginTop="4dp" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/btn_export_to_server"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_upload"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
</LinearLayout> <TextView
style="@style/SectionHeader"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="14dp"
android:text="@string/section_actions"
android:layout_weight="1" />
</ScrollView> <TextView
</LinearLayout> android:id="@+id/upload_key_action_upload"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_marginBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/btn_export_to_server"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_upload"
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:clickable="true"
style="@style/SelectableItem" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>

View File

@@ -1,213 +1,226 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <?xml version="1.0" encoding="utf-8"?>
<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">
<!-- focusable and related properties to workaround http://stackoverflow.com/q/16182331--> <include
<LinearLayout android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView
android:layout_below="@id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent">
android:focusable="true"
android:focusableInTouchMode="true"
android:descendantFocusability="beforeDescendants"
android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView <!-- focusable and related properties to workaround http://stackoverflow.com/q/16182331-->
style="@style/SectionHeader" <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/section_cert" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:stretchColumns="1">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_key_id" />
<TextView
android:id="@+id/signee_key"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_user_id" />
<TextView
android:id="@+id/signee_uid"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_algorithm" />
<TextView
android:id="@+id/algorithm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_cert_type" />
<TextView
android:id="@+id/signature_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/row_reason">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_revocation" />
<TextView
android:id="@+id/reason"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_creation" />
<TextView
android:id="@+id/creation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
</TableLayout>
<TextView
style="@style/SectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/section_certifier_id" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="4dp"
android:layout_weight="1"
android:stretchColumns="1">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:text="@string/label_key_id" />
<TextView
android:id="@+id/signer_key_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/label_algorithm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_user_id" />
<TextView
android:id="@+id/signer_uid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
</TableLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/view_cert_view_cert_key"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_marginBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight" android:focusable="true"
android:clickable="true" android:focusableInTouchMode="true"
style="@style/SelectableItem" android:descendantFocusability="beforeDescendants"
android:text="@string/btn_view_cert_key" android:orientation="vertical"
android:layout_weight="1" android:paddingLeft="16dp"
android:drawableRight="@drawable/ic_action_person" android:paddingRight="16dp">
android:drawablePadding="8dp"
android:gravity="center_vertical" />
</LinearLayout> <TextView
style="@style/SectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/section_cert" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_weight="1"
android:stretchColumns="1">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_key_id" />
<TextView
android:id="@+id/signee_key"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_user_id" />
<TextView
android:id="@+id/signee_uid"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_algorithm" />
<TextView
android:id="@+id/algorithm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_cert_type" />
<TextView
android:id="@+id/signature_type"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/row_reason">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_revocation" />
<TextView
android:id="@+id/reason"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_creation" />
<TextView
android:id="@+id/creation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
</TableLayout>
<TextView
style="@style/SectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginTop="14dp"
android:text="@string/section_certifier_id" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="4dp"
android:layout_weight="1"
android:stretchColumns="1">
<TableRow>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:text="@string/label_key_id" />
<TextView
android:id="@+id/signer_key_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView
android:id="@+id/label_algorithm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingRight="10dip"
android:text="@string/label_user_id" />
<TextView
android:id="@+id/signer_uid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip" />
</TableRow>
</TableLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<TextView
android:id="@+id/view_cert_view_cert_key"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_marginBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:clickable="true"
style="@style/SelectableItem"
android:text="@string/btn_view_cert_key"
android:layout_weight="1"
android:drawableRight="@drawable/ic_action_person"
android:drawablePadding="8dp"
android:gravity="center_vertical" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
</ScrollView>

View File

@@ -1,52 +1,62 @@
<?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">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout <LinearLayout
android:id="@+id/view_key_status_layout" android:layout_below="@id/toolbar"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="center" android:orientation="vertical">
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView <include layout="@layout/notify_area" />
android:id="@+id/view_key_status_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView <LinearLayout
android:id="@+id/view_key_status_text" android:id="@+id/view_key_status_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium" android:layout_gravity="center"
android:layout_gravity="center_vertical" android:layout_marginTop="8dp"
android:layout_marginLeft="8dp" /> android:layout_marginBottom="8dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/view_key_status_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/view_key_status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:visibility="gone"
android:id="@+id/view_key_status_divider" />
<org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout
android:id="@+id/view_key_sliding_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v4.view.ViewPager
android:id="@+id/view_key_pager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@android:color/white" />
</LinearLayout> </LinearLayout>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider"
android:visibility="gone"
android:id="@+id/view_key_status_divider" />
<org.sufficientlysecure.keychain.ui.widget.SlidingTabLayout
android:id="@+id/view_key_sliding_tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v4.view.ViewPager
android:id="@+id/view_key_pager"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:background="@android:color/white" />
</LinearLayout>

View File

@@ -1,22 +1,32 @@
<?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:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" /> <include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout <LinearLayout
android:id="@+id/content_frame" android:layout_below="@id/toolbar"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include layout="@layout/notify_area" />
<FrameLayout <FrameLayout
android:id="@+id/view_key_advanced_fragment" android:id="@+id/content_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:orientation="vertical" />
</FrameLayout> <FrameLayout
android:id="@+id/view_key_advanced_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout> </FrameLayout>
</LinearLayout>
</RelativeLayout>