Renaming some files

This commit is contained in:
Dominik Schürmann 2013-09-19 02:17:49 +02:00
parent 3c4cb1c2d3
commit 922ac725bb
7 changed files with 51 additions and 28 deletions

View File

@ -269,7 +269,8 @@
android:name=".ui.ImportKeysActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_importKeys"
android:uiOptions="splitActionBarWhenNarrow" >
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="stateHidden" >
<!-- Keychain's own Actions -->
<intent-filter android:label="@string/intent_import_key" >

View File

@ -1,8 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<Spinner
android:id="@+id/import_keys_server_key_server"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:id="@+id/import_keys_server_query"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:inputType="textPersonName|textEmailAddress" />
<Button
android:id="@+id/import_keys_server_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_search" />
</LinearLayout>
</LinearLayout>

View File

@ -119,16 +119,16 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
// Create new fragment from our own Fragment class
switch (itemPosition) {
case 0:
loadFragment(ImportFileFragment.class, null, mNavigationStrings[itemPosition]);
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[itemPosition]);
break;
case 1:
loadFragment(ImportKeyServerFragment.class, null, mNavigationStrings[itemPosition]);
loadFragment(ImportKeysServerFragment.class, null, mNavigationStrings[itemPosition]);
break;
case 2:
loadFragment(ImportQrCodeFragment.class, null, mNavigationStrings[itemPosition]);
loadFragment(ImportKeysQrCodeFragment.class, null, mNavigationStrings[itemPosition]);
break;
case 3:
loadFragment(ImportNFCFragment.class, null, mNavigationStrings[itemPosition]);
loadFragment(ImportKeysNFCFragment.class, null, mNavigationStrings[itemPosition]);
break;
default:
@ -234,8 +234,8 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
// display selected filename
getSupportActionBar().setSelectedNavigationItem(0);
Bundle args = new Bundle();
args.putString(ImportFileFragment.ARG_PATH, importFilename);
loadFragment(ImportFileFragment.class, args, mNavigationStrings[0]);
args.putString(ImportKeysFileFragment.ARG_PATH, importFilename);
loadFragment(ImportKeysFileFragment.class, args, mNavigationStrings[0]);
// directly load data
loadCallback(null, importFilename);
@ -246,13 +246,13 @@ public class ImportKeysActivity extends SherlockFragmentActivity implements OnNa
// Internal actions:
} else if (ACTION_IMPORT_KEY_FROM_FILE.equals(action)) {
getSupportActionBar().setSelectedNavigationItem(0);
loadFragment(ImportFileFragment.class, null, mNavigationStrings[0]);
loadFragment(ImportKeysFileFragment.class, null, mNavigationStrings[0]);
} else if (ACTION_IMPORT_KEY_FROM_QR_CODE.equals(action)) {
getSupportActionBar().setSelectedNavigationItem(2);
loadFragment(ImportQrCodeFragment.class, null, mNavigationStrings[2]);
loadFragment(ImportKeysQrCodeFragment.class, null, mNavigationStrings[2]);
} else if (ACTION_IMPORT_KEY_FROM_NFC.equals(action)) {
getSupportActionBar().setSelectedNavigationItem(3);
loadFragment(ImportNFCFragment.class, null, mNavigationStrings[3]);
loadFragment(ImportKeysNFCFragment.class, null, mNavigationStrings[3]);
}
}

View File

@ -33,7 +33,7 @@ import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageButton;
public class ImportFileFragment extends Fragment {
public class ImportKeysFileFragment extends Fragment {
public static final String ARG_PATH = "path";
private ImportKeysActivity mImportActivity;
@ -43,8 +43,8 @@ public class ImportFileFragment extends Fragment {
/**
* Creates new instance of this fragment
*/
public static ImportFileFragment newInstance(String path) {
ImportFileFragment frag = new ImportFileFragment();
public static ImportKeysFileFragment newInstance(String path) {
ImportKeysFileFragment frag = new ImportKeysFileFragment();
Bundle args = new Bundle();
args.putString(ARG_PATH, path);
@ -68,7 +68,7 @@ public class ImportFileFragment extends Fragment {
// open .asc or .gpg files
// setting it to text/plain prevents Cynaogenmod's file manager from selecting asc
// or gpg types!
FileHelper.openFile(ImportFileFragment.this, mFilename.getText().toString(), "*/*",
FileHelper.openFile(ImportKeysFileFragment.this, mFilename.getText().toString(), "*/*",
Id.request.filename);
}
});

View File

@ -28,15 +28,15 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
public class ImportNFCFragment extends Fragment {
public class ImportKeysNFCFragment extends Fragment {
private Button mButton;
/**
* Creates new instance of this fragment
*/
public static ImportNFCFragment newInstance() {
ImportNFCFragment frag = new ImportNFCFragment();
public static ImportKeysNFCFragment newInstance() {
ImportKeysNFCFragment frag = new ImportKeysNFCFragment();
Bundle args = new Bundle();
frag.setArguments(args);

View File

@ -32,7 +32,7 @@ import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentIntegratorSupportV4;
import com.google.zxing.integration.android.IntentResult;
public class ImportQrCodeFragment extends Fragment {
public class ImportKeysQrCodeFragment extends Fragment {
private ImportKeysActivity mImportActivity;
private Button mButton;
@ -40,8 +40,8 @@ public class ImportQrCodeFragment extends Fragment {
/**
* Creates new instance of this fragment
*/
public static ImportQrCodeFragment newInstance() {
ImportQrCodeFragment frag = new ImportQrCodeFragment();
public static ImportKeysQrCodeFragment newInstance() {
ImportKeysQrCodeFragment frag = new ImportKeysQrCodeFragment();
Bundle args = new Bundle();
frag.setArguments(args);
@ -62,7 +62,7 @@ public class ImportQrCodeFragment extends Fragment {
@Override
public void onClick(View v) {
// scan using xzing's Barcode Scanner
new IntentIntegratorSupportV4(ImportQrCodeFragment.this).initiateScan();
new IntentIntegratorSupportV4(ImportKeysQrCodeFragment.this).initiateScan();
}
});

View File

@ -25,13 +25,13 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class ImportKeyServerFragment extends Fragment {
public class ImportKeysServerFragment extends Fragment {
/**
* Creates new instance of this fragment
*/
public static ImportKeyServerFragment newInstance() {
ImportKeyServerFragment frag = new ImportKeyServerFragment();
public static ImportKeysServerFragment newInstance() {
ImportKeysServerFragment frag = new ImportKeysServerFragment();
Bundle args = new Bundle();
frag.setArguments(args);