I build my keyboard app with android studio used KMsample1 project successfully. but output app apk was with out of chose for add keyboard as default, so i want to add 2 chose view in first bage like
Good progress in building the KMSample1 project successfully!
I think if you want controls for input method settings, you should try to build the KMSample2 project. KMSample2 starts with this page which has links to add your keyboard as default:
// Add a custom keyboard
Keyboard kbInfo = new Keyboard(
"himyarit_musnad", // Package ID - filename of the .kmp file
"himyarit_musnad", // Keyboard ID
"Himyarit Musnad", // Keyboard Name
"xsa", // Language ID
"old south arabic", // Language Name
"1.0", // Keyboard Version
"https://help.keyman.com/keyboard/himyarit_musnad/1.0/himyarit_musnad", // URL to help documentation if available
"", // URL to latest .kmp file
true, // Boolean to show this is a new keyboard in the keyboard picker
// Font information of the .ttf font to use in KMSample2("family": "SultanMusnad","source":"SultanMusnad-Normal.ttf")
// himyarit_musnad doesn't include a font. Can set blank "" or KMManager.KMDefault_KeyboardFont
KMManager.KMDefault_KeyboardFont, // Font for KMSample1 text field
KMManager.KMDefault_KeyboardFont); // Font for OSK
KMManager.addKeyboard(this, kbInfo);
}
type or paste code here
// Add a custom keyboard
Keyboard kbInfo = new Keyboard(
"himyarit_musnad", // Package ID - filename of the .kmp file
"himyarit_musnad", // Keyboard ID
"Himyarit Musnad", // Keyboard Name
"xsa", // Language ID
"old south arabic", // Language Name
"1.0", // Keyboard Version
"https://help.keyman.com/keyboard/himyarit_musnad/1.0/himyarit_musnad", // URL to help documentation if available
"", // URL to latest .kmp file
true, // Boolean to show this is a new keyboard in the keyboard picker
// Font information of the .ttf font to use in KMSample2("family": "SultanMusnad","source":"SultanMusnad-Normal.ttf")
// himyarit_musnad doesn't include a font. Can set blank "" or KMManager.KMDefault_KeyboardFont
KMManager.KMDefault_KeyboardFont, // Font for KMSample1 text field
KMManager.KMDefault_KeyboardFont); // Font for OSK
KMManager.addKeyboard(this, kbInfo);
}
@darcy finally I solve problem there was different name of Language at kmp. After correct name it’s working
My new question can I add background image in blank to show like attach?
First, you’ll need to have your image saved in the resource folder for different screen resolutions. See the Android Studio reference on Resource Manager
Then, you’ll want to edit the MainActivity layout file which is located at KMSample2/app/src/main/res/layout/activity_main.xml. The code for the layout already contains the text view and two buttons. You’ll add your image as an <ImageView>