activity

scroll start point of a HorizontalScrollView

In the method onCreate, I tried to put a series of TextView in HorizontalScrollView and then I tried to set the value of the scroll to a TextView. Not working. When I find the TextView I need, i put it in a class field and when the cycle that inflates the TextViex is over, i ask to my good one TextViev its getLeft(), and it return me alw...

About making new Activities

Hello! I have an Activity with a listView with few options and a button at the bottom of the screen. The listView is just to configurate some options so, when i click in any of the items in the list its needed to let the user choose between some options (in some cases i'll use another list to show the options, in other cases i'll let th...

Maintaining Multiple instances of an activity

I have an activity that need to be created for 4 different types. Activity User A Activity User B Activity User C Activity User D All the instances of Activities are created using the same Activity(for example, User) class. Now i want to re order the activity B to top. So from Activity User D im calling the Activity User B using the ...

Add a live background to an Android View (like the Twitter App)

In the official Twitter Android app, the opening activity (the dashboard) and the Tweets tab activity have a live background/wallpaper (clouds moving, etc). How do you accomplish that? Is it as simple as setting your view's background to a live wallpaper drawable? And then adding <uses-feature android:name="android.software.live_wallp...

Android: How to start an activity at a specified time?

I'm making an alarm clock of sorts, and I was wondering what the best way to start an activity at a certain time would be. Would it be using the broadcast service or... ...

Starting an Android activity as a dialog without using a theme modifier

I want to start an activity as a dialog, which can be simply done by: <activity android:theme="@android:style/Theme.Dialog"> But I want to do control the dialog, so I've to do it programmatically. Basically I want to modify this property of dialog: mCanceledOnTouchOutside = true This will make the dialog cancel itself when touched ...

Android - Activity of a killed process is still visible in list after [Home] pressed

Hi all, like many others, I want to kill my Android application on "exit" button. Really kill, not just move to background and stop all active code. (I know very well that Android does not like it.) I found Process.killProcess(Process.myPid()); and System.exit(0) which both work fine (I have no problem with activity stack, the "exit" bu...

How to display a tiled background for all resolutions?

I have a texture.png which I would like to tile, to create a textured background for my window. Will I run into any problems with different screen resolutions? If so, what is the best way to support a textured background for multiple devices? Should I have 1 image instead? How large should it be? ...

Android - findViewById(R.id.list) returns null

Hi, I have a class that is called when my app launches. public class MainActivity extends Activity implements NetworkEvent. In this situation, list = (ListView) findViewById(R.id.list); works perfectly. However if I then call a new intent via: String[] names = object.names(); Intent myIntent = new Intent(MainActivity.this, ...

How to start an activity inside any layout, android

Hi, I have created a an activity named Example which have 3 LinearLayouts . I want to start an activity. So I used the following lines of code Intent jumpToStationModule = new Intent(); jumpToStationModule.setClassName("com.xxx", "com.xxx.Test"); startActivity(jumpToStationModule); Test is another activity. As a result of the ab...

Confusing Android Activity lifecycle bahavior

Hello, I did a simple program by overriding each of the lifecycle methods and everything works as I'd expect, except for onRestoreInstanceState(Bundle savedInstanceState). I overrode the method as @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); ...

How to define an activity for the Search Button?

I am not using a SearchManager, but I have built my own custom search activity. I want this to be shown when the user clicks on the Search button. How can I do this? ...

android weird onCreate / onDestroy balance

Hi, is there a way to tell Android that I would like subsequent calls to startActivity() all resume the target activity rather than creating it over and over again ? Any workarounds ? Thanks ...

Set Default Chooser when Selecting Image?

Hello, In my application the user selects an image. When the ACTION_GET_CONTENT intent is launched it displays the dialog to select one of the available image viewers installed on the device. However I need the built in Gallery app to be chosen because upon selecting an image it launches the screen to crop the image (same thing that com...

Handling activity rotating in Android

Hi! I need to apply different layouts for portrait and landscape orientations of my activity. Besides, I need to show alert if orientation is portrait. I have specified android:configChanges="orientation|keyboardHidden" in AndroidManifest. I also override onConfigurationChanged method like this: @Override public void onConfigurationCh...

android widget and localservice bind

I writing player, it has main activity that runs localservice. I can't find how bind localservice to widget. When i trying to bind it like in activity it fails. Plz help me. Adding #1 How can I contact with background service when? http://www.developer.com/ws/data/article.php/10944_3843561_1/Handling-Lengthy-Operations-with-Android-App...

Dynamic ListView extends Activity

Is there anyway I can create a dynamically filled ListView when the class does not extend ListActivity? I appreciate the help. ...

Close activity hierarchy in Android

How do I close a whole hierarchy of activities and show a new activity not present in the current task? Context Consider a FTP browser that resumes the previous session on launch. Each folder is displayed in its own activity. When I click on a folder, a new activity is started for the folder. If I press the back button, the app returns...

Kill activity in thread

How can I kill Android activity from asynchronous thread? In my android application, I start another activity using startActivity. Is there anyway for me to kill that activity I started after several minutes? Or is there any way beside using thread? ...

How to find when a table was last accessed/updated for SQL Server 2000 sp4

I need to find if a certain table has had any activity(update/query). Is there are way to find this information in SQL Server 2000 (sp4 to be specific) There is a helpful query using sys.dm_db_index_usage_stats, but it is supported only post SQL Server 2005. I am looking for something similar on SQL Server 2000. Thank You for your time...