pracuję nad niestandardowa klawiatura AplikacjaJak ustawić inne tło klawiszy dla Androida niestandardowa klawiatura
Jest to kod koloru tła input.xml
w softkeyboard: -
@Override
public View onCreateInputView() {
Log.e("onStartInputView ","On StartInput View Called--");
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
String Backgroundcolour = preferences.getString("BackgroundColour","");
Log.e("Brithnesss- -","----"+Backgroundcolour);
if(Backgroundcolour.equalsIgnoreCase("black"))
{
this.mInputView = (KeyboardView) getLayoutInflater().inflate(
R.layout.input, null);
}else
{
this.mInputView = (KeyboardView) getLayoutInflater().inflate(
R.layout.input1, null);
//this.mInputView.setB
}
this.mInputView.setOnKeyboardActionListener(this);
this.mInputView.setKeyboard(this.mQwertyKeyboard);
return this.mInputView;
}
@Override public void onStartInputView(EditorInfo attribute, boolean restarting) {
super.onStartInputView(attribute, restarting);
// Apply the selected keyboard to the input view.
setInputView(onCreateInputView());
}
Nie wiem, jak ustawić obraz tła dla określonego klucza.
Skorzystaj z tego http://stackoverflow.com/questions/15789997/how-to-ch ange-color-of-key-for-android-soft-keyboard –
Nie otrzymuję tak dużo poprawnie, czy możesz powiedzieć, jak ustawić różne klawisze kolorów? – user
Potrzebuję ustawić tło dla określonego tła klawisza zamiast tego samego obrazu tła dla całej klawiatury. Potrzebuję pilnie – user