If I invalidate() a part of my custom view with a dirty rect parameter, how do I get the dirty rect inside the draw() method? The clipping rect of the canvas is not the same - in my experience, it's typically few times larger.
...
Hi
I have a java code for contacts app in Android and it needs a package named
import com.google.android.collect.Maps;
I am not able to figure out how to include this in eclipse so that I can go ahead working with this app.
...
I want to send a broadcast message with intent within extra data of my custom type which implements Parcelable.
In more details: I want to create a shortcut on the HS
However system does not accept object of my custom Command type, error message: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.solvek.us...
I access a web service in a POST method. I need to send to the server a json serialized object. In my Android class I have some string fields and a Date field. This Date field gets serialized like this:
.... TouchDateTime":"Oct 6, 2010 5:55:29 PM"}"
but to be compatible with the web service I need to have it like:
"TouchDateTime":"\/...
If I use the query to return some basic columns in table, that is OK. But if I use group by, order by , sum(column) or choose specified columns, the query fails to run.
I use Cursor query method or rawquery, both the same. If I run the following queries in adb shell, it works without problems.
select * from table (work)
select fielda,...
Good day all, First of all, maybe i went about this the wrong way in the first place. Situation is, i have a listview that when an item is clicked, it creates an intent and calls startActivityForResult() to another activity, to be able to edit the entries in the row. and that other activity after editing the required values, returns back...
I have the following custom view:
This I have achieved by using the Canvas' drawArc() method. However, with this drawArc() method I cannot limit the arc's inner radius.
What I'd like to have is something like this:
where there is only an outer ring left.
What I need is an drawArc() function where I can set the inner radius of the...
HelloZz,
I would like to know if the Android handsets can be configured Over-The-Air; in other words, if they can be configured for settings (such as GPRS , WAP or MMS ...) using OTA.
If yes, do they support OMA CP provisioning? Is there an XML example that can be used to configure the Android devices?
thanks!
...
I'm beginning with Android development. I'm aware that there is a lot of Android devices still on OS 1.5 or 1.6 so I'm thinking about require API level 3 as minimum to support them.
What will I miss from 2.2?
...
<LinearLayout android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal"
...
Hi,
I've a problem with ListViews.
Everytime I try to add an item after it has first been shown,
my program FC having following stack frame
Thread [<3> main] (Suspended (exception IllegalStateException))
ListView.layoutChildren() line: 1603
AbsListView$CheckForTap.run() line: 1827
ViewRoot(Handler).handleCallback(Message) l...
I am using a DatePicker in a Dialog box to allow the user to chose a date. But I just want them to chose a month and a day. Is there any way I can make the year not show up?
...
I have an app that is using Bluetooth headset as its input and output for some kind of audio feedback and recording. When I make or receive a call, my app does not closes. The app is running and am able to talk. But when I end the call, my audio streams that were being used by the app also gets closed.
Also am able to record what am sa...
Is there a way for my app to know the android:versionCode from AndroidManifest.xml or do I have to create a separate constant in one of my classes?
...
Hello all,
I am trying to create a button that has a custom background in the default state, but that still uses the colors for the pressed/selected states that are particular to whatever device it is running on.
From looking at the EditText source code, it appears that there is no such API, and that the pressed/selected colors are sim...
Is alignment working in HTML.fromHtml() in a TextView?
I tried
<div align="center"><p>Test</p></div>
and some variaties of this, including putting the alignment tabs without parenthesis to the paragraph tag, but none worked. The text is always left.
Thanks for any help!
Yours.
...
(preferably not by using recursively changing size after having done setContentView)
...
What does the following exception mean? And how can I fix it?
This is the code:
Toast toast = Toast.makeText(mContext, 'Somthing', Toast.LENGTH_SHORT);
This is the exception:
D/VVM ( 684): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
D/VVM ( 684): at android.os.Han...
Android isn't firing the delivery intent when sending a text message. I'm testing this on Android 2.2 on the HTC EVO 4G.
This is the current code. I'm seeing "SMS sent intent received." in the logs, but not "SMS delivered intent received.".
// Constants
String SENT_ACTION = "SMS_SENT_ACTION";
String DELIVERED_ACTION = "SMS_DELIVERED_AC...
Hi,
I try to play a sound from R.raw. inside a Thread/Runnable
But I can't get this to work.
new Runnable(){
public void run() {
//this is giving me a NullPointerException, because getBaseContext is null
MediaPlayer mp = MediaPlayer.create( getBaseContext(), R.raw.soundfile);
while (true) {
if (somethin...