How can I clone views using java code in Android Studio [closed] - android

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
How can I copy/clone a views automatically in android studio
for example, I have one imageview and a textview. how can i clone them on runtime with different values alongside with existing objects like them.
I tried to make invisible views and and update them later. but I don't think its efficient way. plus it is also limited
I'm fetching data from JSON file. which will get a text description and an image link each time I update that file online. so I want to update that in android app too! but unfortunately I can't do with single textview and single imageview. so need to automatically make them whenever the data is updated online.
if there is any other way of cloning views. kindly tell me.

First of all read this How to ask? , it's really hard to understand what you want us to help you with.
If i understand you correctly you want to display some kind of a list that updates when u update your JSON/Online database.
If that's the case I think the best way to go is RecyclerView
it's basically an efficient way to create a dynamic list that can be updated at runtime
And here is a nice tutorial you can use

Related

where do i start with an app that's going to hold a database on ios/android? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
Improve this question
i want to contribute to a fandom i'm in and also practice my coding, so i wanted to make an app that would let the user keep track of the event stories they've read. but i don't know where to start with this.
i can add extra features like scoring and total stories read later on, but for now i need an idea of where to start. i think i've heard java would work for this? but would that even work on android and ios both??
once i know what programming language to use i need to find something to code this on, as well as how to even hold information in a database. (similar to myanimelist and how it has a database of entries that you can add to your own list.) likely with a login system--but one step at a time.
what are the basics i need to know to start? and where would i build this app? thank you!
If you want a single application that can work on both ios and android then go for Flutter or React Native. For your question regarding where to keep database and how login system works you will need to study at-least one of the systems in some depth.

Can I use the same RecyclerView adapter for two different activities for two different data classes? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have created a RecyclerView. I want to add another RecyclerView to another activity in my app which displays different layout and different data (uses different data class). can I do it with same adapter that I created? if yes, then please tell how? if by getItemViewType() then how to differentiate between two activities to set the respective view holder and how to add two data classes? please help. I am working in Kotlin, please give a kotlin example.
I would suggest you not to do so. From the maintance perspective, it would just make you code harder to understand and update later. Even if that means you need more code.
If you really want to do so, you could provide additional parameter to the adapter class - a Boolean for example, that will tell you which activity are you in right now and for which data it has to be prepared.
And having that, you can just add an if condition in every place you need sth different depending on a data class youre using. And thats it.

How is the database in this application getting populated? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am using this application: https://code.google.com/p/androidtutorial/ as part of learning to develop Android apps. I am totally new to this. In Eclipse I look through the source code, but I don't see the actual employee list (i.e. the file with the names/numbers etc). I'm guessing either I am looking in the wrong place or it links to a list held online or something? I'm sure it's obvious to anyone who understands these things, but I want to understand where the information is and where in the code this database/list is referenced.
Thanks
The list they are referring to is a local database on a computer, meaning you probably don't have it. It is just an example to show how to interact with a database.
I'm not familiar with that example project but I think the sql.xml file that is inside of EmployeeDirectory6/res/raw/ is where the data is coming from.
There is some code inside of DatabaseHelper.java that executes the SQL commands that are contained within this file to populate the database.

Build an online application like facebook android [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am trying to build an online application for movie management. I want the application to be an online one, could any have inputs as to how to build it, as in currently i am downloading each of the dynamic content and loading the layouts which is highly inefficient. Could anyone suggest a better procedure to make an online application and guide for the same.
https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae
That link will show you how to make a Google app engine project. The easiest way to use an online database with android. You can post, and get with very little code. What you do with the data you get back is up to you... Throw it into list views, text views, fragments, etc. But yes this is the best place to start as you need an online database or a social network would not work at all. I suggest you do the above totural and then come back with some more questions. Hope this helps!

How to create a searchable list [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I would like to have a database of items stored on the user's phone. I currently have everything set up using WebView pointed at my domain, but obviously this isn't ideal if the user is in a low-signal location.
If possible I would also like to be able to search the list for multiple words.
Any pointers to tutorials etc would be ideal.
In Android you'll want to use SQLite databases, here are some places from where I learned my way with databases in Android:
Start here:
http://www.codeproject.com/Articles/119293/Using-SQLite-Database-with-Android
Or here if you want to use an existing database:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
If you decide on XML, though, you might want to read this instead:
http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser
Here you have a tutorial involving both methods, downloading data in XML format, parsing it and storing the information on a database, probably the guide you want to read if you're starting with Android, since it covers pretty much what you are trying to achieve, probably :P
http://mobile.tutsplus.com/tutorials/android/android-fundamentals-downloading-data-with-services/

Categories

Resources