For example, I want my users to be able to click a button "Get new quote" which will start a new row in the the database for data to start being stored, but I'm unsure of how to store activity independent (or cross activity) data, like the _id of the row, which I will need to requery and update the row when new data becomes available on ...
When an EditText is in password mode, it seems that the hint is shown in a different font (courrier?). How can I avoid this? I would like the hint to appear in the same font that when the EditText is not in password mode.
My current xml:
<EditText
android:hint="@string/edt_password_hint"
android:layout_width="fill_parent"
android:layo...
Is the assets folder only accessible to the app or can the user see it too? For my app I want to store a credential certificate and video files on local storage but I am not sure how to hide these items from the users. The assets folder seems like the only choice.
...
I have an Activity running as a Theme.Dialog. Can I set its title to an "ellipsize" style? Currently, the text is being populated in onCreate() with setText(). There's no this.setEllipsize() like on TextView.
Or, is my only option to write a Custom Dialog and set the title style there? I'd like to know if that's possible before heading ...
I have an app which uses a large amount of data which has been compiled outside the app (on my main PC). The app is for my personal use so there are no complications with having to distribute data updates to other users. However, I am currently following a very convoluted and time-consuming procedure each time I want to update the data, ...
How can I open a context menu for a view without registering it using registerForContextMenu()?
My activity overrides onTouchEvent to detect motion, and if I use registerForContextMenu() it stops working. I'm detecting a long press, so I'd like to forward that request to a method that would build the menu for me, but don't know if it ca...
I have a database with a field for a stored date. I would like to be able calculate the days between the recorded date and today.
I ended up using:
mDb.execSQL("UPDATE "+DATABASE_PLANTS_TABLE+" SET "+ KEY_PLANT_DAYS+
" = (SELECT julianday('now') - julianday("+KEY_DATE+") FROM"+ DATABASE_PLANTS_TABLE+")");
...
Hello,
I have an edit text and I'd like to put the following constrains (in the XML code if possible):
Disable all the capital Letters (the inverse of android:capitalize or the same fonction than toLowerCase())
Block to EditText to 1 line max. (for instance avoid that when I press enter the editText
get bigger to create a new line)
I...
Hi everyone,
I have searched for quite a few hours and have not been able to find a concise definite andswer to my question. I have an application where I need to draw a sports field (including all pitch lines) to the screen. So far, I have extended the SurfaceView and pretty much copied the rest of the LunarLander demo as well.
All the...
I have a custom CursorAdapter which I'm using to inflate a custom item layout and style accordingly, as shown in the code below. My issue is that sometimes the wrong style information is supplied even though the data coming from the DB is correct (so for the below example I'll get isEvent == true but it'll go on to style as if isEvent =...
Hi!
I'm drawing on my custom Views canvas. Why the Views resolution is always 320x480 and then it's streched to fill the whole screen wich resolution is 480x800? This causes little gaps between pixels that should be right next to each
other.
How can I get the View to use the screens native resolution withoud scaling? Or can I define the...
I sometimes get "Host is unresolved: imap.gmail.com:993" when I try the javamail/gmail store.connect in the Android development environment using GMailReader below. Why might this fail sometimes and not others?
public class GMailReader extends javax.mail.Authenticator {
private String user;
private String password;
public GM...
Hi,
Information:
My device is a Nexus One with 2.2 and I have tested two projects, one on 1.5 and one on 2.1.
Problem:
I have trouble to understand the life cycle of my application when the screen is turned off and on.
Here is my output
// activity starts
08-04 17:24:17.643: ERROR/PlayActivity(6215): onStart executes ...
08-04 17:24:...
What's the height of the status bar in Android? Is it always the same?
From my measurements it seems that it's 25dp, but I'm not sure if it has the same height on all platforms.
(I want to know this to properly implement a fade transition from an activity that doesn't have status bar to one that does)
...
I'm making a game with 5 objects moving around on the screen with SurfaceView. It's not a problem until a display all 5 objects to the screen. It displays a black screen. Any suggestion?
I'm using SurfaceView and use onDraw() to draw bitmaps.
...
Can anyone recommend any books or resources for learning smart phone architecture (specifically iphone or droid) ?
I am lookinng to learn and get into smart phone development, having been doing desktop development for a few years now.
...
I looking at getting the T-Mobile G1 phone. I won't use the phone as a normal cell phone. Instead, it will always be plugged in, running an Android app I'm developing.
Has anyone experienced, or heard of, heating problems with this phone? My current phone, a Nexus One, gets extremely hot when plugged in and in use. Since the G1 will alw...
On Android, is there a way to force a particular request to go through WAP instead of wifi?
...
I see that it's possible to launch the date & time settings via an intent in Android, but what I'd like to do is launch just the list that shows the time zones (clicking "Select time zone") and get back the selected value without having the selection modify the user's date & time settings. Any idea how to do this?
...
I have 2 Android Databases in my app. For the sake of an example, lets say Database #1 is called JOBS and has the following columns:
"Jobs Primary Key" - "Job Title" - "Job Description"
Database #2 is called PEOPLE and has the following columns:
"People Primary Key" - "First Name" - "Last Name" - "Jobs ID Key"
(Yes I know these are n...