Android :: Changing Content Of Activity Run Time

Jul 24, 2010

I created an activity by using a layout written in a XML file. I would like, in response to some events, to change the content of this activity. I would like to show a VideoView over the content. In response to some other event, I may want to go back to the first content. Would it be possible to switch the content of the activity this way without running another activity (I have another technical difficult in doing that)? I tried using setContentView( videoView), and then switching back with setContentView(T.layout.main), but it seems that, when going back to the main layout, all my buttons and text boxes are created again as they were new. Would it be possible to go back to the last state of all the controls?

Android :: Changing content of activity run time


Android :: Changing Content Of .apk Archive At Run Time

Nov 27, 2009

it is allowed to change the content of a file in the .apk archive at runtime? because the signature of the application will change.

View 2 Replies View Related

Motorola Droid :: Keep Phone From Changing Time As You Cross Time Zones?

Jan 14, 2010

Is there a way to keep the phone from changing time as you cross time zones?

View 4 Replies View Related

Android :: Changing The Content Of A ListView

Jun 10, 2010

I have added a menu to ListView Activity and wanted to allow the user to select the information that would be displayed in the ListView. So for example:

The ListView is populated in the onCreate method.
The user selects an option in the menu.
Upon the user making this selection the ListView would be populated with a different array.

Is onResume() executed after the menu is closed? I would test this but I am not currently home.

View 1 Replies View Related

Android :: Changing Tab Content With Intents Dynamically

Jul 21, 2009

I have a tabactivity with several tabs. They are all defined with intents. On one tab, I have an action that needs to bring me to another tab and with a specific data. I worked with Intents and I broadcast them to change the tab. For that I have no problem. But I am facing an issue as soon as I try to reset my tabs for the second time (when the application starts, my method does not fail while called for the second time it hrows an exception). The issue comes only If I call the clearAllTabs() method on TabHost. Here is the exception:..........................

View 2 Replies View Related

Android :: ListActivity Design / Changing Content Of List Adapter

May 31, 2010

I would like to write a rather simple content application which displays a list of textual items (along with a small pic).I have a standard menu in which each menu item represents a different category of textual items (news, sports, leisure etc.).Pressing a menu item will display a list of textual items of this category.Now, having a separate ListActivity for each category seems like an overkill (or does it?)
Naturally, it makes much more sense to use one ListActivity and replace the data of its adapter when each category is loaded.My concern is when "back" is pressed. The adapter is loaded with items of the current category and now I need to display list of the previous category (and enable clicking on list items too)
Since I have only one activity - I thought of backup and load mechanism in onPause() and onResume() functions as well as making some distinction whether these function are invoked as a result of a "new" event (menu item selected) or by a "back" press.This seems very cumbersome for such a trivial usage.Am I missing something here?

View 1 Replies View Related

Android :: Changing Activity - Without Closing The Second And Third Activity?

Jul 20, 2010

I am in my fourth activity and I want to come back to the first activity directly (without closing the second and third activity). How to change to the activity directly?

View 1 Replies View Related

Sony Ericsson Xperia X10 :: Changing Settings For Saved Content

Sep 17, 2010

Can anyone please help me? I have an 8gig micro SD card and none of my contacts, photos, songs or anything will save to it, they save to the phone instead and I don't know how to change it.I would just just the usb but my computer doesn't recognize the phone on my computer either.any help would be much appreciated!

View 13 Replies View Related

Android :: Content Of Activity Doesn't Appear / Why Is So?

Nov 23, 2010

I start a new activity when clicking on a button , but the content(ui components) of the new activity doesn't appear , why ? code...

View 1 Replies View Related

Android :: Changing Application Icon At Run Time?

Jun 9, 2009

Does somebody know if this is possibly in 1.5? From: hackbod <hack...@gmail.com> Date: 19 Okt 2008, 20:06 Subject: How can the app icon be changed at runtime To: Android Developers Sorry, application icons can't be changed dynamically in 1.0. On Oct 18, 8:10 am, omni <dbk...@gmail.com> wrote:

View 6 Replies View Related

Android :: Adding / Changing Resources On Run Time

Aug 19, 2009

i was wondering if there is any way to load resource (such as skins etc.) that include drawables and layout information during runtime. what i mean is that the user can download a file (probably a signed apk - would it work any other way?) and would be able to install it adding to an already existing application thus adding more resources to it.

View 5 Replies View Related

Android :: Dynamically Changing Language At Run Time

Jan 24, 2009

Is there any good example to show how a single compiled application could support both english and say germany.The aapt approach and Resource R.java approach seems to me that, we may need to have one binary for english and one for germany etc and so on. Like in J2ME, could we switch the language at runtime.

View 13 Replies View Related

Android :: Call An Activity From Another One - Content.ActivityNotFoundException

Aug 8, 2010

I am getting this exception while I am trying to call an activity from another one.. .The complete exception is android.content.ActivityNotFoundException:Unable to find explicit activity class {com.x.y/com.x.y.class};

I am doing an intent.setClass("com.x.y","com.x.y.className") where className is the name of my activity class and com.x.y is the package it resides in.

My AndroidManifest.xml has the following content:

