Android :: Can ListActivity / Tab Widget Be Use In One Activity?

Aug 9, 2009

My activity have to use List and Tab widget, one is left side,the other is right side, I means layout, but use List must to extends ListActivity, and use Tab widget must to extends TabActivity?

Android :: Can ListActivity / Tab widget be use in one activity?


Android :: ListActivity Vs Activity What Are Advantages?

Aug 14, 2009

I was reading on ListActivity and Activity and wanted to know which is better? I only need to display one listview. Would I see great improvements? Does ListActivity handle screen rotation better or it's the same?

View 2 Replies View Related

Android :: How To Switch From Activity To ListActivity?

Jul 24, 2010

This post probably shows my ignorance of Android coding, but here goes. I have a sample app I am developing which starts by extending Activity. I have a main.XML layout which works great. On a button click from the main layout I'd like to load a ListView. I think I understand how to use ListView and seed data into it. I have created a new layout which contains this ListView. I am confused, however, how I switch from a regular Activity to a ListActivity so I get the convenience methods like setListAdapter()? Should I be starting with a ListView, and then drawing the other view on top once the app starts by inflating the layout and using it? If not, how do I create a ListActivity object inside my app, and where should I create that? If you have a sample application or tutorial that shows how to do this, I would appreciate it.

View 2 Replies View Related

Android :: Way To Switch From Activity To ListActivity?

Jan 22, 2009

I have a main class derived from Activity, I need a ListActivity (displayed when the "menu" button is clicked). How can I proceed. I don't understand how I can switch from one to the other?

View 3 Replies View Related

Android :: Can't Change Activity To ListActivity

Oct 5, 2010

I need to change Activity to ListActivity. But I can't start my project... do ı need change manifest.XML for it? Or how can I change screen from Activity to ListActivity? Is there any difference to startActivity(new Intent(this, list.class))? Code...

View 2 Replies View Related

Android :: Call ListActivity From An Activity / App Crashes

Mar 23, 2010

My app crashes when i call a ListActivity from an Activity. I have searched on Internet and many people ask the same but i have not found any response. The only person i have found that solves the problems says that he solved changing manifest but he does not say nothing else. I i put the ListAvtivity as main activity in manifest app works ok buet if a set an Activity as main activity an then call ListActivity like:
Intent searchAct = new Intent(this, SearchResult.class); startActivity(searchAct);
then my app crashes. Des anybody know what happens?

View 7 Replies View Related

Android :: How To Get Method Of Listactivity From Activity Class?

Apr 19, 2009

Can i call method of Listactivity from Activity class? I have creates Intent object of myListActivity class and called startIntent() from myActivity class.

View 3 Replies View Related

Android :: What ListActivity / ListView Provide Beyond A Regular Activity / View?

Aug 7, 2010

In Android, what functionality do ListActivity and ListView provide beyond a regular Activity and View?

View 2 Replies View Related

Android :: App Widget Configure Activity Opens Main Activity

Jan 10, 2010

I hav an app that is like a relational database. There is a main app activity that users manage things with. There is also a widget that will display important info and add data to the database. When the widget is clicked, a configure class displays a way for the user to edit data. When the configure activity is done, the widget is updated and instead of going back to the home screen, the apps main activity is started. I can't find where the main activity is being called from. Wouldn't I have to create an intent and start Activity() to get this behavior? When done updating, I want the home screen and not my app.

View 3 Replies View Related

Android :: Call Activity From Widget?

May 30, 2009

I've read through the Application Fundamentals three times today (and I had done so before), but I still can't quite wrap my ahead around the task concept. Or I guess I thought I understood it, but usually, the results I am seeing don't match up to what I would expect to happen (maybe a tool to see the current tasks/activities etc. for debugging purposes would be a nice addition).

I have multiple widgets from my provider in the Launcher desktop, and each is using a PendingIntent with a different URI as data (so they should be separate intents) to open an Activity.

