开发者

How to route the user to the correct activity?

Hey, My (first) app needs to give the user the option to choose which region he is in (US,Europe,Asia) etc. I think I'm ok with the menu side of it, but I'm not sure how to get the app to automatically route the user to the correct activity, depending on his choice.

So the question is, do I use an activity or an application 开发者_高级运维to read the previously stored region and route them accordingly? Does anyone have any sample code that I can look at? Thanks


Maybe you could commit it to a sharedpreference value. I think its more or less the cleanest way to do it.

take a look at http://developer.android.com/guide/topics/data/data-storage.html#pref If you need more help just post a reply k? good luck with ur codes :)


You could have a menu/activity that gets the region and then create a new Intent for the appropriate activity to start.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