View 3 Replies View Related

Android : Switch Activity Of Content Of Tab In Tabhost?

Dec 8, 2009

I have created a TabHost and in 1 of the tab, I have added the content using

mTabHost.addTab(mTabHost.newTabSpec("tab1")
.setIndicator(getString(R.string.dialerIconLabel),
getResources().getDrawable(R.drawable.ic_tab_dialer))
.setContent(intent));

Is it possible for me to switch the content's activity programatically after I called 'addTab of TabHost'?

View 1 Replies View Related

Android :: Edit Text Image Changing Look When Given At Run Time

May 5, 2010

I am having an EditText. If i specify image for the EditText in the layout XML file (android:back ground) it looks different and looks different when i specify it at runtime EditText et = (EditText)find ViewById (R.drawable .et1) ; et.setBackgroundDrawable (Main.themes.getDrawable (EDRAWABLES.EditText Backgro­undImage )); Both codes point to the same image. When i specify the image at runtime , the EditText leaves a margin at the top and bottom of the cursor in the edittext which does not happen when i do it in XML. I have attached the screenshots of both images. Top image is the one drawn from XML and bottom one is given at runtime. I am not getting the difference ? Actually i am facing similar problems with other Widgets too if i change the logic of specifying the drawable at runtime and not at compile time.. Is this the default SDK behaviour? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com /group/ android-developers? hl=enEditTextProblem.JPG

View 2 Replies View Related

Android :: Use Resource Id But Didnt Set Content View In Activity?

Aug 12, 2010

May I know is it possible I use the resource id but I didnt set the Content View in the activity?

For example: abc.xml have one TextView id = "R.id.Text". Can I use the use TextView name = (TextView)findViewById(R.id.Text); method in the activity which was setContentView(R.layout.def);?

View 2 Replies View Related

Android : How Can Query The Contacts Content Provider Outside An Activity

Oct 8, 2010

I'm trying to query the Contacts content provider outside an Activity. But managedQuery is a method of Activity. Is there any other class/method that I can use instead of managedQuery?

Here's my code:........................

View 1 Replies View Related

Android : Content Provider - Activity.startManagingCursor And Simple Dao

Jun 1, 2010

I am writing simple app that will read callLog content provider transform data and write it to my own table. my app will not show data directly from calllog content provider.

1. now one problem that I have is I cannot limit how much rows query will return (by calling activity.managedQuery) but I assume that Cursor delays access to the db and I can use moveToNext as many times as desired to get few rows from table and the call will be efficient. is that good thinking?? OR am I wrong here? I really dont want to query all rows from table. is there any other way to access calllog??

2. I dont want to implement my own content provider for my app. I will use rawQuery many times and group data so contentprovider's callbacks are not enough for me. more I want my dao to be private to my application so I think there is no need to bother with conentprovider. and If I got this right I also dont need to bother with activity.startManagingCursor as long I query data inside same method call (because I need to deactivate all intermediate Cursor objects anyway)

View 5 Replies View Related

Android :: Pause Flash Content In WebView When Activity Isn't Visible?

Aug 7, 2010

I am experimenting with using a WebView to display Flash content inside my activity. Everything is working pretty well, but when the user hits the home key to put the activity into the background, the Flash content keeps running (sound keeps playing, etc)

I have noticed that both the stock Android browser and Dolphin Browser seem to avoid this problem, and properly pause the Flash content when the browsing activity is put into the background.

Ideally I would like a solution that kills the WebView completely if the activity is finishing, but pauses it otherwise (basically copying the default behavior of the browser)

Here is a simple test I put together that loads a game on Kongregate which has some background music:

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

I took a look at the latest source for the stock browser, and it seems to be doing something similar (calling pauseTimers/resumeTimers), although I fear the code I have been looking at is out of date, because it is calling functions that don't seem to exist anymore.

I did verify that the call to pauseTimers is working by testing with a simple JavaScript setInterval which updates a counter. Is there something else obvious that I should be trying in regard to Window or View management?

The documentation for the mobile Flash player says:


Flash Player will also automatically pause SWF playback it is not in view or the foreground application, for example when a call is received or alarm goes off, to reduce CPU utilization, battery usage and memory usage.


This seems to be working perfectly in both the stock browser and Dolphin Browser, but not in my app. Any ideas/solutions would be greatly appreciated!

Update: Here is the function we ended up adding to our activity to get this to work. We call it with "onPause" in the activity's onPause function and "onResume" in the activity's onResume function:

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

View 2 Replies View Related

Android : WebView - Not Able To Go Back To My Activity Screen Once The Content Is Displayed

Apr 9, 2009

Step 1: I am subclassing WebView and rendering html content properly. The intial content is very small with a div and image /link This is displayed in a LInear Layout along with a TextView and ListView. That is my first screen/activity of the application.

Step 2: When I click on a link on this webview, it goes through the webViewclient and expands to full screen to fit the content of the requested page.

After Step 2, I am not able to go back to my activity screen once the content is displayed. When I click on the back button to getback to my activity screen close my activity and goes to the phone's applications desktop. (i.e goes out of my application).

