mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32:16 -05:00
Merge branch 'master' of github.com:open-keychain/open-keychain
This commit is contained in:
commit
4782d22e26
@ -96,6 +96,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.CreateKeyActivity"
|
android:name=".ui.CreateKeyActivity"
|
||||||
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
|
||||||
|
android:windowSoftInputMode="stateHidden"
|
||||||
android:label="@string/title_create_key"
|
android:label="@string/title_create_key"
|
||||||
android:parentActivityName=".ui.KeyListActivity">
|
android:parentActivityName=".ui.KeyListActivity">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
@ -27,21 +27,21 @@ import android.text.Spannable;
|
|||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
import android.text.style.BulletSpan;
|
import android.text.style.BulletSpan;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.text.style.StyleSpan;
|
import android.text.style.StyleSpan;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.openintents.openpgp.util.OpenPgpApi;
|
import org.openintents.openpgp.util.OpenPgpApi;
|
||||||
import org.sufficientlysecure.htmltextview.HtmlTextView;
|
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
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.provider.KeychainContract;
|
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||||
import org.sufficientlysecure.keychain.remote.AccountSettings;
|
import org.sufficientlysecure.keychain.remote.AccountSettings;
|
||||||
import org.sufficientlysecure.keychain.remote.AppSettings;
|
import org.sufficientlysecure.keychain.remote.AppSettings;
|
||||||
import org.sufficientlysecure.keychain.ui.SelectPublicKeyFragment;
|
import org.sufficientlysecure.keychain.ui.SelectPublicKeyFragment;
|
||||||
|
import org.sufficientlysecure.keychain.ui.util.ActionBarHelper;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -301,7 +301,8 @@ public class RemoteServiceActivity extends ActionBarActivity {
|
|||||||
} else if (ACTION_ERROR_MESSAGE.equals(action)) {
|
} else if (ACTION_ERROR_MESSAGE.equals(action)) {
|
||||||
String errorMessage = intent.getStringExtra(EXTRA_ERROR_MESSAGE);
|
String errorMessage = intent.getStringExtra(EXTRA_ERROR_MESSAGE);
|
||||||
|
|
||||||
String text = "<font color=\"red\">" + errorMessage + "</font>";
|
Spannable redErrorMessage = new SpannableString(errorMessage);
|
||||||
|
redErrorMessage.setSpan(new ForegroundColorSpan(Color.RED), 0, errorMessage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
// Inflate a "Done" custom action bar view
|
// Inflate a "Done" custom action bar view
|
||||||
ActionBarHelper.setOneButtonView(getSupportActionBar(),
|
ActionBarHelper.setOneButtonView(getSupportActionBar(),
|
||||||
@ -319,8 +320,8 @@ public class RemoteServiceActivity extends ActionBarActivity {
|
|||||||
setContentView(R.layout.api_remote_error_message);
|
setContentView(R.layout.api_remote_error_message);
|
||||||
|
|
||||||
// set text on view
|
// set text on view
|
||||||
HtmlTextView textView = (HtmlTextView) findViewById(R.id.api_app_error_message_text);
|
TextView textView = (TextView) findViewById(R.id.api_app_error_message_text);
|
||||||
textView.setHtmlFromString(text, true);
|
textView.setText(redErrorMessage);
|
||||||
} else {
|
} else {
|
||||||
Log.e(Constants.TAG, "Action does not exist!");
|
Log.e(Constants.TAG, "Action does not exist!");
|
||||||
setResult(RESULT_CANCELED);
|
setResult(RESULT_CANCELED);
|
||||||
|
@ -22,12 +22,10 @@ import android.os.Bundle;
|
|||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.text.method.TextKeyListener;
|
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.EditorInfo;
|
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
@ -171,7 +169,7 @@ public class CreateKeyInputFragment extends Fragment {
|
|||||||
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
|
||||||
//check if no view has focus:
|
// check if no view has focus
|
||||||
View v = getActivity().getCurrentFocus();
|
View v = getActivity().getCurrentFocus();
|
||||||
if (v == null)
|
if (v == null)
|
||||||
return;
|
return;
|
||||||
|
@ -155,6 +155,19 @@ public class ImportKeysCloudFragment extends Fragment {
|
|||||||
private void search(String query) {
|
private void search(String query) {
|
||||||
Preferences prefs = Preferences.getPreferences(getActivity());
|
Preferences prefs = Preferences.getPreferences(getActivity());
|
||||||
mImportActivity.loadCallback(new ImportKeysListFragment.CloudLoaderState(query, prefs.getCloudSearchPrefs()));
|
mImportActivity.loadCallback(new ImportKeysListFragment.CloudLoaderState(query, prefs.getCloudSearchPrefs()));
|
||||||
|
hideKeyboard();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void hideKeyboard() {
|
||||||
|
InputMethodManager inputManager = (InputMethodManager) getActivity()
|
||||||
|
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
|
|
||||||
|
// check if no view has focus
|
||||||
|
View v = getActivity().getCurrentFocus();
|
||||||
|
if (v == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
inputManager.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<org.sufficientlysecure.htmltextview.HtmlTextView
|
<TextView
|
||||||
android:id="@+id/api_app_error_message_text"
|
android:id="@+id/api_app_error_message_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
Loading…
Reference in New Issue
Block a user