Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I developing a android app where i have to show a list of product. I am using a custom adapter for this . Each row of list showing a product image with add to cart button when user click the button i want to change the cart menu that i show in my action bar . to do that i need the view that showing the number but it is created on onOptionsMenuCreated() function of my activity.
so my question is how can i access this textview in my adapter class to change it on on clicklistner in my custom adapter i pass context of my activity with product arraylist.
In your Main Activity class make your action bar menu related function public so that you can access from any other class like MainActivity.yourFunction();
Related
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 7 days ago.
Improve this question
Create a Notes App in Android – Full code and simple explanation
Project Requirements:
The project should have the following advantages:
Develop a master Activity that displays memos or tasks in a list that the user adds.
Develop an Activity that enables the user to enter a new memo or task. This activity sends data entered by the user as a result of the activity you called. Note: Do not allow the sending of blank data.
Use the activity you developed by adding a button to add a new memo within the main activity that contains the list.
This application provides three types of memos, and the item for each memo in the list must be displayed in a different CardView format that contains data to express the type of memo.
For the view, you can use StaggeredGridLayoutManager. It is used to replace both GridLayoutManager and LinearLayoutManager in the RecyclerView to display items in a distinctive way.
The user can click on any note to modify its content. So you'll need to develop Activity to view the memo details. A note can also be removed by long pressing.
A class must be created to represent the data of each type of memo. These classes will be used in the list to display data. Note: You can use the concept of inheritance and if statements to be able to use more than one class to display data in a single list.
Extra points: Change the important background that has been accomplished to green.
Correct and learn from mistakes
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 6 months ago.
Improve this question
I want to develop an android app and my app must show a matrix of elements where some are connected by a line (like paths). I'm programmer but I don't have a clear idea on how to do this (the graphical part) because still I'm starting in android development, but if you have an idea please to resolve this graphical problem, give me some help then I would research more about it.
Note: I want to create an app for my college, where an student could mark their passed courses, and there are courses that must be marked (passed) to mark others and know their progress on the career.
Like this image..
Use Grid View because GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter. to Achieve your goal you must use custom grid view to make that but am not sure about the lines.
check out this tutorials it would help to make that .
Example 1:
Example 2
Example 3:
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 8 years ago.
Improve this question
I have a ListView that contains data from data base! I want to implement search view for this that items has searched elements should be shown! I tried more and saw examples but they was hard for me to understand! any way? easy please!
This logic should help : -
1) get the search bar on your ActionBar
2) Add a SearchView.OnQueryTextListener() to your search bar.
3) Override the onQueryTextChange() method and perform a search function on your DB against the string entered.
4) Once you have the data, pass it to the same function you used to structure your ListView in the beginning so as to form an adapter which can be set to your listview.
P.s. be better if you posted your code for us to help out. The above logic worked for me....
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 8 years ago.
Improve this question
In my application i have requirement to implement tag functionality, like we tag particular user in stackoverflow/facebook.
For Example if i press #a... on that time i will get list of suggested items for that character from server,and i will show a list of items , selecting any item from list i need to display that on edit text, with some highlighted portion and cross shape on the button.
For example while asking questions on stack overflow site, if i write ruby-on-rails and select ruby-on-rails from the suggested tag than it will shown as below
And when i press back press or cross button of that tagged button, entire text should be disappear,
I need to implement same functionality in my application, the only difference is that i will write anchor tag like #ruby-on-rails than will get suggestions of keyword from server.
Any guide or suggestion is appriciated
Thanks,
Aamir
Try this https://github.com/ApmeM/android-flowlayout Using this FlowLayout you can create token views like you want.
Have a look on this SO answer by Romain Guy https://stackoverflow.com/a/4474533/3020568
You can check this links also
https://github.com/splitwise/TokenAutoComplete
http://www.kpbird.com/2013/02/android-chips-edittext-token-edittext.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I want to display a list of messages on click of a button on the same page by shifting the other buttons to one side. The image given specifies the requirement of my app. How do i display different list of messages for each button in the following way?
How do i achieve this? Please Help!
https://github.com/nhaarman/ListViewAnimations
You should use this library!
I think it can help you !
Maybe a custom "button" which xml holds a button and a listview, and his class a button name, an arraylist of values, and a listadapter for poulate the listview. You could personalize the onitemclick method of that listview so you can personalize every button.