Step 3: In order to fix this issue, I stopped setting my own subclasssed WebViewClient. After doing this, the it seems to render the clicked page in a webView as subactivity. Now When I click on backbutton, it goes back to the activity screen. But, the issue now is, I am not catch event when a link is clicked. How can I catch click events in this case.

View 2 Replies View Related

General :: Changing Time In Nexus 4?

May 14, 2013

Is there a way to change the time in Nexus 4? I dont want to change time zone, but I want to, say, keep the time 10 min faster.

View 1 Replies View Related

Android :: Activity To Show Directory Explorer To Browse Content Of Sdcard

Sep 20, 2010

In android, is there an activity show a directory explorer to browse content of sdcard?Like a File explorer in Java, it can show the content of current directory and I can move up to its parent by clicking '..' and move down to a child directory by clicking the name of the child directory?

View 1 Replies View Related

Android :: Trap In TabHost When AsyncTask Delays Set Content View At Activity Startup

Nov 3, 2009

I've got a tab host activity started from a home screen shortcut. When my application starts it downloads information from a server using an AsyncTask. In the onPostExecute method of the AsyncTask I call setContentView to display the TabHost.When I start the homescreen shortcut by tapping on the shortcut using my finger everything works as expected, I download the information from the server and display the TabHost with the information in the tabs. However starting the application by navigating to the shortcut with the mouse wheel and then clicking on the shortcut with the mouse wheel leads to a trap in the framework code as soon as my application starts. This looks like a simple fix since mCurrentView is null at the time that this method is called - can this issue be addressed? Does anyone know of any workarounds?

View 5 Replies View Related

Android :: Changing Background Color Of An Activity

Jan 31, 2010

When i launch Activity A, the screen goes black, then dark-gray. Then A launches B, and the screen goes black and dark-gray again. Is there a way to set the default background color to black? Activity A has no screen, its just a stub that calls B.

View 4 Replies View Related

Android :: Changing Orientation Resets Activity

Jul 7, 2009

I finally got to the point where I was ready to deploy my app to my G1 and test it out and the first thing I noticed was that when I change my phone to landscape view my main activity restarts and resets all of my variables to their default settings. How can I avoid this?

View 7 Replies View Related

General :: LG Optimus M - Changing Date And Time Settings?

Mar 13, 2011

I need to change the time on my LG Optimus M (Metro PCS) to compensate for the day light saving. however I can't find from where should I do it, I don't see anything else other than the time and date format under Date and time settings. I read about a Client NTP which solves the problem, however your phone needs to be rooted, is it safe to root them and run the Client NTP?Also is there any other ways to change the time?

View 6 Replies View Related

General :: Changing Time Format Of Status Bar Clock

Feb 8, 2012

I don't mean 12/24 hr format. I mean HH:mm:ss format. I want my status bar clock to display something like 23:59:59, I want the "seconds counter" included. How do I do this? Are there any app that can do this or I need to modify some system files (SystemUI.apk perhaps)? My phone is xperia mini pro (rooted).

View 3 Replies View Related

Android :: Simple Example Of Changing Screen Brightness For An Activity?

May 30, 2010

There are apparently at least three different techniques for changing screen brightness in the Android OS. Two of them no longer work post-cupcake and the third accepted technique evidently has a bug. I would like to increase screen brightness at the start of a one-view activity then turn the brightness back to the user setting at the end of the activity. No buttons, no second view or second activity. Just a maxed brightness at start and a return to original brightness setting at the end of the activity. The examples of the current technique using WindowManager.LayoutParams that I have located range from 2 lines of code

WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 100 / 100.0f;
getWindow().setAttributes(lp);

To several pages of source code and numerous activities. Is there a simple example of maxing the screen brightness at start that someone can provide a link to?

View 1 Replies View Related

Android :: Changing Launch Activity Seems To Not Work On Update

Apr 26, 2010

For a new update I am changing the start-up work flow for the application. Part of this is setting the "android.intent.category.LAUNCHER" from one activity to another in my manifest. When I run an update from what is on the market to what I download from my website the application starts in the Activity where it used to start before the update. When I un install the application and install it from the same package I got from my website it starts in the Activity where I have now specified it to start. Shorter version: Update fails to update launching activity, un install- reinstall does update the launching activity. Is this a known issue? Do I really need to add logic to correct for people who update the app instead of installing fresh? Asking people to un install for an update is not a viable option. Is there something I can do to clean out whatever is getting saved that is causing the app to launch with the incorrect Activity? You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To un subscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en.

View 4 Replies View Related

Android :: ListView In Activity Getting Refreshed On Changing Orientation

Apr 7, 2010

I have Activity with ListView inside it and in the onCreate method of the Activity I have code for populating the Data of the ListView this Data is a server based and so populating includes calling Network URLs. I have the ArrayAdapter of the ListView in the Same Activity Class.

Now the Issue I'am facing is that, in Rest all scenarios my Activity is behaving in a proper way but when the Orientation [ Portrait to Landscaped or other way round] is taking place the Data is Getting lost and Newer Data calls are Required to Populate the Same Old Data now this is something that is not intended out the code how should I deal with it.

View 4 Replies View Related







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