When I call intent
public class TInfo extends ListActivity
implements OnSharedPreferenceChangeListener{
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
prefs = PreferenceManager.getDefaultSharedPreferences(this);
initvars();
setListAdapter(new TAdapter()); // class TAdapter extends ArrayAd...
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
dDbHelper.deletedJournal(info.id);
mDbHelper.deleteJournal(info.id);
public boolean deletedJournal(long homeId){
return mDb.delete(DATABASE_TABLE, KEY_HOMEID + "=" + homeId, null )>0;
}
dDbHelper.deletedJournal(in...
I have a dialog window that covers 1/3 of the entire screen height and is displayed on top of my activity. The dialog holds two AutoCompleteTextView fields.
The problem I'm facing is that when the user starts typing something into the AutoCompleteTextView, the list with all suggestions only shows up to the bottom end of the dialog, but ...
I was testing android minSDKVersion property and find a strange behavior-
I put minSDKVersion=3 (1.5) and targetSDKVersion=4 (1.6) in androidManifest.xml file.
For testing, I put following lines in onCreate method of launching activity -
android.telephony.SmsManager sm = android.telephony.SmsManager.getDefault();
ArrayList<String> s...
Does anyone know how to add a floating bar that will stay at the top of a layout page, even when a user is scrolling through the contents of that layout?
...
Hi guys,
Im trying to display this listview, but I keep getting a:
07-17 21:14:22.233: ERROR/AndroidRuntime(349): java.lang.NullPointerException
I think I know what the problem is but I dont know how to fix it.
I have a String array which I will be using to be displayed in my list
parser topicparser = new parser();
final Strin...
I'm very new to Android so I've been working primarily with information from the android developer's page. Everything was going great until I added the code from the alert dialog section. The code they give alone gives me an error when I try to run it on the last line, saying I must initialize dialog, but I feel like I'm getting the Nu...
Does Android wake from deep sleep in order to broadcast ACTION_TIME_TICK? From experimenting, I don't think it does, but I'm looking for a definitive answer.
My experiment involved registering a simple BroadcastReceiver to update a TextView on receive:
registerReceiver(new BroadcastReceiver() {
int ctr = 0;
@Override
publi...
Hi all,
I`am trying to launch an Intent filter from one proccess to run an activity of another proccess.
this is pretty easy:
protected void startIntent()
{
Intent i = new Intent(target);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(i);
...
I set my listview as follows and can change the icon that I am clicking to pause. However I cannot figure how to select an icon to change back to play that was clicked earlier.
public View getView(int position, View convertView, ViewGroup parent) {
final int posi = position;
View row=convertView;
if (row==null) ...
I need to play an RTSP audio stream on an Android phone, linked to from a web-page.
What's the simplest way to achieve this? I hope this will be very simple but unfortunately I don't have a phone on which to test.
...
When i have a broadcastReceiver say android.intent.action.MEDIA_BUTTON and i want to update the current activity's UI without creating a new activity, is there any good practice on this one?
What i know (might not be correct)
1) I can put the BroadcastReceiver in the same class as the activity and call the updateUI function after certa...
Hi guys,
I want to inflate a childView of ExpandableChildView component.
Code:
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
View v = convertView;
LinearLayout linearOpt = themesOptions.get(childPosition);
if(v == null) {
...
I defined a drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http//schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffffffff" />
<size android:width="60dp"
android:height="40dp" />
</shape>
But how to use it in the layout definition?
<?xml version="1.0" enc...
Hi out there,
have a problem, setting a Text to a TextView.
TextView android:editable = "true".
In my .java it seems like that
text = (EditText) findViewById(R.id.this_is_the_id_of_textview);
text.setText("TEST");
But it doesnt work, dont know, whats wrong..hope u can help me:)
...
Hello, I am writing an android application in which users can pick a photo from their gallery and upload it to a server. How should I accomplish this ?
The application mainly uses SOAP webservices to communicate with the server, but I do not know how to serialize a stream of bytes in KSOAP and therefore I need some help. The solution sh...
I have implemented an activity that retrieves data from a web service and display it in the AutoCompleteTextView. This has been working quite well.
I'm interested in displaying a spinning animation while the data is being retrieved (The same effect like the Quick Search Box)
I try to figure out how the QSB is doing it (10x Open Sour...
I have built a game. When the user clicks a button on the main page, he is redirected to another activity for a predefined time(say 20 s) and then he returns to the main page where he can choose another button. Now, this works perfectly on the emulator but on the phone when I clicks another button on the main page, it says the applicatio...
I have a fairly simple app that launches the camera from a menu. The camera launches fine, but when I hit ok after taking a picture I get a NPE on my nexus one:
E/AndroidRuntime( 3891): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity {net.asplode.tr/net.asplode.tr.P...
Hello. I need some help on the following:
I have the following class:
public class Game extends Activity {...
...}
My questions is:
Where and how do I create my View (do I use another class that extends View....)
Where and how do I implement the Runnable interface so I would be able to use threads.
Where and how do I connect all...