Android :: ListView Focus Behaving Different When Using MinSdkVersion-3
Mar 15, 2010
A few days ago I was trying to fix this issue: I have a header (three ImageButton's) and a ListView. If I use the dpad, pressing DOWN to focus the ListView, the ListView shows as selected the seventh or eighth row, not the first one.
What I need to do is that the first element of the ListView get the focus (or selection) when I use the dpad, from another screen component, but instead, the seventh or eighth is selected.
I had minSdkVersion=3 in my manifest. When I changed it to minSdkVersion=4 it worked as expected (first row selected). Don't know why, but there is a difference between both.
View 6 Replies
Jul 2, 2010
Now i want the first item of the list to be automatically focused when i launch the application How can i set the focus on any item of the list when i click on the some other view for example a button?
View 1 Replies
View Related
Feb 21, 2009
The context: I want to have a ListView that wouldn't receive focus (e.g. won't highlight row when user touches it). Yet each row widget has it's own OnClickListener.
Here's what I specify in layout xml:
CODE:.................
The ListView still behaves exactly the same. the interrelation between the three what's the right way to create a ListView that doesn't receive focus?
View 2 Replies
View Related
Jan 30, 2009
I'm trying to scroll my ListView (from an Activity) to a particular element in the list. I know it's position in the list. How is this possible?
View 4 Replies
View Related
Aug 24, 2010
I am trying to apply a selector to a ListView to make it easy for those without touch screens to navigate my app. The thing is, by applying the selector to the ListView, it only seems to apply the background colors to the entire list, not the items inside of it. Code...
View 2 Replies
View Related
Jun 12, 2010
I have an activity with ListView and buttons below:
CODE:.................
ListView row contains delete button:
CODE:.................
In Adapter, Button onClickListener is set, also there are dummies to make list non-selectable:
CODE:..............
What I want is:
Always show buttons in the bottom of screen after list (no matter how long it is, there should be scroll if it's too long) ListView should not be selectable, I don't want row selection row delete button should be selectable (focusable) with touch and with trackball
And everything works except I can't focus row delete button with trackball (although it's working with touch).
View 1 Replies
View Related
Feb 11, 2009
l have a listview,the item in listview is tablelayout.when listitem can focus when i use the trackball,but when i touch the listitem,it lose focus,why? my adapter is extended ArrayAdapter like this
CODE:...................
View 2 Replies
View Related
Sep 1, 2009
I noticed that when item in in a list is clicked rapidly, there is chance that item in other row becomes dark. Especially when you click turn on/off bluetooth in system setting quickly. Has anyone noticed it and is there fix for this?
View 4 Replies
View Related
Jun 20, 2010
I've got a ListView that works just great, except for this minor annoyance. I can use the trackball/dpad to move up and down my list, and the background changes according to which row has focus. But when I touch the row (click or long click), there's no background change letting me know what's been focused. I've tried setting 'focusable' and 'focusable in touch mode' to true on the rows, but it still doesn't work.
Just in case it matters somehow:
I am setting onClickListeners for each row. The row is comprised of LinearLayouts, TextViews, and a single ImageView. Focusable/clickable is 'true' for each row. Have not specified values for these on the ListView.
Trackable does act funny. I can only move between rows after touching inside the ListView. If I scroll trackball above the first item, it's impossible for me to scroll back into the list.
View 1 Replies
View Related
Feb 1, 2009
I've set the row (view) being used in a ListView as non-focusable along with non-clickable and have set the listview's focusable flag to false as well. However, I still get the yellow highlight when I use the scroll-ball on my device. How can I disable the yellow highlight and use my own special view/color instead upon focus?
View 6 Replies
View Related
Jun 18, 2010
I am trying to create custom background selector for my ExpandableListView. It works fine for all states other than focused. I am unable to identify which row is currently focused. Here is the code...
View 2 Replies
View Related
Nov 20, 2010
I have a list View in my app (this is the xml layout):
CODE:.............
Each item of my list View is composed of two TextView:
CODE:.............
I would like to change background color (and text color) of each item of my ListView on focus (and, if possibile on selection). How can i do it?
View 6 Replies
View Related
Nov 22, 2010
I have a list View in my app (this is the xml layout):
CODE:.............
Each item of my list View is composed of two TextView:
CODE:..............
I'm populating my listView from an ArrayAdapter, in this way:
CODE:..............
My goal is to be able to change the text color and the backgorund of these child views whenever the parent is selected or pressed.
View 2 Replies
View Related
Nov 9, 2010
I have some EditViews in the rows of a ListView.This works just fine except when the soft keyboard raises and lowers.When I touch the EditView within the ListView with the soft keyboard down, focus jumps to the EditView, then the keyboard comes up, removes focus from the EditView and sets focus to the ListView, resulting in an odd user experience with the focus no-where visible.Touching the EditViews with the keyboard already showing works as you would expect.The problem seems to be with the soft keyboard lowering and raising and the ListView getting confused about where focus should be placed.
View 1 Replies
View Related
Jun 17, 2010
I need to set alternate color in list view rows but when i do that it removes/ disables the on focus default yellow background
I tried with backgroundColor
rowView.setBackgroundColor(SOME COLOR);
also with backgrounddrwable.
CODE:.........
But it wont work. is there any way we can set background color and on focus color simultaneously which will work.
View 1 Replies
View Related
Oct 12, 2010
I am getting the warning: Attribute minSdkVersion (3) is lower than the project target API level (8)
How will this affect my app?
View 1 Replies
View Related
Sep 26, 2010
We have an application that runs fine on my Samsung Moment but crashes on load on my HTC Hero, both running 2.1. I thought Android was Android.
View 1 Replies
View Related
May 30, 2010
My application retrieve icons of installed apps on the phone. But for the dialer, the icon is different when I target a minSdkVersion = 3 or minSdkVersion = 4. I did not found different icon for an other application.
I am testing on a motorola milestone. and I use ActivityInfo.loadIcon() to load icons.
Can someone explain this behavior ?
View 2 Replies
View Related
Apr 25, 2009
I have a lot of Views where I have set a background image on the top LinearLayout and then I have nested a new linear layout below with a background that is semi-transparent. This works great in 1.1, but in 1.5 the transparency is just disregarded and this breaks my app as the text on top is now unreadable.
Is this a bug or a feature? Is there a better way of doing this? Very grateful for any tips!
Code example:
CODE:....................
View 13 Replies
View Related
May 31, 2010
Firstly I'm not able to download anything from the markets... the status just shows 'Starting download' and it just sticks there. This has been happening for a day or so, and I have two devices on different networks, so it must be the market and not me.
Also, I have some apps installed which the market doesn't recognize, it just shows the option to download as normal.
View 5 Replies
View Related
Aug 25, 2010
I'm trying to implement a ContentProvider wrapped around an SQLite database.
I've followed the tutorial here in building my ContentProvider:tutorial
I want to test what I have; so I'm attempting to instantiate my new ContentProvider, retrieve a Cursor from the query handler, and attach it to my CursorAdapter. Currently, I'm doing this in the onCreate of my Activity (I know this is bad practice, I'm just testing, I will move it to a service eventually).
CODE:.....
When I launch my application, the onCreate method of my extended ContentProvider gets executed. The database helper object gets created, the database gets created, and the onCreate method returns true. However, when I try to use my ContentProvider (with the code above), in the open() method the database helper object gets created, but getWritableDatabase() returns null. Also, when I call open(), the reference to getContext() is null.
Note: everything else seems to be working fine. When I call query, it hits my query handler, recognizes the Uri and attempts to run my query code (which obviously blows up because the database object is null).
Here are my extended ContentProvider and database helper:
CODE:........
I'm wondering if I should somehow be referencing whatever instance of MessagesProvider was created when I launched the application, instead of declaring a new one (p) and using it?
I updated the onCreate code in my Activity to the following, but managedQuery returned null:
CODE:......................
View 3 Replies
View Related
Apr 27, 2010
I wrote a basic soundboard app, and it runs fine there's nothing wrong with it. I want to upload it to the Market, but every time I try I get an error message:
Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml
That is already in there, I'm using 1.5 so I have my minSdkVersion set at 3. I don't understand what the problem is, and I've asked a lot of devs that never know what to tell me. I don't want to use a different platform because my phone currently uses 1.5. Others have suggested putting the <uses-sdk> line under the <manifest> line, but that hasn't helped at all.
Here is what my manifest looks like:
code:....................
View 5 Replies
View Related
Mar 15, 2010
The Eclipse build for my 1.6 application project is succeeding and the Ant build is failing. I'm looking for help on why they aren't behaving the same way.
We are developing on Mac OSX 10.5.8 with Eclipse 3.5 against SDK 1.6 + Google APIs. There are no setting changes in Eclipse, either at workspace or project level. Similarly, our ant is also a vanilla- flavored unmodified installation of 1.7.1. JDK is 1.5.0_22. The CLASSPATH environment variable is not set. JAVA_HOME is /Library/Java/ Home
The application was initially created by a team member using the Eclipse plugins. The application references two jar files, one of which has a dependency on javax.xml.bind.annotation.XmlSeeAlso, which is not defined anywhere in our code or in android.jar. The other jar file has an explicit dependency on android.jar. I generated the Ant build file using android update.
The Eclipse project builds an apk and runs the application in the emulator. I think this is incorrect behavior.
The Android project fails to build. I think this is correct behavior. MyClass.java:98: cannot access javax.xml.bind.annotation.XmlSeeAlso[javac] file javax/xml/bind/annotation/XmlSeeAlso.class not found
Any ideas as to why the two build methods are behaving differently? I would expect them both to fail.
View 5 Replies
View Related
Apr 16, 2010
Here's my situation: I have an app that's been compiled using 1.5 SDK and minSdkVersion=3. Now I want to add 2 icons: one for high density screens like Droid and another one for low density screens like G1.
For this, I added the high density icon to new directory drawable-hdpi- v4/. I then compiled using 1.6 sdk and added targetSdkVersion="4" to the manifest. minSdkVersion is still 3.
This is working in limited testing, but I'm not sure if I have done everything correctly.
I have many questions:
1. By specifying v4 in drawable-hdpi-v4, the icon will not be displayed to 1.5 or below OS's. But what about users with 2.0 or higher SDK's? Will they get the non-hdpi icon, since they will have v6 or v7 ?
2. The documentation for targetSdkVersion states, "Specifying this target version allows the platform to disable compatibility settings that are not required for the target version (which may otherwise be turned on in order to maintain forward-compatibility)". Does this mean that my app will not be forward compatible as soon as I specify a targetSdkVersion? What exactly is being turned off?
3. Even if I leave out the targetSdkVersion="4", the app runs ok. So do I really need it?
4. Should I be using the latest SDK (2.1) and setting that as the targetsdkversion and compiling against that? Or some other combination of targetsdkversion and compiling sdk? I'm not using any API's that are not in 1.5..
5. Is any of this related to why some of my HTC Eris users have complained that they can no longer find my app in Market after upgrading to 2.1?
View 3 Replies
View Related
Dec 30, 2009
I've been trying to figure out how to make some sense of a dumped XML layout, and it's progressing 'pretty good'. The only thing I'm currently unsure about is the following:
When I use the command:
aapt dump xmltree <pathofapk> <pathofxmlfile>
I get the following result:
CODE:.............
That's all good, but what I'm trying to figure out is how to convert the following code into the XML layout file:
CODE:.................
Converting those values to decimal would result in:
CODE:.................
All good, but I've been trying to figure out what the (type 0x5 means). With all other types, the result is defined in the Android.util.TypedValue.class file
Decompiling that, gives the following result for 0x5:
CODE:...............
Makes sense, in a way. But, I need to know what kind of value it is, so looking down, I find the following value:
CODE:.............
But, when I try to use 2561mm and 1025mm (It's a tad much anyway, 25cm is.. larger than my screen), The whole screen is filled with the 'parent LinearLayout'.
View 3 Replies
View Related
Aug 29, 2010
I loved the camera on the Eris and the Incredible, not only did they have a whole lot more of a crisp high-res detail, the auto-focus absolutely rocked. With my droid x, I can be getting a little artsy and focus on an object with the crosshair but it'll take me 20 tries to get it to lock on, its insane, I know I'm not getting too close to my subject because it will definitely eventually focus on that object if I try over and over and over again. It's not just close ups that I find myself and my buddy with this issue either. macro shooting mode does not help. My buddie's droid X has the same exact behaviors. Eris and incredible just LOCKED ON first try with even very low contrast / detail subjects, on top of that, have a ton better camera GUI when it comes to "click to focus". I know this thing ain't no SLR but, blows me away of how terrible the camera performance is vs. the HTC android based devices. Ihink motorola will fix this? I know this thing ain't no SLR but it just blows me away how the HTC android devices camera performance (except for video) blows the Droid X away.
View 9 Replies
View Related
Apr 24, 2009
I have the following clear message :
Market requires the minSdkVersion to be set in AndroidManifest.xml.
But my manifest has the line : <uses-sdk minSdkVersion="2" /> and I also tried even <uses-sdk minsdkversion="2" />... I try to put this line : as the first child of manifest, as the last child and also right after application.. Is there a hidden rule I don't know ...
View 11 Replies
View Related
Sep 6, 2010
I have people complaining my application gets FC when they launch it (meanwhile others never had a single problem). Here is my full activity source. Since it happens on devices I don't own I can not fix it. From what they tell me it doesn't work on: Motorola Blackflip, Motorola Dext, Motorola CLIQ XT. Guess Motorola doesn't like my app after all...
Could it be that I allow a minSdkVersion="3"? I tested 1.5 on the emulator and worked fine... code...
View 1 Replies
View Related
Jun 26, 2010
I would like to change text and back ground color of my Listview without building custom rows. Is this possible ?
View 1 Replies
View Related
Jun 24, 2009
There must be a way to do this. How can you tell a ListView that has a header to not scroll it when the user scrolls the contents? I want it to stay in a "stuck" position so that the user can always see what column the content applies to.
View 9 Replies
View Related