Android:我需要从 Web 服务准备 UI
我是 Android 的新手,并且尝试了一段时间的 UI 和 SQLLite,它对我来说看起来相当不错。我们有一个要求,对于应用程序,所有问题都将通过 REST/Web 服务来自服务器,并显示在应用程序上。
例如,如果有 4 个问题 1) 输入您的姓名 -- 文本框 2) 你昨晚睡得好吗 -- 是 / 否 3) 您睡了多少小时 - 文本框 4) 您是如何得知我们的 -- 下拉
因此要求是在与服务器同步后,问题将显示在应用程序上 在与服务器同步期间,问题将通过 REST / Web 从服务器下载服务..如果电话未连接,则从数据库中提取问题...
这些问题都是简单的问题,而且它们经常变化,我们有一个类似的应用程序,适用于 iphone,可以执行此操作...
有任何一个吗之前做过这个,请给我建议,以便我可以开始使用
I am a newbie to Android and playing around with the UI and SQLLite for a while and it looks pretty good to me . We have a requirement that for the App that all the questions would be coming from the server through REST / Web service which would be displayed on the App..
say for e.g if there are 4 questions
1) Enter your Name -- Text Box
2) Did you sleep well last night -- YES / NO
3) How many hours did you sleep - Text Box
4) How did you hear about us -- Drop down
So the requirement is that the Questions would be displayed on the App after doing a SYNC with the server during the SYNC with the server the Questions would be downloaded from the SERVER through REST / Web service..if the phone is not connected then pull the questions from the Database...
These questions are simple questions and they change quite often and we have a similar app which is there for iphone which does this ....
Has any one worked on this before please advice me so that I can get it started
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们为电子学习应用程序做了类似的事情。确定问题类型的数量,并通过扩展传统视图来创建自定义类型。
例如。要获得多项选择题:使用 TextView 和 RadioGroup (RadioButtons),您可以创建自定义类型。创建您自己的属性或创建 setter/getter 来初始化标题、选项、正确答案并在运行时动态加载视图。
We did something similar for an e-Learning app. Decide on the number of type of questions and create custom types by extending the conventional views.
Eg. To get a multiple choice question: Using TextView and RadioGroup (RadioButtons) you can create a custom type. Create your own attributes or create setter/getters to initialize title, options, right answer and load the view dynamically at run time.