Floating action button icons and methods for key list

This commit is contained in:
Dominik Schürmann 2015-02-21 20:46:37 +01:00
parent 5b75985f95
commit 32acd94698
74 changed files with 1708 additions and 35 deletions

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

View File

@ -0,0 +1,8 @@
<!-- drawable/qrcode.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M5,5H7V7H5V5M1,1H11V11H1V1M3,3V9H9V3H3M5,17H7V19H5V17M1,13H11V23H1V13M3,15V21H9V15H3M17,5H19V7H17V5M13,1H23V11H13V1M15,3V9H21V3H15M13,13H17V15H19V13H23V15H19V17H23V23H19V21H15V23H13V21H15V19H13V13M21,21V19H19V21H21M19,17H17V15H15V19H19V17Z" />
</vector>

View File

@ -0,0 +1,5 @@
Thanks for visiting MaterialDesignIcons.com
Check back often for new icons and follow @MaterialIcons for updates.
Icon: qrcode
By: Austin Andrews

View File

@ -16,4 +16,7 @@ python copy OpenKeychain action black help 24
python copy OpenKeychain action black settings 24
# floating action button
python copy OpenKeychain av white play_arrow 24
python copy OpenKeychain av white play_arrow 24
# small floating action button
python copy OpenKeychain file white folder 24

View File

@ -28,7 +28,7 @@ dependencies {
compile 'com.jpardogo.materialtabstrip:library:1.0.8'
compile 'it.neokree:MaterialNavigationDrawer:1.3.1'
compile 'com.nispok:snackbar:2.7.4'
compile 'com.getbase:floatingactionbutton:1.7.0'
compile 'com.getbase:floatingactionbutton:1.8.0'
}
android {

View File

@ -56,6 +56,8 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.getbase.floatingactionbutton.FloatingActionButton;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.ConsolidateResult;
@ -105,6 +107,10 @@ public class KeyListFragment extends LoaderFragment
private String mQuery;
private SearchView mSearchView;
private FloatingActionButton mFabQrCode;
private FloatingActionButton mFabCloud;
private FloatingActionButton mFabFile;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -123,6 +129,29 @@ public class KeyListFragment extends LoaderFragment
mStickyList = (StickyListHeadersListView) view.findViewById(R.id.key_list_list);
mStickyList.setOnItemClickListener(this);
mFabQrCode = (FloatingActionButton) view.findViewById(R.id.fab_add_qr_code);
mFabCloud = (FloatingActionButton) view.findViewById(R.id.fab_add_cloud);
mFabFile = (FloatingActionButton) view.findViewById(R.id.fab_add_file);
mFabQrCode.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
scanQrCode();
}
});
mFabCloud.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
searchCloud();
}
});
mFabFile.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
importFile();
}
});
mSwipeRefreshLayout = (ListAwareSwipeRefreshLayout) view.findViewById(R.id.key_list_swipe_container);
mSwipeRefreshLayout.setOnRefreshListener(new NoScrollableSwipeRefreshLayout.OnRefreshListener() {
@Override
@ -496,26 +525,11 @@ public class KeyListFragment extends LoaderFragment
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_key_list_add:
Intent scanQrCode = new Intent(getActivity(), QrCodeScanActivity.class);
scanQrCode.setAction(QrCodeScanActivity.ACTION_SCAN_WITH_RESULT);
startActivityForResult(scanQrCode, 0);
return true;
case R.id.menu_key_list_search_cloud:
searchCloud();
return true;
case R.id.menu_key_list_create:
createKey();
return true;
case R.id.menu_key_list_import_existing_key:
Intent intentImportExisting = new Intent(getActivity(), ImportKeysActivity.class);
intentImportExisting.setAction(ImportKeysActivity.ACTION_IMPORT_KEY_FROM_FILE_AND_RETURN);
startActivityForResult(intentImportExisting, 0);
return true;
case R.id.menu_key_list_export:
mExportHelper.showExportKeysDialog(null, Constants.Path.APP_DIR_FILE, true);
return true;
@ -587,6 +601,18 @@ public class KeyListFragment extends LoaderFragment
startActivity(importIntent);
}
private void scanQrCode() {
Intent scanQrCode = new Intent(getActivity(), QrCodeScanActivity.class);
scanQrCode.setAction(QrCodeScanActivity.ACTION_SCAN_WITH_RESULT);
startActivityForResult(scanQrCode, 0);
}
private void importFile() {
Intent intentImportExisting = new Intent(getActivity(), ImportKeysActivity.class);
intentImportExisting.setAction(ImportKeysActivity.ACTION_IMPORT_KEY_FROM_FILE_AND_RETURN);
startActivityForResult(intentImportExisting, 0);
}
private void createKey() {
Intent intent = new Intent(getActivity(), CreateKeyActivity.class);
startActivityForResult(intent, 0);

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View File

@ -0,0 +1,8 @@
<!-- drawable/qrcode.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#fff" android:pathData="M5,5H7V7H5V5M1,1H11V11H1V1M3,3V9H9V3H3M5,17H7V19H5V17M1,13H11V23H1V13M3,15V21H9V15H3M17,5H19V7H17V5M13,1H23V11H13V1M15,3V9H21V3H15M13,13H17V15H19V13H23V15H19V17H23V23H19V21H15V23H13V21H15V19H13V13M21,21V19H19V21H21M19,17H17V15H15V19H19V17Z" />
</vector>

View File

@ -63,18 +63,20 @@
android:layout_marginEnd="16dp">
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_add_cloud"
android:id="@+id/fab_add_qr_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_icon="@drawable/qrcode"
fab:fab_colorNormal="@color/fab"
fab:fab_colorPressed="@color/fab_pressed"
fab:fab_title="Scan QR Code"
fab:fab_size="mini" />
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_add_qr_code"
android:id="@+id/fab_add_cloud"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_icon="@drawable/ic_cloud_search_24px"
fab:fab_colorNormal="@color/fab"
fab:fab_colorPressed="@color/fab_pressed"
fab:fab_title="Search Cloud"
@ -84,6 +86,7 @@
android:id="@+id/fab_add_file"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_icon="@drawable/ic_folder_white_24dp"
fab:fab_colorNormal="@color/fab"
fab:fab_colorPressed="@color/fab_pressed"
fab:fab_title="Import from File"

View File

@ -9,17 +9,6 @@
app:actionViewClass="android.support.v7.widget.SearchView"
app:showAsAction="collapseActionView|always" />
<item
android:id="@+id/menu_key_list_search_cloud"
android:icon="@drawable/ic_cloud_search_24px"
android:title="@string/menu_search_cloud"
app:showAsAction="never" />
<item
android:id="@+id/menu_key_list_add"
android:title="@string/import_qr_code_button"
app:showAsAction="never" />
<item
android:id="@+id/menu_key_list_export"
android:title="@string/menu_export_all_keys"
@ -30,11 +19,6 @@
android:title="@string/menu_create_key"
app:showAsAction="never" />
<item
android:id="@+id/menu_key_list_import_existing_key"
android:title="@string/menu_import_existing_key"
app:showAsAction="never" />
<item
android:id="@+id/menu_key_list_debug_cons"
android:title="Debug / Consolidate"