Hi guys,
How can I skip the first screen (the connection) in the Tris example in Android, and do it in the code automatically? I know it's for example purposes, but it doesn't make sense for the user to have to connect to a server. It should be done automatically.
I tried:
in TrisLobbyActivity.java, I added buttonLogin.performClick();
which works in that it skips the screen, but still shows it for a noticeable amount of time (almost a second). Can we do that without displaying it to the screen at all?
Skipping the connection phase in the tris example
Re: Skipping the connection phase in the tris example
You can remove the button completely (even the screen, if you so desire) and move the connection code at the beginning of your code.
Cheers
Cheers
Re: Skipping the connection phase in the tris example
I made LinearLayout1 Visibility=invisible in connector.xml and that seems to work.
But when I type in the "please enter your nick" screen, it seems to type in the main lobby chatbox. Is this a coding issue with the android example?
Hi Lapo, can you go in more details into what code to change to accomplish this? I commented out everything that says "connector" in TrisLobbyActivity.java, but now, the address, port, use bluebox, and connect button are still displayed, along with the Login:
http://imgur.com/mFJDuUp
But when I type in the "please enter your nick" screen, it seems to type in the main lobby chatbox. Is this a coding issue with the android example?
http://imgur.com/mFJDuUp
Re: Skipping the connection phase in the tris example
HI,
no, I am not aware of such issue. Are you sure you haven't modified the example? Out of the box the Tris game works correctly.
no, I am not aware of such issue. Are you sure you haven't modified the example? Out of the box the Tris game works correctly.
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 32 guests