activity

android surfaceview is no longer visible after back from other activity

i have a question in developing some android program... i use surfaceview for camera preview. it works fine, but has one problem when i start other activity (by clicking something) and then back from that activity. after that, surfaceview is no longer visible. (but onclicklistener is working) but when i occur surfacecreated/destoryed b...

BuddyPress: Stop overriding default parameters passed to the template loop?

How do I stop BP from overriding default parameters passed to the template loop? For example, on the Activity page, let's say you want BP to "forget" the user's last viewed parameter (like "My Forums" or "@user Mentions") and go right back to All Members or My Friends every time you reload the page. I tried deleting the contents of aja...

Including Android Activities (and their layouts) in JAR files.

I'm trying to write a library that can be shared as a JAR file. This library will include an Activity and I'd like to include the layout in the JAR. Since it doesn't seem possible to include resource files in a JAR and I don't want the end-users to have to include these files themselves I was thinking it would be a nice hack to include t...

Multiple Listviews in single Activity in Android?

I want to have multiple listviews in single activity. But only one listview should be displayed at one time. The listviews will be loaded dynamically. So, how can I fill all the four listviews at the same time and display only one? ...

Launching unknown activities from an android application.

Hi, I want to make an android application that shows a listing of applications (downloaded from the android market) and launches the one that the user selects. From what I've read, I'd have to use intents like this: Intent intent = new Intent(); intent.setClassName(packageName, className); startActivity(intent); I just want to ...

About lifecycle of activities

In my application I have several activities, the main screen has 4 buttons that each start a different activity. So one of them is a search activity, once it searches it shows you a result activity. This result activity can be reached from other activities, so in general something like this: Main activity -> Search activity -> Result ac...

Calling a function that has 'Activity' as an argument.

I have stripped down my functions for simplicity: public static int countLines(String fileName, Activity activity) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(activity.getAssets().open(fileName))); return 3; } I am calling it from here: private CharSequence RandomRead() throws IOExceptio...

can i write my own event on android:imeOptions="actionSearch" ?

dear friends, i am using android:imeOptions="actionSearch" in editText and my question is can i write my own event if user presses Searchbutton on Softkeyboard? actualy i want to perform functionality of softkeyboard search button similar to button we use on android activity. any help would be appriciated. ...

Positioning elements outside an Activity on Android

Is there a way to absolutely position an UI element on Android so that it is located outside an Activity? For example: can you create a fullscreen ImageView simply by moving/resizing an ImageView inside an existing regular Activity instead of creating a new fullscreen activity? EDIT: Re-reading my question I see I wasn't very clear abou...

Android - Can I force BACK button to go 2 steps back in the Acitivty stack?

Android - Can I force BACK button to go 2 steps back in the Acitivty stack with some kind of code? I know I can override the onKeyDown method but I want BACK to do it's thing, just twice! ...

Change widget text in another activity

Suppose I have ActivityA and ActivityB, also suppose that ActivityA is active. I need to: Programmatically set a text of EditText in ActivityB from ActivityA Launch ActivityB Here's my code: EditText res; final LayoutInflater factory = getLayoutInflater(); final View resultView = factory.inflate(R.layout.ActivityB, null); // get wi...

Unexpected resume of "package name" while already resumed in ''package name" Error in Android

If changing the orientation of my phone or the emulator I get the following output in LogCat: 04-09 11:55:26.290: INFO/WindowManager(52): Setting rotation to 1, animFlags=0 04-09 11:55:26.300: INFO/ActivityManager(52): Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/1 nav=3/1 orien=2 layout=18} 04-09 11:55:26.460: IN...

Same Title Bar but different View below it in Android?

Hi, In one of my Android Application I need to keep the title bar same but the view that is shown in the rest of the screen changes. So, I have taken different Activity for all the views that I need to show and set the title bar in every Activities onCreate method. Now, the problem is that I have a button in the title bar and need to p...

My PreferenceActivity does not show up, even though it is in my manifest file

So I am modifying the Cube live wallpaper example. I have a class that extends PreferenceActivity, and I added the Activity in my manifest file. I keep getting ActivityNotFoundExceptions. Here is my preference class : package com.p.t.wallpapers.mywallpaper; import com.p.t.wallpapers.mywallpaper.R; import android.content.SharedPrefe...

Android: Adding data to Intent fails to load Activity

I have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured tha...

Start Activity with an animation

I am trying to start an activity with a custom transition animation. The only way I have found out so far to do this (without using onPendingTransition() in the previous activity) is to use a custom theme on the activity and define either activityOpenEnterAnimation, taskOpenEnterAnimation, windowEnterAnimation or windowAnimationStyle to ...

Android 1.5 - 2.1 Search Activity affects Parent Lifecycle

Behavior seems consistent in Android 1.5 to 2.1 Short version is this, it appears that when my (android search facility) search activity is fired from the android QSR due to either a suggestion or search, UNLESS my search activity in turn fires off a VISIBLE activity that is not the parent of the search, the search parents life cycle c...

android :activity

hi, i have two activities 1) downloading something on oncreate function with help of asyn task ,and had one button. 2) secons activity display on click of button. now when i go back to previous ie first activity , then downloading starts again, i want to get the previous filled data view ,instead of startg the previous process again .. ...

Problems with starting an activity in onStart

Hello everyone. I'm trying to start a floating activity from onStart to retrieve some info from the user right when the initial activity begins. I have the following: @Override public void onStart(){ super.onStart(); callProfileDialog(); } And callProfileDialog() is just: private void callProfileDialog(){ Intent i = new Intent(thi...

Android disable activity

How can I make an activity temporarily not touchable and not focusable ? ...