android listview and button and text with gesture detection - android

I am new to android programming. I have this problem that I created a listView with button and text. I wanted all of this object to be active. Meaning I can click or touch any of these 3. The main idea is, I will display a listview of products. When I select a list it will bring me to a details view. And when I click a button it will add the current selection + 1 to the current textbox. I also want the textbox to be editable.

Take a look at my WaddleAddressBook
The EfficientAdapter has code on how to implement each item.
The WaddleAddressBook shows an example of detecting gestures (swipe left and right in this case).
search.xml is the list item layout.
Each list item basically had a contact picture, contact name and 3 buttons under the contact name for call, sms and edit. You could swipe right to call and left to sms just like on Samsung phones... I never ended up finishing the address book but I hope it helps you.

Related

Customize dropdown (Picker) list in xamarin.forms

I am working on xamarin.forms. I am creating an app for android. In app I have a dropdown list. I am using Picker for it. I customized it to look like dropdown. Now I need to make the first Index item to nonselactable. Means user can not select the first item. If user click on it nothing should happen. But currently when user click on the first index dropdown gets collapsed.
One more thing that I have to add in dropdown is a Cross button at index 1. Means at index 1, on left side there will be Cross button and at center there will be text like Select item. And this whole row should not be selctable. If user click at cross button dropdown should collapsed.
Anyone have idea how I can do this?
You can use listview for dropdown and control its visibility as per need.I faced similar situation where I customized list view to enact dropdown.There is another thing I want to know about Picker.Does your picker accepts or adds string only or you could customize it to accept views or controls?

Activity makeSceneTransitionAnimation and reverse like Gmail App

Scenario:
In Gmail app Android Lollipop , when user select a mail at mail list screen, it will go to detail and perform expand animation at selected item. At detail screen, user can swipe left or right to view next/previous mail and when user press back, it will reverse animation at selected item to position on mail list.
In case if user swipe to view mail that was visible at mail list screen, it will animate to bottom.
So, my question is "How to can do like that?"
It is functionality comes in lollipop called as shared element transition and you can achieve it by placing the same transition name on the component and share with next fragment.
Here is a good example for you:
http://www.raywenderlich.com/103367/material-design

How to Call Button from List view inside fragment layout

Hello i have problem with button not updating,
I had used sample search , when user search any word ,
I had placed star button in right aligned in
I means to say suppose i search something and list view opens and at right star bookmark is there so on click it must show.
You can't get any useful replies without posting your source code.

doubt in list view

I have 2 lists, one on the left of the screen, the other list, on the right of the screen which gets dynamically populated based on the selected item on left list.
I move to the right list by pressing "Right" key from the left list.
Issue: Whenever I press right key from left list, the item that is currently selected is the item of the right list that is currently aligned with the left item. I dont want this to happen. I always want my 1st item of the right list to be selected. Can anyone help how to go about this?
Hmm, I don't know if it will work for ListItems. But with Buttons, there is an attirbute to set where the focus must go to! Eg: nextFocusRight
However, in these, the View Id must be specified, i.e the id of the view to which the focus must be passed. So am not very sure if it maybe useful with ListView items.
link text

List view row Selection

i have a simple list view control
my queries are:
1) how to set first row selected on start (after fill data in list view)
2) when i navigate by hardware button i got AdapterView.OnItemSelectedListener and color of row background change, but when i click i not get any OnItemSelectedListener and no row selected. How to select row on click.
3) when i change focus list row selection removed,
please any one with any solution, code example or articles
i search but no susses
with regards
Chandra Kant Singh
how to set first row selected on start
(after fill data in list view)
Call setSelection() on the ListView. However, this only will have a visual effect if the user entered your activity via the pointing device (trackball, D-pad, etc.).
How to select row on click.
You don't.
when i change focus list row selection
removed,
If I understand what you mean by "change focus", this is working as designed.
Please review this article on touch mode and the use of the "selected" state, then adjust your UI design to follow Android conventions. Selection is only used when the user navigates with the pointing device, not when the user uses the touch screen.

Categories

Resources