Hi there,
I've got a preferences.xml:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Category">
<CheckBoxPreference
android:key = "inputPreferences"
android:title = "Title"
...
im having a bit of problem with this code can anyone help me with where im going wrong im getting a null pointer exception
SharedPreferences mPrefs;
protected void onPause() {
super.onPause();
SharedPreferences.Editor ed = mPrefs.edit();
ed.putString("names", names);
ed.putString("numbers", numbers);
ed.commit();
}
...
I'm trying to re-partition an SDCard on Android, with root access.
I have the 512 byte MBR file, and it shows up as this:
Pos MBRndx Type/Name Size Active Hide Start Sector Sectors
--- ------ ---------- ---- ------ ---- ------------ ------------
0 0 0C-FAT32X 5.9G No No 64 12,124,096
1 1 0C-FAT3...
I'm trying to implement a SlidingDrawer that will occupy the full screen width, but whose height is determined dynamically by its contents: in other words, standard fill_parent layout behaviour for the width and wrap_content for the height. That's exactly how I've specified it in the layout XML (see below) but the sliding drawer always o...
If I compile my app with the Android 2.2 SDK target, it will not run on Android 1.5. If I compile with 2.1, it works fine. The problem seems to be in finding some of my resource files. Here's the stack dump:
09-06 11:22:15.387 W/ResourceType( 2702): Failure getting entry for 0x7f020004 (t=1 e=4) in package 0: 0xffffffb5
09-06 11:22:15.3...
I develop Android using Eclipse and the ADT plug-in... and it's... slow.
I have to restart frequently and it gets painfully worse when I have various Android projects open (needed for when I use library projects).
Are there any specific optimizations that I can make to improve Eclipse performance when using the ADT plug-in?
...
Hey, I was curious if there was a way that I can assign each menu item in a ListView its ID from the SQLite database, so that when I do something like onClick, or using a ContextMenu, I can tell what item / row I am referencing to.
...
In my app I am displaying a table with misc. columns. What annoys me, is that all text fields are much too wide and thus waste lots of precious screen real-estate. How does on calculate a suitable field length in Android?
Currently I am setting the fields to as many "Ems" as the string contains characters (ie. textField.setEms(<maxOfStr...
I am working on an app for my company. One of the buttons loads a webview of a google calendar. This works pretty well and all of my other webviews scroll appropriately. However when loading this calendar it resizes to the screen size and will not scroll. I tried setting the webview in a linear layout and making the height of the web...
How would you create a Windows 7-like home screen replacement, on Android?
...
In my app I draw an image covering the entire screen.
I want to now how can I know where the user touched the screen?
Thanks
...
I need to change the dialog's typeface to use an external font that supports some unicode characters. Unfortunately, there is no AlertDialog.setTypeFace() method available...
Any ideas?
...
Hello all, i created a database with 6 columns and i have a create and update method in my class that takes 6 parameters/arguments which represent these columns. my problem is that, anytime i try to update or create the database without using all 6 arguments (setting some to null), i get an error "constraint failed". this is most partic...
I have a layout that is three linear layouts. The top has some icons and the middle has a tabhost. Each tabhost has a list inside it. The bottom linearlayout has two buttons that should stay at the bottom on the screen at all times. The problem is when a list in the tabhost gets too long, it displays over the buttons. I tried to fin...
I've got it wrapped in a try catch, but the exception still trips that ugly screen.
URL u = null;
try {
u = new URL(txturl.getText().toString());
}
catch (MalformedURLException e) {
ReportError(e,"Unable to connect to "+u);
}
calls this:
private void ReportError(Exception e, String message){
Displ...
I have a gallery with 7 images.
how can i got the position when stop the scrolling of gallery?
THANK YOU
...
If you take an apk off the android filesystem and change the extention to .zip then open one of the xml files it won't work because it's encoded in dex. But you can run ./adb dexdump -l xml layout.xml > ~/Desktop/layout.xml then edit it to your likeing. I can't figure out how to get it back in the apk though. I think I need to encode it ...
I want to receive the WAP Push Message. My code is post as follow:
public class PushMsgReceiver extends BroadcastReceiver {
public final static String TAG = "Push Receiver";
private static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
private static final String PUSH_RECEIVED = "android.provider.Telephony.WAP_P...
I have a ListView, and within each list item I have some TextViews and a CheckBox. When I check a CheckBox and my onCheckedChangeListener fires, everything works as it should. However, random other checkboxes get checked once one is checked. Here is an example.
If I click on the first CheckBox:
8 is checked.
15 is checked.
21 is checked...
I am trying to create a service that will use an AIDL-generated interface. How can I make the interface available to applications in other APKs?
Thanks!
...