What is the component name of the following image? - android

Can you people see the common icon at the left of this list . If we hold and drag that icon then we can manually arrange the list. I want to know the name of this component and any example links (if available) to achieve this.
Thanks,

Its drag and drop list view you can find and example
http://ericharlow.blogspot.com/2010/10/experience-android-drag-and-drop-list.html
This project code is simply to share a simple working drag and drop list since I was unable to find one elsewhere on the web. If you add any extensions to this simple project I would like to hear about it in the comments.
or
You can also try Mark Murphy's
https://github.com/commonsguy/cwac-touchlist
To work with TouchListView in your own project, place the library project somewhere and update your project to reference the library project (via Eclipse, via android update lib-project, etc.). Then, add a com.commonsware.cwac.tlv.TouchListView widget to your XML layout file.

Related

What is the portion marked by red called in Android Development?

I am developing an Android App for TO DO List. I want to make clone of SplenDO which is present in Google play Store.The app looks like the above screenshot.What is the portion marked by red called,its definitely not an OptionsMenu and can somebody point me to the code how to include that in my app and when i choose Personal,items which i add in listview should be included in Personal and same for Default,Shopping,Worklist.
I think that this is a CustomDialog where you nest a ListView in it. Here is the design pattern and documentation on how to add List.
Hope it helps.

Code for "simple_list_item_2"?

Been working on an android application with a custom listview. I recently had to change to a cursor to accomplish what I wanted to do.
As a result, I ended up making use of android.R.layout.simple_list_item_2 because it worked how I wanted. Problem is that I would like to change a few properties such as font color and edit my cell as I see fit.
Question is, Can I find the code for simple_list_item_2 somewhere and edit it as my own, and call it instead of simple_list_item_2?
easy to get it. If you use Android Studio, you can put your cursor on android.R.layout.simple_list_item_2 and press Ctrl + B or F4 to get it.
if I don't make a mistake, F4 similar to F3 on Eclipse!
UPDATE 1
on Android Studio, you also get it by right click on it and Go To >> Declaration
UPDATE 2
on Android Studio, you also get it by hold controll and click on simple_list_item_2.
If you use Android Studio on MacOS, let hold CMD instead
You can find the code for this component by searching for simple_list_item_2.xml in the Android Open Source Project's frameworks. For example, it's available here in the GitHub mirror of the official repository.

Android: Trying to use a inbuilt layout xml file - simple_list_item_2_single_choice symbol cannot be resolved

I'm trying to create a listview where each item in the listview has two lines of text and a radio button at the end, so you can select one of the items in the list and then click next.
simple_list_item_2_single_choice.xml does exactly this, and it is integrated into android.
I have already used simple_list_item_2 which is built in for android on another screen without problems, and I can see that simple_list_item_2_single_choice is in
...\android-studio\sdk\platforms\android-20\data\res\layout
but when I try to reference it in my code, I get the error: cannot resolve symbol 'simple_list_item_2_single_choice'
Does anyone know how to make my app recognize this inbuilt file?
Does anyone know how to make my app recognize this inbuilt file?
Step #1: Copy the file into your app project.
Step #2: Reference your copy from your Java code.
While that layout file may be part of Android, it is not part of the Android SDK, as you will not see that resource listed in the android.R.layout package.

How to get class/method/attribute info in Android XML file?

When I am in a Java class file, I can get context info of a certain method/attribute/etc. (in IntelliJ, this shortcut is Ctrl+Q), which is basically a short help file describing what that element does. Look at the image 1.
But when I am in an XML file, I cannot get any contextual info on any element. Look at the image 2.
How should I enable it? Do I have to download some additional Android doc (javadoc?) file?
For Android code support in Eclipse, you might want to checkout http://android-developers.blogspot.com/2011/06/new-editing-features-in-eclipse-plug-in.html.
In particular :
XML editing has been improved with new quick fixes, code completion in more file types and many “go to declaration” enhancements.
basically a short help file describing what that element does
FYI: It's called Javadoc.
For the xml:
Go to Window, Show View, Other, General, Properties.
Then, when you have opened an Android xml, you can switch to the Graphical Layout. Clicking on an element will show you it's properties in the property view. Hovering over the elements there at least will give you contextual information.
As CrazyCoder suggested, there is no way to get such contextual info because of the lack of sources to fetch such info from. Until better times...

Android sidebar

I've been using firefox for Android and really like the use of the sidebar to hold shortcut icons and the like. How would I go about creating a similar bar myself with the following attributes:
progressively revealed as I swipe in one direction
progressively hides as I swipe in the other direction
can be a custom width
I can dynamically inject layout in to it or it can hold static content
Is there any open source code available? If not, what approach would I use to create this?
Sound like you're describing a Gallery control. There are some examples in the ApiDemos project here.
The first part can be solved by using a ListView. The second part I don't know yet. I'm looking for such a component as well.

Categories

Resources