Android :: TabHost Slow On Orientation Changes

Nov 24, 2009

I currently have a TabHost with 3 tabs.The content of each tab is an activity. The first and second tab make HTTP connections.The first tab still uses the UI thread (which i'm changing) so it would explain the slow orientation change since it's creating a fresh activity and making all those connections again. What I don't understand is why if I am on say Tab 3 which makes no connections at all does changing the orientation take such a long time (up to 5 seconds).In playing around with the TabWidget I noticed something that may be related.

Android :: TabHost Slow On Orientation Changes


Android :: Switching To Landscape Orientation Is Slow

Sep 4, 2010

This is getting called in on Create(), how can I speed up orientation switching? private void setupChartView(int position){
Quote my Quote = quotes Adapter.get Item(position);
this.symbol = my Quote.get Symbol();
String url = "http://chart.finance.yahoo.com/z?s=" + symbol + "&t=1d&q=l&l=on&z=l&p=s&a=v&p=s&Lang=en-US®ion=US";
if(chartImageView != null)
imageDownloader.download(url, chartImageView);
if(chartImageViewLandscape != null)
imageDownloader.download(url, chartImageViewLandscape);}

View 1 Replies View Related

HTC Droid Eris :: Orientation Is Very Slow

Apr 3, 2010

the orientation feature on my Droid Eris is painfully slow going back and forth from landscape to portrait. Sometimes I have to gently knock on my desk for it to respond and that does not work all the time. Is there anything that I can do to rectify this?

View 11 Replies View Related

Android :: Orientation Change - Dialog Above Activity With Fixed Orientation

May 14, 2009

I have created an activity for my game which handles all orientation changes by itself and has a fixed "portrait" layout. Actually it uses the accelerometer and is rendered using 2D canvas methods. If the level has been completed I show up a highscore dialog in which the user can enter his name. The dialog is floating above the underlying level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of the phone changes. So even if the keyboard is exposed the dialog is shown in portrait mode instead of landscape. I have tried to use an activity with dialog theme instead but the behavior didn't change. After several tries it seems that I have found the reason for this: Once there's an activity with fixed orientation in the activity stack then all subsequent activities keep this orientation, too. They will not react on orientation changes anymore (e.g. if the keyboard gets exposed).

After upgrading to 1.5 SDK the described behavior changed a little bit. Now at subactivities indead react on orientation changes like expected. However, the need to have an opaque background! That means that neither dialogs nor activities with dialog theme will work. Those will stick with the orientation of the underlaying activity. So my workaround is to first start a sub-activity with an opaque black background. This activity then shows my highscore dialog on top. It looks quite okay but I wonder if there's a better solution? Is it possible to show a dialog above a fixed portrait or landscape activity which automatically adapts to orientation changes?

View 3 Replies View Related

Android :: Can Force A Specific Layout Orientation - But Have An Opposite Keyboard Orientation Android

Aug 19, 2010

I understand how to force a specific orientation per activity in the android manifest. I would like to know if it is possible to allow the keyboard to change orientation even though the activity(the layout really) must remain unchanged.

View 1 Replies View Related

Android :: Using Orientation Sensor To Get 360° Orientation

Jul 17, 2009

I have a problem with working with the ORIENTATION values of the SensorManager. I would like to have some kind of 360°-value which directly shows me if the phone is in normal portrait (0°), landscape, portrait turned around (180°) or anything in between. So I could have, for example, an arrow that points to the floor (like gravity would do with a plummet) all the time, no matter how I tilt (sidewards) the phone. I thought this would be easy, but I'm pretty confused at the moment.

First of all, the X value of the orientation-array seems to correspondent with how I turn the phone, BUT: if it's completely uprightly standing, this value is about 60° ... why not 0° (or 90°, 180°, 270°), as I would expect?

Second: The value resets if I turn the phone and Android automatically changes screen orientation. So both in Portrait and in Landscape mode it will be sth. like 60° when the phone is in a 0° angel in real world. I set "android:screenOrientation" to "landscape" but this doesn't help anything :/

I want the app NOT to change orientation when I turn the phone, but I want it to get a continuous orientation value when I tilt the phone.

View 4 Replies View Related

Android :: TabHost And Scrollbars

Mar 27, 2009

My app uses a TabHost containing one tab with a ListView and another tab with a simple form. When the keyboard is slid out in order to write into the form fields, I don't get automagic scroll bars added to the LinearLayout around my form elements.

The resource xml follows.

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

View 3 Replies View Related

Android :: TabHost Activities Within Each Tab

Jun 23, 2010

I'm trying to create multiple tabs, each with a different Activity. The only downside is i'm using a custom layout file thus my class extends an Activity rather than a TabActivity. While trying to run, it fails and suggests calling TabHost.Setup(ActivityGroupManager agm)

View 3 Replies View Related

Android :: Remove Tab From TabHost?

Jul 21, 2010

In a TabHost widget, I can create a new tab with its content (Intent) using TabHost.addTab(TabHost.TabSpec tabSpec).

We can remove all tabs we created by calling clearAllTabs(), but I can't figure out how to remove the tab or just replace the content (Intent) inside the tab with new Intent.

so what I need something like removeTab(int index)

View 1 Replies View Related

Android :: How To Change My TabHost

Jun 13, 2010

I have a tabhost...

in this tabhost is a Intent,and in the activity must change to other activity,
question is I hope the other activity at same tabhost switch?
Can do this?

View 1 Replies View Related

Android : Way To Set Size Of Tab In TabHost?

May 28, 2009

Because of i add image on the tab,the tab looks small,and the string of the tab is on the image now. So,i want to make the tab looks larger,and the string of the tab could under the image. what should i do?

View 4 Replies View Related

Android : Put Mapview In Tabhost?

Jul 24, 2010

I recently want to put mapview in tabhost but now is the question i can't figure out how to do this right!

here's my source code...

View 2 Replies View Related

Android :: Navigation Between Tabs In TabHost

Jul 6, 2010

Is there a possibility to navigate between Activities tabs in TabHost using back button? When I press it, I go out of the main Activity to the previous one.

View 2 Replies View Related

Android :: How To Clear Old Tabs And Add New Tab On Tabhost?

Aug 9, 2010

I have to create tab bar in my application in which i have to navigate between activities under single tag. So that i tried many ways one of which is to clear all tabs from tabhost and create new tabs and add on tabhost but it gives me unexpectedly close error.

View 2 Replies View Related

Android :: How To Embed Listview In Tabhost?

Jul 29, 2009

I'm trying to figure out how to emebed a listview in a tabhost Whenever I call it dies a rather unglamorouis death.I suspect I'm missing something rather obvious as I'm just getting started with this, but I couldn't find other examples of people having listviews inside tabcontrols besides the one which suggested as above. Any suggestions?

View 4 Replies View Related

Android :: Icon Packs For Tabhost

Oct 19, 2010

Anyone knows of any icon packs for android tabhost? Let's say I'm not good at drawing..

View 8 Replies View Related

Android :: How To Integrate 3rd Party App To Tabhost?

Aug 9, 2010

I using android 2.2 and I want to integrate a third party application into the tabulator. Is that possible and how can I do that? The third party app that I use called chartdroid. This is an intent based app and if I post the intent through my host I get an securityexception. ERROR/AndroidRuntime(4442): Caused by: java.lang.SecurityException: Requesting code from com.googlecode.chartdroid (with uid 10033) to be run in process com.chartDroid (with uid 10032)

View 2 Replies View Related

Android :: Tabhost Disappearing Randomly

Jul 16, 2009

I have an application that has two tabs: -First tab contains contacts -Second tab contains chats

Some times when I select the second tab it dissapears and a black background is shown. This issue does't happen when the first tab is shown You can find a picture of the issue here: http://1.bp.blogspot.com/_2UoVsSnv2Gk/Sl8u2o-tvzI/AAAAAAAAAJc/RMUMfKU...

This issue happens randomly and i can't reproduce it consistenly.

View 2 Replies View Related

Android :: Creation Of Activities From Tabhost

May 14, 2010

I have a TabActivity. Within this activity (in the onCreate method) I create a TabHost and a TabSpec and do a tabSpectSearch.setContent(intenSearch); The Indent is created using intentSearch = new Intent().setClass(this, MyActivity.class);

As far as I already found out the class MyActivity is instantiated when I select the tab, to which it is connected. Is there a way from my TabActivity to force the creation of all activities (all tabs) at once?

View 4 Replies View Related

Android : How To Get Rid Of Horizontal Scroll Bar In Tabhost?

Jul 14, 2010

I want to get rid of horizontal scroll bar in TabHost. It's there even if TabWidget is on top.

View 1 Replies View Related

Android : TabHost And StartActivity For Result?

Sep 2, 2009

I meet an issue: my activity cannot return result.

I created an activity which has one TabHost. I added three tabs using mTabHost.addTab. Every tab will launch an activity(activity A, activity B, activity C). In activity A, it will call startActivityForResult to start activity A1. The issue is activity A cannot get any result after A1 finish.

What is the reason? How should I do if I want to get return value?

View 3 Replies View Related

Android : Restart An Activity Within A Tabhost?

Jan 13, 2010

I've searched and I know it seems some people frown upon using activities within tabs, but moving past that...how would I restart a tabbed activity while still keeping the tabs visible? I have an activity in a tab, I use the menu to create a new activity to update the tab's activity displayed info, when I return from the menu activity I want the new information to be displayed in the tab's activity. I am using startActivityForResult() from the menu choice, but when I return and try to restart the activity...it wipes out the tabs above(I guess as expected, but I want to re-launch the refreshed activity within the tab).

Creating the tabs:

TabHost host = getTabHost();
Intent home_intent = new Intent(constants.HOME_ACTION,
null, this, homeTab.class);
Intent inbox_intent = new Intent(constants.INBOX_ACTION,
null, this, inboxTab.class);
Intent stats_intent = new Intent(constants.STATS_ACTION, null,
this, infoTab.class);

host.addTab(host.newTabSpec(constants.HOME_TAG)
.setIndicator(getText(R.string.home_label),
getResources().getDrawable(R.drawable.icon))
.setContent(home_intent));
host.addTab(host.newTabSpec(constants.INBOX_TAG)
.setIndicator(getText(R.string.inbox_label),
getResources().getDrawable(R.drawable.icon))
.setContent(inbox_intent));
host.addTab(host.newTabSpec(constants.STATS_TAG)
.setIndicator(getText(R.string.stats_label),
getResources().getDrawable(R.drawable.icon)).setContent(
stats_intent));

Return from the menu activity in the tab's activity(updating database info): code...

View 2 Replies View Related

Android : Use Tabhost By Extending MapActivity

Sep 19, 2010

I get a result as http://i3.6.cn/cvbnm/e1/71/e9/19008bd7258eaf858be73dc6431b1f8b.jpg,
i want to get two tab,could you help me? Code...

View 2 Replies View Related

Android :: TabHost Accessing Specific Tabs

Oct 27, 2010

I have a tabHost with tree tabs. How can I access a specific tab from the tabHost activity when this tab is not active at the moment.And a second question to this topic.How can I access the activity of a tab from another tab?I need this, because I have to update the second tab when something changes on the first tab.

View 1 Replies View Related

Android :: Tabhost Working In Activity Class

Nov 17, 2010

I must be overlooking something because I am unable to get my TabHost to display in my Activity class.I am getting the dreaded force close when I try to run the app.It will work if I extend TabActivity, but I can't do that [details at the bottom] because once I move the code from my prototype project its going to be in a custom class that inherits from Activity.

View 2 Replies View Related

Android :: Want To Change TabHost Font Size

Sep 10, 2009

I'm creating Tabs for my application and I wonder how do I change the font size in the Tab Host (Tab Menu) in the following code, that is the font size of Menu1, Menu2, Menu3, Menu4: TabHost host=getTabHost(); Code...

View 4 Replies View Related

Android :: Impossible To Load Animationdrawable With Tabhost / Way To Do

Dec 9, 2009

Yesterday I post this : http://groups.google.fr/group/android-developers/browse_thread/thread...

but today this problem is not resolved and I think that the problem is an issue between TanHost component and Animationdrawable.

I tried a lot of thing, but the start() method makes nothing. The first drawable is displayed and that's all.

I would like to know if somebody can do a test to confirm it, I'll post a bug just after.

View 3 Replies View Related

Android : Way To Change TabHost Text Color?

Sep 26, 2010

How could I change a text color in my tabs?

View 2 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 :: TabHost Listview Dissapearing After Going To SMS Screen And Back

Jul 6, 2009

I have TabHost with custom ListView implemented. My ListView disappears after returning from SMS screen when I try to switch tab (refresh list content).

I have context menu option to send SMS to contact from the list, I start SMS activity there and Im able to return to my app. If I don't type anything in SMS screen, just return immediately everything is fine. List will work. If I type something in SMS and press back key, toast will be displayed: "Your message is saved in Drafts". And now if try to switch tabs, list content disappears.

Debugging revealed that list items are present, and that list adapter constructor is called. However, listAdapters GetView function is never called. And list results are not displayed.

I found similar problem in this post: http://groups.google.com/group/android-developers/browse_thread/threa...

Im working on sdk 1.5 and device.

Here is my list adapter function, pretty standard:

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

my ListView widget has no special properties, just width and height to fit parent.

View 5 Replies View Related







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