简体   繁体   English

如何在Android应用程序中放入大量数据?

[英]How can I put a lot of data in android application?

My question is how can I put a lot of data in android application,or what is the best way to solve my problem ? 我的问题是如何在Android应用程序中放入大量数据,或者解决问题的最佳方法是什么?

I'm building an app that will contain about 43 lessons,every lesson will be accessed through cardview and every lesson will have a lot of text,images and maybe some other things. 我正在构建一个包含大约43节课程的应用程序,每节课都可以通过cardview进行访问,每节课将包含很多文本,图像以及其他一些内容。

Is the best way to solve this to do every lesson manually,or there is another way that I could solve this. 解决此问题的最佳方法是手动完成每节课,或者还有另一种方法可以解决此问题。

This is how lessons should look like in cardview (similar) 这就是Cardview中的课程外观(类似)

And when i click on cardview needs to display me a lesson. 当我单击cardview时需要向我显示一个课程。 My problem is only text,image and other things in that lesson. 我的问题只是该课中的文字,图像和其他东西。

You need to store all your data in a database and populate your contents in a recycler list. 您需要将所有数据存储在数据库中,并将内容填充到回收商列表中。 With this you can click on each item to view a particular lesson. 这样,您可以单击每个项目以查看特定课程。

  • You will eliminate the need to create multiple activities for each lesson. 您将无需为每个课程创建多个活动。
  • You will have a small app size 您的应用程序尺寸会很小

I have a project in github that might help you https://github.com/mbobiosio/SqliteDatabaseAssets and this is the Kotlin version https://github.com/mbobiosio/WordCup18Team 我在github中有一个项目可能会对您有所帮助https://github.com/mbobiosio/SqliteDatabaseAssets ,这是Kotlin版本https://github.com/mbobiosio/WordCup18Team

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在我的Android应用程序中放置一个Twitter共享按钮? - How can I put a Twitter share button in my Android application? 如何在Android应用程序中重复播放歌曲? - How can I put a song to repeat in an android application? android:如何加载大量数据(xml文件)并将其保留在整个应用程序中 - android: How to load lot of data (xml file) and keep it throughout the application 我如何将JSONArray数据放入Android中的LinkedHashMap中? - How can i put my JSONArray data into LinkedHashMap in android? 如何将数据置于Android应用程序的文本视图模式下。 我可以将其放在日志中,但不能将其放在文本视图模式下 - How to put data into Text view mode for android application. I am able to put it in Log but not able to put it in Text view mode 我如何从Android中的“大量视图”开始加速活动? - How can i speed up the activity start with a lot Views in Android? 如何将framelayout放置在应用程序的底部? - how can i put the framelayout in the bottom of the application? 我如何将AutoCompleteTextView放在片段android中 - how can i put AutoCompleteTextView in fragment android 如何使Android应用程序数据持久化? - How can I make Android application data persistent? 我如何在 Android 应用程序中显示带有数据协议的图像 - How can i show the image with data protocol in and android application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM