forked from extern/Unexpected-Keyboard
Conf key open SettingsActivity
This commit is contained in:
parent
153c384990
commit
fe432fd3ba
@ -1,5 +1,6 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
import android.preference.PreferenceManager;
|
||||
@ -16,6 +17,7 @@ public class Keyboard2 extends InputMethodService
|
||||
{
|
||||
super.onCreate();
|
||||
PreferenceManager.setDefaultValues(this, R.xml.settings, false);
|
||||
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
|
||||
_inputView = (Keyboard2View)getLayoutInflater().inflate(R.layout.input, null);
|
||||
_inputView.reset_prefs(this);
|
||||
}
|
||||
@ -38,7 +40,9 @@ public class Keyboard2 extends InputMethodService
|
||||
return ;
|
||||
if (key.getEventCode() == KeyValue.EVENT_CONFIG)
|
||||
{
|
||||
// TODO: go to settings activity
|
||||
Intent intent = new Intent(this, SettingsActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
else if ((flags & (KeyValue.FLAG_CTRL | KeyValue.FLAG_ALT)) != 0)
|
||||
handleMetaKeyUp(key, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user