i have a relative layout like this:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/single_row" android:padding="12dip">
<ImageView android:id="@+id/page_image"
android:layout_marginRight="6dip" android:l...
Update: Fixed, this was due to missing properties in views and my not knowing how to work the debugger :)
I'm really new to Android. I've just finished the Notepad tutorial and am making something similar (most of the code is exactly the same). The sequence of events I'm going through:
Debug app
Click Menu, which has the correct i...
There is a variety of devices on the market, with different screen sizes, resolutions and pixel density.
What are some layout preferences or tips/tricks that are generally used to make sure the app looks the same across devices?
Thanks
Chris
...
I have one Android application, when it runs a service, I want to show the notification on the status bar. Then the user could navigate to other application by pressing HOME key. However when I try to bring the previous running application back to Front via notification icon, there is some problem with the existing activity. Even I dec...
The reason: I'm trying to make Android work in a device without touch screen.
...
I'm trying to figure out the correct way to create an AsyncTask to retrieve some data from the internet and then to take that data and bundle it up in an Intent and pass it to a new activity(A list display). So in the first activity I just have an EditText and Button. In the event of an OnClick the task should be called and when it is ...
When I try to run the SDK Setup.exe in my sdk folder, it will open up fine. I then get an error for fetching so I change the https to http and proceed to (try) and download. It usually hangs around 2% and it won't go past 10% so far, I've tried to restart it at least 10 times.
Is there anyway I can ignore this program and just download ...
Is there anyway to intercept that a hard key was pressed by using a service in order to launch an activity?
In other words : Is it possible to handle the KeyEvents in the Service?
...
Hi,
I have 2 String Operations I would need relevant in Object C
// Get the newstring from mystring start at counter
Java: newstring = mystring.substring(counter)
OBJ-C: ?
// Get the position from searchstring in mystring
Java: startpos = mystring.indexOf(searchstring)
ObJ-C: ?
Would be great you can help
Thx
chris
Edit: I ha...
I want to get the color of one pixel of screen
...
I have an activity 'A' which is called from Main activity every second until timer ends.
A is called to draw pulses until timer ends
public class A extends Activity
{
*some code*
public class NestedView extends View
{
public void onDraw(Canvas canvas)
{
* draw pulses
} ...
Hi,
In the default Mail application that ships with Android, each message in your inbox has a checkbox next to it. Clicking this checkbox pops up a toolbar from the bottom of the screen with buttons to mark all checked messages as read/unread, delete a message, and star a message. I want to replicate this popup toolbar for my applicat...
On the soft keyboard in Android you can set the soft keyboard to show the numbers instead of a-z keyboard using android:inputType="numberDecimal". However, what do I do if I only want to show the top number row 1 2 3 4 5 6 7 8 9 0 and not the following rows starting with @ # $ % ...?
Thanx for listening!
...
I have application which works only in landscape orientation . I set that in xml layout. When I'm starting application it works ok . But when the application is started and next if I lock the phone and then unlock, the application first 1-2 seconds is in portrait mode and then in landscape. Is it possible to skip theese 2 seconds?
...
I have investigated this problem for months now, came up with different solutions to it, which I am not happy with since they are all massive hacks. I still cannot believe that a class that flawed in design made it into the framework and no-one is talking about it, so I guess I just must be missing something.
The problem is with AsyncTa...
Hi,
In android, what is the simplest way to determine the duration of an audio file (assume I have an URI of the file on the phone)?
Do I need to create and prepare an media player for each file I want to determine the duration of the file?
Thank you.
...
Does anyone happen to know if Google's MapActivity will eat up extra resources if an Activity does not use Google's MapView? The reason I ask it because I'd like to have a base activity class (which would extend MapActivity) for my activities in my application, but I don't want my resources to be eaten up when the user is in an activity...
I get this series of messages about once every six or so seconds from my Android emulator's LogCat output. I haven't noticed a cause, and it doesn't always happen, but when it does, it doesn't stop until I kill the emulator. Here's the repeated message:
07-28 20:53:00.763: DEBUG/AndroidRuntime(2756): Shutting down VM
07-28 20:53:00.763:...
I'm able to add a Contact with ContactsContract to one of the user's accounts (a difficult feat in itself!), but I still haven't been able to add it to a group that will show up. I know that the user can go to their contact options and check a "Show All (Other) Contacts" box in their account, but not only is this is an extra step for the...
I have a widget with an ImageView on it. I set this ImageView to a Bitmap created from a 9-patch PNG resource. The image is set correctly but is not stretched correctly - i.e. the whole image is stretched instead of just part like defined in my 9-patch PNG. If I just set the 9-patch image as a resource, it works. How can I fix this?
// ...