Move encrypt decrypt operations in own starter activity
@ -10,8 +10,7 @@ python copy OpenKeychain navigation white refresh 24
|
|||||||
|
|
||||||
# navigation drawer sections
|
# navigation drawer sections
|
||||||
python copy OpenKeychain communication black vpn_key 24
|
python copy OpenKeychain communication black vpn_key 24
|
||||||
python copy OpenKeychain action black lock_open 24
|
python copy OpenKeychain action black lock 24
|
||||||
python copy OpenKeychain action black lock_outline 24
|
|
||||||
python copy OpenKeychain navigation black apps 24
|
python copy OpenKeychain navigation black apps 24
|
||||||
python copy OpenKeychain action black help 24
|
python copy OpenKeychain action black help 24
|
||||||
python copy OpenKeychain action black settings 24
|
python copy OpenKeychain action black settings 24
|
||||||
|
@ -35,10 +35,12 @@ import org.sufficientlysecure.keychain.ui.util.SubtleAttentionSeeker;
|
|||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|
||||||
public class DecryptOverviewFragment extends Fragment {
|
public class EncryptDecryptOverviewFragment extends Fragment {
|
||||||
|
|
||||||
View mActionFile;
|
View mEncryptFile;
|
||||||
View mActionFromClipboard;
|
View mEncryptText;
|
||||||
|
View mDecryptFile;
|
||||||
|
View mDecryptFromClipboard;
|
||||||
View mClipboardIcon;
|
View mClipboardIcon;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -49,13 +51,31 @@ public class DecryptOverviewFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.decrypt_overview_fragment, container, false);
|
View view = inflater.inflate(R.layout.encrypt_decrypt_overview_fragment, container, false);
|
||||||
|
|
||||||
mActionFile = view.findViewById(R.id.decrypt_files);
|
mEncryptFile = view.findViewById(R.id.encrypt_files);
|
||||||
mActionFromClipboard = view.findViewById(R.id.decrypt_from_clipboard);
|
mEncryptText = view.findViewById(R.id.encrypt_text);
|
||||||
|
mDecryptFile = view.findViewById(R.id.decrypt_files);
|
||||||
|
mDecryptFromClipboard = view.findViewById(R.id.decrypt_from_clipboard);
|
||||||
mClipboardIcon = view.findViewById(R.id.clipboard_icon);
|
mClipboardIcon = view.findViewById(R.id.clipboard_icon);
|
||||||
|
|
||||||
mActionFile.setOnClickListener(new View.OnClickListener() {
|
mEncryptFile.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent encrypt = new Intent(getActivity(), EncryptFilesActivity.class);
|
||||||
|
startActivity(encrypt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mEncryptText.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent encrypt = new Intent(getActivity(), EncryptTextActivity.class);
|
||||||
|
startActivity(encrypt);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mDecryptFile.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent filesDecrypt = new Intent(getActivity(), DecryptFilesActivity.class);
|
Intent filesDecrypt = new Intent(getActivity(), DecryptFilesActivity.class);
|
||||||
@ -64,7 +84,7 @@ public class DecryptOverviewFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mActionFromClipboard.setOnClickListener(new View.OnClickListener() {
|
mDecryptFromClipboard.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent clipboardDecrypt = new Intent(getActivity(), DecryptTextActivity.class);
|
Intent clipboardDecrypt = new Intent(getActivity(), DecryptTextActivity.class);
|
@ -40,10 +40,7 @@ public abstract class NavDrawerActivity extends MaterialNavigationDrawer {
|
|||||||
|
|
||||||
// create sections
|
// create sections
|
||||||
addSection(newSection(getString(R.string.title_keys), R.drawable.ic_vpn_key_black_24dp, new KeyListFragment()));
|
addSection(newSection(getString(R.string.title_keys), R.drawable.ic_vpn_key_black_24dp, new KeyListFragment()));
|
||||||
|
addSection(newSection(getString(R.string.nav_encrypt_decrypt), R.drawable.ic_lock_black_24dp, new EncryptDecryptOverviewFragment()));
|
||||||
addSection(newSection(getString(R.string.title_encrypt_text), R.drawable.ic_lock_outline_black_24dp, new Intent(this, EncryptTextActivity.class)));
|
|
||||||
addSection(newSection(getString(R.string.title_encrypt_files), R.drawable.ic_lock_outline_black_24dp, new Intent(this, EncryptFilesActivity.class)));
|
|
||||||
addSection(newSection(getString(R.string.title_decrypt), R.drawable.ic_lock_open_black_24dp, new DecryptOverviewFragment()));
|
|
||||||
addSection(newSection(getString(R.string.title_api_registered_apps), R.drawable.ic_apps_black_24dp, new AppsListFragment()));
|
addSection(newSection(getString(R.string.title_api_registered_apps), R.drawable.ic_apps_black_24dp, new AppsListFragment()));
|
||||||
|
|
||||||
// create bottom section
|
// create bottom section
|
||||||
|
BIN
OpenKeychain/src/main/res/drawable-hdpi/ic_lock_black_24dp.png
Normal file
After Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 398 B |
BIN
OpenKeychain/src/main/res/drawable-mdpi/ic_lock_black_24dp.png
Normal file
After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 294 B |
BIN
OpenKeychain/src/main/res/drawable-xhdpi/ic_lock_black_24dp.png
Normal file
After Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 484 B |
BIN
OpenKeychain/src/main/res/drawable-xxhdpi/ic_lock_black_24dp.png
Normal file
After Width: | Height: | Size: 636 B |
Before Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 675 B |
After Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 881 B |
Before Width: | Height: | Size: 883 B |
@ -12,7 +12,44 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="@string/section_decrypt_files" />
|
android:text="@string/section_encrypt" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/encrypt_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_encrypt_files"
|
||||||
|
android:drawableRight="@drawable/ic_action_collection"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/encrypt_text"
|
||||||
|
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_encrypt_text"
|
||||||
|
android:drawableRight="@drawable/ic_action_copy"
|
||||||
|
android:drawablePadding="8dp"
|
||||||
|
android:gravity="center_vertical" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/SectionHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="@string/section_decrypt" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/decrypt_files"
|
android:id="@+id/decrypt_files"
|
||||||
@ -32,15 +69,7 @@
|
|||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dip"
|
android:layout_height="1dip"
|
||||||
android:background="?android:attr/listDivider"
|
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:id="@+id/decrypt_from_clipboard"
|
@ -62,6 +62,8 @@
|
|||||||
<string name="section_decrypt_files">"Files"</string>
|
<string name="section_decrypt_files">"Files"</string>
|
||||||
<string name="section_decrypt_text">"Text"</string>
|
<string name="section_decrypt_text">"Text"</string>
|
||||||
<string name="section_certs">"Certificates"</string>
|
<string name="section_certs">"Certificates"</string>
|
||||||
|
<string name="section_encrypt">"Encrypt"</string>
|
||||||
|
<string name="section_decrypt">"Decrypt"</string>
|
||||||
|
|
||||||
<!-- button -->
|
<!-- button -->
|
||||||
<string name="btn_decrypt_verify_file">"Decrypt, verify, and save file"</string>
|
<string name="btn_decrypt_verify_file">"Decrypt, verify, and save file"</string>
|
||||||
@ -82,9 +84,11 @@
|
|||||||
<string name="btn_create_key">"Create key"</string>
|
<string name="btn_create_key">"Create key"</string>
|
||||||
<string name="btn_add_files">"Add file(s)"</string>
|
<string name="btn_add_files">"Add file(s)"</string>
|
||||||
<string name="btn_add_share_decrypted_text">"Share decrypted text"</string>
|
<string name="btn_add_share_decrypted_text">"Share decrypted text"</string>
|
||||||
<string name="btn_decrypt_clipboard">"Decrypt from clipboard"</string>
|
<string name="btn_decrypt_clipboard">"Decrypt text from clipboard"</string>
|
||||||
<string name="btn_decrypt_and_verify">"and verify signatures"</string>
|
<string name="btn_decrypt_and_verify">"and verify signatures"</string>
|
||||||
<string name="btn_decrypt_files">"Decrypt files"</string>
|
<string name="btn_decrypt_files">"Decrypt files"</string>
|
||||||
|
<string name="btn_encrypt_files">"Encrypt files"</string>
|
||||||
|
<string name="btn_encrypt_text">"Encrypt text"</string>
|
||||||
|
|
||||||
<!-- menu -->
|
<!-- menu -->
|
||||||
<string name="menu_preferences">"Settings"</string>
|
<string name="menu_preferences">"Settings"</string>
|
||||||
@ -584,9 +588,7 @@
|
|||||||
|
|
||||||
<!-- Navigation Drawer -->
|
<!-- Navigation Drawer -->
|
||||||
<string name="nav_keys">"Keys"</string>
|
<string name="nav_keys">"Keys"</string>
|
||||||
<string name="nav_encrypt_text">"Encrypt text"</string>
|
<string name="nav_encrypt_decrypt">"Encrypt/Decrypt"</string>
|
||||||
<string name="nav_encrypt_files">"Encrypt files"</string>
|
|
||||||
<string name="nav_decrypt">"Decrypt"</string>
|
|
||||||
<string name="nav_apps">"Apps"</string>
|
<string name="nav_apps">"Apps"</string>
|
||||||
<string name="drawer_open">"Open navigation drawer"</string>
|
<string name="drawer_open">"Open navigation drawer"</string>
|
||||||
<string name="drawer_close">"Close navigation drawer"</string>
|
<string name="drawer_close">"Close navigation drawer"</string>
|
||||||
|