SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
SDL android keyboard Layout
cdriko


Joined: 09 Dec 2016
Posts: 2
Reply with quote
hello
I'm porting an app from C++/SDL to android.
https://github.com/Cdriko/IBNIZ/tree/android

It works well, but now, I try to include a custom keyboard in the app (because ibniz reacts only at certain keys)
for this I used the strategy explained here :
http://www.fampennings.nl/maarten/android/09keyboard/index.htm

I succes to display the keyboard but my SDL screen and sound is gone.
I suppose that the problem is to display the keyboard I have to add in the main activity (java) :

Code:

 @Override protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        mCustomKeyboard= new CustomKeyboard(this, R.id.keyboardview, R.xml.ibnizkbrd );
       

    }


It seems to be like if
Code:

setContentView(R.layout.main);

replace the SDL screen by the layout containing the keyboard.

Anybody knows
-does the SDL screen can be explicitly drawed in the layout XML file?
- or the android layout XML cant be "background transparent"?

Any other strategies?

thanks
View user's profileSend private message
EternalLands


Joined: 01 Dec 2016
Posts: 16
Reply with quote
Isn't it better to try to modify the app to use a standard keyboard? Then you can use SDL_StartTextInput(); and all is set.
View user's profileSend private messageVisit poster's website
cdriko


Joined: 09 Dec 2016
Posts: 2
Reply with quote
I'm agree that it should be better but ibniz code does not make sense with only standard keys

here you can see the doc of this soft
https://github.com/viznut/IBNIZ/blob/master/src/texts.i
View user's profileSend private message
SDL android keyboard Layout
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic