I'm a noob Android developer. I learned of the basic UI controls and different types of views that I can utilize.
Now my problem is, I need to show list of items using the ListView that is being shown full screen. when I click on an item it should load a TextView full screen. when I click the back button it should go back to ListView again..
Can someone point me where I can learn such stuff?? any support or even external link is greatly appreciated.
Thanks in advance.
Write your text view in a different activity. And when ever you click on a list item start that activity putting your text in the intent. Fetch the text in that text view activity in onCreate() from the intent and set it to text view. Obviously when ever you click back you 'll come back to list view activity.
Check out this website... http://www.xtensivearts.com/topics/tutorials/
He's no longer updating but what you've asked is covered in the video tutorials he did create. It's not answered directly but by watching them, you should have a solid enough understanding to piece it together yourself.
Best of luck!
Related
I am building an E-Commerce App and I have an activity showing image slider, description and related items, and in image slider I have put an arrow to change the product on the arrow click I want to be in the same activity but data should be different.How should I do that need your help guys.
You should try doing it by urself in one of the many ways its possible to. Then we could provide some help with your idea or show you better solution. I think you are looking for RecyclerView (https://developer.android.com/guide/topics/ui/layout/recyclerview). It lets you show some similar views but with different data inside. Also as an item inside RecyclerView you can try CardView.
Using only RecyclerView you can also use:
https://stackoverflow.com/a/46084182/8713068
You can also search for a library that has everything you want inside already implemented. For example the first library that came out after i typed it in google : https://github.com/Ramotion/cardslider-android.
I am working on a restaurant automation application in android studios. In my MenuActivity where orders are placed, I would like to create buttons each time an order is placed in a different activity called ChefActivity. The idea is that when the Place Order button is clicked in the MenuActivity, a button will appear in the ChefActivity so the chef can click that button to view the order. Is there a way to dynamically create a button in one activity to then display in another activity? I have done much research on this and have no been able to find much helpful information. Any and all help is greatly appreciated. Thanks in advance!
You should to use Preferences or SQLlite to store information, and when you switch activities just read from them, it's looks like, you click on button in 1st activity, write it to database, and then when you start 2nd activity, just read from database and place data to button.
I am trying to build an app using the new material design specs.
I am currently trying to get a cusdtom FAB layout working, similar to the one in the new Inbox app.
I have one main button, which when clicked, expands to several smaller ones.
However i want to add a textview to the left of the smaller buttons, like the inbox app.
I cant seem to find a way of doing this.
The floating action button i am using is based off this library, but with a few modifications https://github.com/futuresimple/android-floating-action-button/blob/master/README.md
If someone could suggest a way of doing this, it would be much appreciated.
Thanks
Corey :)
I have an app that uses this RibbonMenu and I wanted to know if it was possible to use the menu items to change the ContentView of the Activity instead of another activity to reduce the size of my app. I've tried doing this already,and it changed the content view perfectly, but i was not able to press the home button. I'm in a bit of a rush here, but i'll try to post code if anyone asks for it. thank you!
Menu items is UI element. It does nothing by itself. It however can trigger some more actions in your code. As for changing activity layout, yes, you can call setContentView() at any time you want.
to reduce the size of my app
this is not the way optimalizations should be done
at the moment i'm trying to write an app which has a listview, and if i swipe especially left the listitem switches to another xml like it's used in the twitter app.
Especially i have a list of items only with some text and when i swipe left on a single item it changes to an other item (via a xml-file) especially with some buttons or anything else.
I hope anyone, has an idea how i can do this?
Thanks.
I have seen this done using a Gallery set to fill_parent. Care has to be taken to allow child views to pass on touch events appropriately for swiping to work. Note that Gallery is a subclass of ViewGroup.
EDIT: see comment below, i should've checked the twitter app first!