I want there to be only once concurrent instance of this Activity that the user can access. So clicking the widget (1) , pressing HOME (2), clicking a different widget (3), pressing BACK (4) should bring the user back to the Desktop.

Now I did manage to do this using launchMode="singleTask" - the existing instance is brought to the top, onNewIntent() is called and I am pretty satisfied with it.

However, supposedly there are other ways to achieve an equivalent effect (say with having the activity restarted), and I'd like to understand why I don't seem to be able to get them to work: In every case, instead of seeing the home screen after step (4) (after pressing BACK), I see the *previous* instance of the Activity.

For example, if I read this correctly:

"There's another way to force activities to be removed from the stack. If an Intent object includes the FLAG_ACTIVITY_CLEAR_TOP flag, and the target task already has an instance of the type of activity that should handle the intent in its stack, all activities above that instance are cleared away so that it stands at the top of the stack and can respond to the intent. If the launch mode of the designated activity is "standard", it too will be removed from the stack, and a new instance will be launched to handle the incoming intent." http://developer.android.com/guide/topics/fundamentals.html

Then simply using using the following code to start my Activity from my widget should do what I want, no?

CODE:............

So in (3) My activity should be launched using FLAG_ACTIVITY_NEW_TASK by the launcher, which due to process affinity would find the existing task (which would consist of a single instance of my Activity), and launch the new instance on top of it. This explains what I am seeing. Why doesn't FLAG_ACTIVITY_CLEAR_TOP cause the existing instance in the task to be replaced?

Even setting android:launchMode explicitely to "standard", as mentioned in the doc quote above, this doesn't seem to change things.

I also tried android:finishOnTaskLaunch="true", but the behaviour is the exact same was just described with FLAG_ACTIVITY_CLEAR_TOP (which seems to be the exact same as when doing neither and really starting an activity without any special attributes).

I should mention that If I click the same widget in (3) as I clicked in (1), i.e. using the same PendingIntent twice, I do get the previous instance brought to the front (not restarted), but again, regardless of whether FLAG_ACTIVITY_CLEAR_TOP or finishOnTaskLaunch are being used.

I find this especially strange since the docs about tasks don't seem to mention the intent itself being relevant at all. Application Fundamentals does at one point say "For the default "standard" mode, a new instance is created to respond to every new intent", but it's not clear what "new intent" means then. Is triggering a PendingIntent multiple times through a widget not multiple "new" intents then?

I also tried various combinations of the other related options, but pretty much got nowhere.

View 2 Replies View Related

Android :: Update A Widget From An Activity?

Sep 22, 2009

I have been looking for a way to update a widget asynchronously, for example, when the phone receives a text message. I have a broadcast receiver set up with code that runs upon receiving a message. I also have an AppWidgetProvider that is set up and running. It seems like the *only* way a widget can be updated is upon its interval, or when the user interacts with it. Is there any way to update a widget upon a system event?

View 6 Replies View Related

Android :: Update Widget From Activity

Nov 1, 2010

I have a widget, its setup so that when I click on it, it opens some settings in an activity.

CODE:................

This configures some settings for the application. What I want to achieve is to have the widget update its view to reflect the changed settings when the Activity I launch closes. Using the update interval or any other type of polling isn't appropriate for this.

I've seen a couple places here and in the android docs this code used:

CODE:...................

But I don't know how to get the mAppWidgetId value. I tried following the example for a widget configuration activity here http://developer.android.com/guide/topics/appwidgets/index.html, but in the following code,

CODE:............

Extras is always null, so I never get the AppWidgetID.

View 1 Replies View Related

Android :: Widget - Update From My Activity?

Nov 8, 2010

I have added a widget and instead of updating it every xxx minutes, i want to update it only if in my activity something is changed. But how can i call the onUpdate Routine of my widget from my activity?

View 3 Replies View Related

Android :: Embed An App Widget In An Activity?

Mar 19, 2010

I want to embed the analog clock in my application.

I use <AnalogClock android:layout_width="wrap_content" :layout_height="wrap_content" /> in my layout XML file, but the clock's appearance is different from the one added in Home screen. I know I can copy the AlarmClock's images to my project. And in xml file, set the android:dial, android:hand_hour,and android:hand_minute to my project's images. But I want to know is there a way to directly reference the resource in the AnalogClock?

second question, Can I add the app widget from code? I tried use following code to add a appwidget, but it seems the getAppWidgetIds don't work?

CODE:...................

View 3 Replies View Related

Android :: Run A Prefs Activity From My Widget

Mar 11, 2010

I've made an application for network monitoring "Myapp" under com.domain.monitor package and which contains a Prefs-activity . After that , I made a widget to let the admin keep an eye on hosts status "the information is presented as a graph in the widget" , also the widget has it's own package different of the Myapp's one & has a unique Prefs button ! (complicated Crying or Very sad , I know)

The Problem : Is there any way To run Myapp and show the prefs- acitvity by clicking on the widget's buttton !

View 3 Replies View Related

Android :: Programmatically Update Widget From Activity?

Aug 11, 2010

I know it's possible, but I can't figure out a way to trigger an update of my widget from the main activity. Isn't there some general intent I can broadcast?

View 1 Replies View Related

Android :: Launching An Activity From Widget Click

May 19, 2009

I am working my way through oh my first widget (so this is 1.5, obviously) and I'm stuck. I've poked around a problem involving the launch of an Activity when clicking on a widget. Scenario: User drags widget on home screen without prior launch of the Activity in question. I am following this post: http://android-developers.blogspot.com/2009/04/introducing-home-scree... Instead of launching the browser through ACTION_VIEW, I am trying to launch an Activity by class. I've toyed around with different Intent settings, but no luck.

View 7 Replies View Related

Android :: Launching An External Activity From Widget

Dec 22, 2009

I have written a widget that cycles through a series of movie poster images with next/prev buttons.This works.There is another button on the widget that needs to launch an external activity, sending it the name of the shown movie.The other activity is not in the same namespace, package or eclipse project as the widget.It is written by another developer and its apk is installed on my emulator.

View 7 Replies View Related

Android :: Change Widget Text In Another Activity

Apr 8, 2010

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:.............

ActivityB starts, but without any text in txtResult.

View 1 Replies View Related

Android :: Modifying Components On Widget From Activity

Apr 17, 2010

On my widget I'm having a button and a textView. When clicking that button some data is registered and I want the TextView to be updated. However I can't get to the TextView instance from within my Activity it seems.

View 4 Replies View Related

Android :: Add Widget Configuration Activity To Launcher?

Oct 17, 2010

I have a widget with a configuration activity.

Currently the configuration launches when you click on the widget.

I want to add the configuration as an app icon to the launcher.

The problem is that when the configuration launches on click, I get a specific widget id , so each widget instance can have a different configuration.

What will happen if I start the activity from the launcher?

I wont be able to show multiple configurations on the same activity.

View 1 Replies View Related

Android :: Display Widget Inside Activity?

Jun 2, 2010

I was wondering if there is a way to show a widget that I have created inside an activity. I have a weather widget and I also have an app I am working on that I would like to include weather reports in. Is there a way I can just re-use the widget code and make it show inside the weather activity?

View 4 Replies View Related

Android :: Use An Activity Or A Service When Using A Button In A Widget?

Aug 9, 2010

I have made a Android Widget which displays two articles (title + image). In addition to this, I have buttons for flipping backward and forward through the articles. What I don't understand is how I can change the Widgets RemoteViews when the buttons are pressed. Which should be one of the most basic operations in a widget, however, I can't seem to figure it out.

So... Can I do this with just a OnClickListener in the AppWidgetProvider? Or do I have to create an Activity without a window (visibility = false)?

View 1 Replies View Related

Android : How To Listen A Closed Activity From A Widget

