Android :: Control Trackball Behaviour In Droid Views?
May 27, 2009
I have a FrameLayout view which contains one (MapView-like) control and some additional buttons overlaying it. (the layout xml is below).
I want to allow the user to pan/scroll the main view using not only touch but also the Trackball.
The problem is - using the trackball just switches the focus between all the controls on the layout, and I cannot seem to find a way to contain the onTrackballEvent to just the MainView. code...
View 3 Replies
Oct 29, 2010
I'm kind of new in android AOSP development, and I'm trying to click to the trackball and launch an app already installed (Camera App). I'm looking at the policy.androdoid, but i just doesn't understand how to gain controls of the hardware buttons and where to start.
View 1 Replies
View Related
May 13, 2010
How can I control the trackball light in a nexus one ? I found something with NotificationManager but the samples do not work for me.
View 1 Replies
View Related
Dec 22, 2009
I have a requirement to create a control similar to UITabBar in iPhone, which is to be present on every activity of my application. UITabBar essentially is a battery of buttons exhibiting a TAB like behavior: every button maps to an activity. I have two solutions for this: 1. In the layout XML for every activity, I insert a <LinearLayout><Button/><Button/><Button/></LinearLayout> element. And then have a common listener class that will handle the button clicks. So, every activity will have an instance of this listener. 2. To create a custom Widget extending LinearLayout class, put all the buttons as its static members and let it handle the button clicks. Include this custom control in every screen.
View 3 Replies
View Related
Jan 6, 2010
I have a simple ListView and on that ListView I have placed a number of custom defined Views. The CustomView has ImageView and two TextViews.
The CustomView also has a "stateful drawable" as background, so that the background image (a 9-patch) changes if you press the Row in the ListView. When pressing the Row, the background image changes to a Red-ish thing.
The problem is that when the background changes from the default greyish, all the Views in the CustomView (ImageView and TextViews) still have their greyish background and thus creates very ugly greay boxes on top of the now redish background.
What is the best way to solve that problem? I hoped that such things were handled automatically (as it is done in for example .NET), but I was wrong it seems.
View 1 Replies
View Related
Nov 16, 2010
I am implementing a music player application in Android. My play list selection screen is implemented as a tab selector widget which contains a ListActivity inside each of the tabs: Artist, Albums, Songs.
I want to update the ListView in each of the ListActivity when I delete an item from any of the lists.
i.e. When I long press an item in the Artists list a context menu is drawn with "Delete Artist"
And it should delete all the songs from this artist in the Songs ListView, delete all the albums by this artist in the Albums ListView, and finally delete the entry for the artist in the Artist ListView.
Each of the ListActivity has its own fillData() method, which updates the ListView when the button in the context menu is pressed.
How can I call the fillData() method of the Albums ListActivity after I update the ListView inside of the Artists ListActivity?
View 1 Replies
View Related
Feb 28, 2010
I want to populate a table, defined in layout xml file through the programmatic way. I have define Table with a single row defining its header, with all the attributes set. Now i want to know a way so that i can just replicate that header row in the table with new content.
I tried using inflator inflate(int,view) method, but at runtime it showed up with error.
Here is the XML code for the layout file defining the table
CODE:.................
View 1 Replies
View Related
Mar 6, 2010
I have the following XML code:.................
The idea is to change the views, whenever I press one of the radio buttons. When I press a button the first time everything works out fine, but the second time I press a button, I get an IllegalStateException, and I can't quite see why I'm getting this.
Also, the Activity seems to set all my global variables to null, which is why I have to create them every time I switch from portrait to landscape or vice versa. So I would like to know if there is a way I can save my views in the Bundle, or any other way in which I can permanently save my views, so I don't have to add or create them every time, I flip the phone. And whenever I flip the phone, it seems that it rereads the main XML file, causing the RadioGroup to be set to 2D even if the 3D button is checked. This is because I've said the 2D button to be checked from when the app is first created, but I would like to also save the state of that RadioGroup.
View 5 Replies
View Related
Jun 15, 2010
In an older version of k9, when tapping onto a notification, it would open k9 but it would only show the unread emails.
for some reason its showing all emails including read emails, how'd i change it back to show only unread emails (across all accounts)?
View 2 Replies
View Related
Jun 16, 2010
How do you align views relative to the "middle" part of another view? I think it is best explained with a pic of the UI I'm trying to create in android.
View 2 Replies
View Related
Sep 17, 2009
what the default behaviour of the back button is, as far as the Android platform is concerned.
For example, in the Contacts Application, if I am creating a contact, I just key in a name, and the press back button, the contact is saved with only the name. Fair enough. But, I then edit this contact to include a phone number and press back button. This contact is updated which now includes the phone number. I again edit this contact. This time I remove the name, as well as the phone number and press the back button. I get a message saying, "Contact doesn't exist". In this case, it deletes the contact. :(
In the mail appllication, while composing, when I press back, it goes to the drafts folder. Thats good. But, if I just have to cancel this, and I don't want this to go to drafts folder. For this, I have to open the menu, and select "Cancel".
View 4 Replies
View Related
Feb 18, 2009
Got an activity that extends ListActivity. The list is backed up by a custom adapter that extends BaseAdapter. -- getListView().setFocusable(true); getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); -- I do a simple (getSelectedItemPosition() == == ListView.INVALID_POSITION) check in onPrepareOptionsMenu() to disable the items that require an item to be selected.
Now, what I do after launching the activity (the action takes place under emulator, ver.1.1) an what it looks like: 1) Hit menu - the menu items are disabled - OK 2) Select an item with mouse wheel and hit menu - the items get enabled - OK 3) Click anywhere outside the list, repeat 2). The items don't get enabled - WTF? 4) Start from scratch, select an item hitting Del and moving mouse. The result is the same as for 3).
Why do these (3, 4) things keep happening to me?
View 3 Replies
View Related
Jul 28, 2010
When a progress dialog is displaying and we press search hard key it closes and moves to search bar of phone, even if if the progress Dialog setcancellable value is set false.
View 1 Replies
View Related
Jul 7, 2010
I need to retrieve the orientation of my phone. At the moment i wrote this :
CODE:................
This code allows me to get the orientation of the phone if i leave the phone on a flat surface and i rotate it over the surface.
What i did not understand is why if i move the phone upwards the value of this.actual_orientation[0] ,which is the rotation on the zed axis as described [here][1], the value increases although there was no rotation.
Did someone know what happens?
Another strange thing..
I tried my application in the office at work and it had the strange behaviour i described before..
I tried in the same office(same situation) a compass app that i took from the market and it has the same behaviour of mine..when i moved the phone upwards the value changed consistently..
I tried in the same office(same situation) the i-phone compass and it didn't have that strange behaviour!
Then when i arrived at home i tried both, my application and the compass app of my android phone, and they worked!even if i move upwards the phone the value are stable...
View 1 Replies
View Related
Aug 6, 2010
I have an application with two activities, A and B. A is the root activity, which then starts B.When the stack looks like this: HOME > A > B and I select A from the launcher, I want it to resume the task without clearing the stack, so B is shown. Right now this is mostly working. However. In certain circumstances this occasionally does not work. What we see in this situation is that invoking A from the launcher will create a new instance of A and add it to our task's stack: HOME > A > B > A If we go back to home and select A again, we'll get another one: This happens if, and only if, we uninstall the application completely using the application manager, and then reinstall it, via a file browser. Installing the application with adb does not cause this problem to appear.In addition, when this problem manifests, if we then reboot the device, the problem goes away and everything starts behaving correctly! This is smelling suspiciously like a launcher bug can anyone shed light on this? This is using Eclair on real hardware (not the emulator).Update I have more information. It seems this is an Android core bug; see http://code.google.com/p/android/issues/detail?id=5277 in the Android bug tracker. Apparently running an application just after it's been installed by pressing the 'Run' button will run the application in a subtly wrong way. It's also still extant on Froyo, not just Eclair. Does anyone have any suggestions as to any possible workarounds?
View 1 Replies
View Related
Jul 20, 2010
I want to override the behaviour of the ENTER key of the virtual keyboard so that:
* when there are more fields on the screen, it 'tabs' to the next field.
* when it is the last field of the screen, it performs the default action of the screen
I've been playing with the IME options and labels, but just don't get what I want. Anybody a suggestion?
View 3 Replies
View Related
Jul 17, 2010
I want to override the behaviour of the ENTER key of the virtual keyboard so that:when there are more fields on the screen, it 'tabs' to the next field when it is the last field of the screen, it performs the default action of the screen.I've been playing with the IME options and labels, but just don't get what I want. Anybody a suggestion?
View 1 Replies
View Related
Oct 13, 2010
I have a pretty standard iPhone app that creates a series of around 7 unique Activities initialised by Intents.
However if the app crashes on the 7th Activity, the app restarts on the users phone around the 5th activity. The problem then is the info gathered from activities 1-4 is null, meaning the app is useless and the only way to get the app working again is to either continually press back or else kill the process.
Why does this behaviour occur, and is there a way to force the app to start back at the first activity when it crashes.
View 1 Replies
View Related
Jan 25, 2010
Is there any way to query a root view of an activity for all of its child views even before the root view or its children have been inflated? I guess what I'm looking for is whether a view knows ahead of time what children it will have before it gets inflated, and can I get that list in some way. Bizarre I realize, but I think it will help me with some unconventional automation testing I'm working on. I haven't found anything in the API like this.
View 1 Replies
View Related
Mar 7, 2010
Let's say I have a LinearLayout, and I want to add a View to it, in my program from the Java code. What method is used for this? I'm not asking how it's done in XML, which I do know, but rather, how can I do something along the lines of (One View).add(Another View) Like one can do in Swing.
View 2 Replies
View Related
Aug 6, 2010
I've run into some difficulties with implementing a custom progress dialog. Even though an overlay intercepts touch events the user can still operate the trackball and click elements that are supposed to be disabled.
Is there any way around this?
View 1 Replies
View Related
Aug 11, 2010
I downloaded the update yesterday evening, and today I've noticed something pretty weird in my calendar. On the phone (HTC Desire) every day is stuffed full of dozens of repeating appointments, mainly birthdays. These are set to recur not just on the day they should be on, but on every day of the year. These appointments are only on the phone calendar, not on my online Google calendar. What is even more bizarre is that these repeating events come from my old Palm OS device. I don't ever remember importing them to the phone!
It makes no difference whether I use the phone's built-in calendar or Jorte (which is what I usually use). Forcing the phone and google to sync makes no difference either.
Does anyone know what's going on here? The calendar on the phone is now effectively unusable.
View 1 Replies
View Related
Jun 24, 2010
Is there any DOM event in Webkit associated to trackball events (movement and pressing)?
Or is there any other way to handle those events from a webpage?
View 1 Replies
View Related
Jul 5, 2010
Yeah, Just like the title says, and the trackball wont go down. Any Tips tricks, etc? I'm rooted, so I can't lose that.
View 3 Replies
View Related
Jun 17, 2010
This is my third Eris replacement, all have had the silent speaker bug. This one has it as well, but now this one has the continuously scrolling left trackball even while not plugged in, making the phone unusable. I have an Incredible ordered, but until that arrives whenever it decides to, I'm stuck using an old LG Chocolate. Any ideas on this? I have had nothing but bad luck with my replacements. Almost wish I could have the original one back, which only had silent speaker intermittently.
View 8 Replies
View Related
Mar 17, 2010
My eris's trackball is now the same color as the body of the phone. I'd really like to clean the dirt off of it. What could I use to clean the trackball?
View 15 Replies
View Related
Jan 28, 2010
What do you guys use the trackball for? I have had the eris for about a week now and honestly, have not touched it once..
Just curious as I want to use this great phone to its full potential.
View 17 Replies
View Related
May 29, 2010
I know this is possible on the Nexus One and I was wondering if it is on the Droid Eris. It would be the coolest thing to have like a green trackball
View 5 Replies
View Related
Oct 5, 2010
So I am trying to root my phone and the trackball will not click. Knowing there is a known issue with the trackball, I go to VZW and they send me a new one, except that one has touch screen issues. Is there any way to get the trackball to click again? Tried basic troubleshooting, cleaned it etc.
View 15 Replies
View Related
Nov 17, 2009
Is there a way to change the sensitivity of the trackball? I know this was a feature on my BB, but I have not seen a way to do it on the Eris.
View 4 Replies
View Related