Oct 8, 2010

I have a widget that launches an activity, but when the activity finishes using the finish() I don't know how my widget can know about it since I can't override onActivityResult() which seems like the only way to listen when an activity closes...?

View 2 Replies View Related

Android :: Widget Configuration Activity - Update Request

Sep 18, 2010

I'm having an issue with a config activity for a widget. According to the dev docs, if I specify a configuration activity than the onUpdate method of the AppWidgetProvider doesn't get called until after you request an update once you've completed the configuration activity. For me its happening in reverse, the onUpdate method of the AppWidgetProvider gets called first, followed by the configuration activity. Then the onUpdate method is never called after completion of the config activity even though I request it explicitly. I tried with level 4 and level 7 API, same result. Here is some of the source:

Manifest:
<?xml version="1.0" encoding="utf-8"?> <manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.chris.android.swidget"
android:versionCode="1" android:versionName="1.0">
<application android:icon="@drawable/app_icon" android:label="@string/app_name">
<activity android:name=".SWidgetConfigure">
<intent-filter> <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter> </activity>
<receiver android:name=".SWidgetProvider" android:label="@string/ widget_name">
<meta-data android:name="android.appwidget.provider" android:resource="@xml/swidget_info"/> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter> </receiver>
<service android:name=".service.PUpdateService" />
</application> <uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET" />

</manifest>
swidget_info.xml: <?xml version="1.0" encoding="utf-8"?> <appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="294dp" android:minHeight="72dp"
android:updatePeriodMillis="86400000"
android:initialLayout="@layout/swidget_layout"
android:configure="com.chris.android.swidget.SWidgetConfigure" >
</appwidget-provider>

I can include source of the onUpdate method from the AppWidgetProvider activity and the onCreate method of the configuration activity if necessary, but they are both being called find its just the order they show up on the emulator is wrong.

View 5 Replies View Related

Android :: Identifying Which Widget Click Is Launching Activity?

Jun 8, 2009

I m creating my own widget widget initial layout contains one button.when i click on that widget button it shud launch the specified activity using service everything is working fine..but the problem comes when there are 2 or more widget on home screen when i clicking on any one of them i m not able to specify with widget is launching the activity.

View 6 Replies View Related

Android :: How To Decide Widget Size In Configure Activity?

Feb 7, 2010

in HTC Sense, we can choose widgets of different size after tapping a single entry in the widget list. Is this also possible in pure Android Framework? I have tried to modify the widget's size in the configure Activity, but failed.

View 2 Replies View Related

Android :: Widget : Get Data From Configure Activity To AppWidgetProvider?

Feb 14, 2010

I'm writing a widget where i first have a configure screen where the user makes a selection. Then I want to pass that data on to the actual widget. This must be really simple but I just can find out how to do it.

View 2 Replies View Related

Android :: Starting Activity Witouth Window From Widget

Apr 17, 2010

I recently (yesterday in fact :)) started creating widgets.

So my first widget I want to create is something like: * A 2x2 widget * Containing 2 buttons * Button

1: Register current time and location * Button

2: Open up an activity where configuration can be modified, registered times and location can be viewed,...

Now the problem for me is button 1. As I only try to do some registration data (so no further user input required after pressing the button) I would like to just show a loading bar and after wards Toast a message to screen, or a popup if anything goes wrong.

This is what I do now:

CODE:...........

So what happens: I click the button, a plain black screen pops up (Altough I did not specify a layout upon creating the activity), and after my work is done the Toast shows up and the activity gets 'killed'. Basically that is what I want to do except for the black screen to show up. Is it possible not to show a screen upon creating the activity?

View 2 Replies View Related

Android :: Clock - Which Is In The Destop - Widget Or Application - Activity?

Apr 22, 2009

I have a question for widget support on Android. I found clock in the android destop, and want to know if it is a widget or application (Activity)? If it is a widget, what about the widget engine (runing enviroment) of android?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved