Android :: Content In Tab - Change It With Out Losing Parent Tabs

Nov 20, 2010

I have been asked to create an app to buy sell and advertise a product. I have chosen dvd's to keep it simple. Using the tutorials on the android developer site I have created 3 tabs one for PG films one for 15 and one for 18. Now in these tabs I want to have a button that then changes the content of the tab but keeps the tabs.

I have tried so many things and the only thing I have been able to do is start a new activity but that gets rid of the tabs :( and I have tried many other things been up all night trying to work this out. If someone could just point me in the right direction to how to go about this would be great. Is it even possible?

Android :: content in tab - change it with out losing parent tabs


KitKat 4.4 :: Change Between Tabs By Swiping Left To Right To Change Tabs

Jan 10, 2014

i have a problem with this new kitkat os. Before kitkat i could change between tabs by swiping left to right ir right to left to change tabs.Now it doesn't change.

View 1 Replies View Related

Android :: How To Set New Content In Existing Tabs Upon Menu Button?

May 20, 2010

I recently started Android programming and was working on my first program which displays a historic text document, sectioned by tabs via TabHost.I have limited my program to one activity and merely used setContent in my TabSpec's to switch between different XML views.The document has both unedited and corrected versions of the text for which I have built text views to accommodate. I wanted to implement the standard menu to have buttons to "view corrected" and "view original" and switch the content of the tabs which have changes (without altering the tabs or their indicators).I've read on the TabHost API and there is no way to edit existing tab content with setContent() of TabSpec; and AFAIK TabWidget only affects the actual tabs, not the content that is displayed upon pressing them.I've thought about creating a new class which extended TabHost and super() all of the original methods, while including one more which updated the mTabSpec list.

View 1 Replies View Related

Android :: How To Change TextView TextColor When Parent Is Focused

Oct 17, 2009

I have a TextView inside a LinearLayout. The LinearLayout is able to receive focus, and I want the textColor of the TextView to change when it does. I thought using a ColorStateList would work, but it would seem that the TextView does not receive focus when the LinearLayout does. I know that, because I have tried this code...

And nothing gets logged. I don't want to use an OnFocusChangeListener on the LinearLayout to change the textColor of the TextView, I think this has to be done from XML. The reason for that is because in another activity I have an ExpandableListView with a custom adapter and custom views and Android changes the textColors of the TextViews (from light to dark) inside my custom views when items are focused.

View 2 Replies View Related

Android :: Can I Change Droid Style's Parent In Code

Nov 7, 2010

At the moment my base style inherits from android:style/Theme.Light.NoTitleBar. Is there any way I can change it to inherit from Theme.Black.NoTitleBar in code? I notice apps like Handcent has a settings option to do this, but I can't quite figure out how to do this.

View 1 Replies View Related

Android :: How Can We Change View Within Tabs?

Dec 10, 2009

I want to provide a clickthrough on the list in a tab which opens another view. I need to open the new view within the same tab. I then need to provide a back button on the changed layout to change the view to original view.I have tried this. I am trying to access the tabSpec from main activity class [MainTabView] and set the intent as follows. Java: MainTabView.tabSpec1.setContent(new Intent(this, AView.class)); MainTabView.mTabHost.setCurrentTab(0); MainTabView.mTabHost.invalidate(); But this does not change the view immediately but changes it when I go to another tab and come to the starting tab. How can I make it to refresh it as soon as the content has been changed to another intent?

View 2 Replies View Related

Android :: How Can We Change View In Tabs?

Dec 11, 2009

I want to provide a clickthrough on the list in a tab which opens another view.I need to open the new view within the same tab. I then need to provide a back button on the changed layout to change the view to original view.But this does not change the view immediately but changes it when I go to another tab and come to the starting tab. How can I make it to refresh it as soon as the content has been changed to another intent?

View 3 Replies View Related

Android :: Change Activity In Tabs On Button Click?

Nov 20, 2010

I am creating an android application in which uses tabs. There are three tabs which runs different activities. Activity which runs tab 1, has a button. I want to change content of Tab 1 by clicking on that button. But If I call another activity it doesn't start in tab1 but replaces tab.

View 5 Replies View Related

Android :: Way To Change Color Of Tabs Indicator Text In Phone?

May 10, 2010

How to change the color of the text indicator of tab? i can change the icon using selector tag refereed the example. but cant to the text color. how?

View 2 Replies View Related

Android :: Scrollable Tabs - Dolphin Browser When Using Multiple Tabs

Jun 19, 2010

I'm currently working on my first android application. I am using a tabbed layout for my application. I followed the tutorial for this on the dev guide and ran into a problem. The tutorial only used three tabs, but I have a need for more. As such, the tabs resize and bunch up. I was hoping someone could tell me how I can make them scroll, like in dolphin browser when using multiple tabs.

View 1 Replies View Related

HTC Desire : Hw To Change Phone Color Tabs?

Jul 12, 2010

I'm using the agenda widget on my desire. On the example when choosing widgets it shows different color tabs on the entries. When I enter events I cannot see a way of changing the color from the standard sky blue I always get. Changing the color tab for business and personal etc etc would be very useful.

View 9 Replies View Related

Android :: TABS In 2.0 Vs 1.5 - Rounded Corners TABS

Feb 27, 2010

I simply use the tabwidget :

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

Why are my tabs so uggly in 2.0 (no more rounded corners as in 1.5/1.6) ?

ugly tabs here

=>

This was better

What should I do now to show "rounded corners" TABS to Nexus One (for exemple) users ;-) ?

Is it because of the following manifest lines :

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

I have to keep android:anyDensity="true" otherwise I've got a problem with re-sizing of the menus described here

As a separate question, my users can change the Locale within my app itself, I then "redraw" the menus using onPrepareOptionsMenu (Menu menu) to refresh the strings within the menu with the new language choosen by the user. Is there an equivalent for TABS (I have local strings within the Title of the TABS) or do I have to delete all the tabs and re-create them from scratch ?

View 2 Replies View Related

Android :: Tabs - MapView - Activities Within Tabs

Oct 19, 2009

We're in the process of writing an app that has 4 tabs: Map, People, Places, Events. The People, Places, and Events in the App show up as Icons on the map. By default the People, Places, and Events tabs each show a listview, custom rendered, displaying all the People, Places, and Events respectively.

Now, right now each of the tabs has as its content an Intent set to launch the corresponding activity. For instance, there is a MapTabActivity that extends MapActivity, a ShowPeopleListActivity that shows the people, and so on and so forth.

I see a lot of StackOverflow questions/answers saying that due to various limitations in the way the TabHost is setup, it's best NOT to use activities as the content of tabs. For instance, it's impossible to launch a new activity and have it take the place of the existing activity within a tab, whereas it's possible to switch out a View with a different view.

Now, I'm at a crossroads. We've (for better or worse) devoted a fair amount of time trying to get this app to work the way it's currently structured, with the Activities as the content of the tabs. When an icon corresponding to a Person, Place, or Event is clicked, it fires off a VIEW Intent on a URI corresponding to that object; this is picked up by an Activity that then shows the object. The same mechanism is at work both in the Map and in the individual lists. We really like the loose coupling this provides us; we just give a VIEW command and the URI to the person/place/event and it automatically brings us to the right activity. Granted, the activity that's launched covers up the tab view rather than appearing inside of that, but we were willing to live with this.

Here's an issue though: from the Show activity, we want to be able to go back to the map, centered at that person, place, or event. We can launch a new activity to show the map again, but now we have the map activity as the content of the tab, plus the show activity, plus the new map activity in the activity stack; given how resource intensive the map activity is, I'm guessing this is not the ideal way to go.

I guess my question is, is there a GOOD tutorial somewhere showing exactly how to do complex tasks with a TabHost? I've seen HelloTabWidget; I'm looking for something much more sophisticated than this. I'm worried that if we switch to the View based way of doing things, we'll have to do a LOT of housekeeping to intercept all the back events, try to switch out the views, etc., etc., as well as strongly coupling our program in a way we don't want.

View 5 Replies View Related

Android :: Tabs Layout - Tab Activity With 4 Tabs

Nov 11, 2010

I have an Tab Activity with 4 tabs. Each of tab is showing me the list view. Suppose i m on 4th tab and dragged the list view to the last position and after that i click on 3rd tab and again when i go to 4th tab it is not refreshing and showing me the last visible screen. Actually i want to show the list view again from 1st element. is tabs refresh automatically or we need to do it programmatic?

View 1 Replies View Related

Android :: Change DB Location For Content

Nov 24, 2010

I want to change setting in native application (i.e. SMS) by pointing it to different content location.

Ex - At given fraction of time, native application is pointing to list of SMS (com.android.providers.telephony.databases.mmssms.db).

I want to point to different location, that might be com.android.providers.telephony.databases.mmssms1.db

View 1 Replies View Related

Android :: Change Message Content Before Save

Jun 29, 2010

I need to change Text( SMS) message content before save in in-box. Is it possible to change text message content in BroadcastReceiver?

View 2 Replies View Related

Android :: Change Content Of Tab On Button Click

Aug 20, 2010

I have been reading a lot of comments on how it is more lightweight to use views instead of intents in setContent when using tabs.

Since I will be creating an app with tabs, I am trying to implement this instead of having intents inside setContent. However, I am having a difficult time looking for examples or straightforward tutorials on swapping the current view with another one.

Say I have TAB_A, with some entry fields and a button. When the user clicks on the button, a TextView will display "Hello, user!" in the same TAB_A. Of course this is an oversimplified example, but it will surely point me in the right direction.

EDIT: I have a tab called TAB_A with a button in it. If the user clicks on that button, TAB_A will now display "Hello, user!" instead of the button.

Here is a sample of my TabSpec.

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

Where ShowButton and ShowHello are classes both extending LinearLayout. Both are initialized in onCreate like this:

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

When the app first starts, the user sees the view showButton. When the user clicks on the button, I want the tab to change its contents to showHello.

The question then is: Is there any way to update the contents of the tabspec without using startActivity?

View 2 Replies View Related

Android :: Live Folders Register For Change In Content

Apr 22, 2009

If I create a content provider to service a live folder, and if this content provider is just a wrapper aggregating other content providers, how does the live folder know if the real content has changed somewhere down the line.

For example, I have a live folder that has items pointing to video, audio, and notes. Each item in the cursor (such as an aggregated matrix cursor) may be pointing to a different underlying content provider. But each item will have its own uri.

Does the live folder view register for content changes for each uri? Or is it the responsibility of the wrapper content provider to register for content changes and then notify its client the live folder?

View 6 Replies View Related

Android :: Getting Change Details From Content Provider Notifications

Jun 10, 2009

Using ContentResolver and ContentObserver, it is possible to receive notifications in the function onChange() when some data is changed within the content provider. However, I fail to see if there is a way to see the URI which triggered the notification.

For instance, if I want to play a sound when someone deletes "Kara Trace" from my address book or whatever - how do I do that, if not by having another copy of the whole content provider dataset, and then comparing the old dataset copy with a new one? Can someone confirm me that the hard way is the only way?

View 7 Replies View Related

Android :: Refresh ListView If Change Content Of ListItem

Mar 16, 2010

I have a ListView in my android activity. And I populate the ListView by sub-class the BaseAdaptor (which returns a View in getView() method).

What if in my click listener of a button in a list item view, I change the text of the TextView in the List item view or change the dimension of the list item view by adding/removing children of the list item view

What is an efficient to refresh my listView? I don't want the listView to re-trigger a query since there is no data change.

View 2 Replies View Related

Android :: Change Display Content When Wipe On Screen

Sep 30, 2010

I want to change the lower half of the screen when the user wipes with the finger, but got no idea how to start. The upper half with sone TextViews should stay fixed. Do I need more then one activity, or can I just change the layout portion on the lower half?

View 1 Replies View Related

Android :: Change Default Share Settings For Content

Aug 30, 2010

I've had my Droid X for a couple of weeks now and am still acquainting myself with things.

I downloaded Instant Upload (a nice, simple FTP app) that allows me to upload individual files from my "Files" browser directly to a web server... but I'm curious to know if I can add this as an option in my "Share via..." menu?

The "Share" menu has a bunch of options I will likely never use, but I do use some of them, and additionally I would like to add certain apps such as Instant Upload to the mix. Is it possible to manually modify this list?

View 1 Replies View Related

Android :: Layout Should Stay At Specific Position After Content Change

Sep 14, 2010

I have a layout which contains a TextView.

The content of the TextView might change on runtime. (discussed on a different issue here: http://stackoverflow.com/questions/3683727/layout-with-dynamic-position )

I can position the layout by drag&drop. If the size of the layout doesn't change, the position stays, but as soon as the size of the layout changes (because more text inside the TextView) the position is reseted.
I use the layout(left, top, right, bottom) to position the layout.

Now I don't know where I should add my layout() call to make sure it stays at the right position...

Here is my class

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

View 1 Replies View Related

Android :: Using Selector To Change ImageButton's Background While Keeping Content Image

Apr 18, 2010

I am currently trying to customize ImageButton to show different draweables as background of the Button while keeping the image set via the src attribute.

That's my custom_button.xml:

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

View 2 Replies View Related

Change Content Management System

Nov 20, 2012

I've recently started programming my first android app in eclipse using java and xml and I'm relatively new to both languages.

My App will contain mostly static information for students in university which I plan to simply save as text in the xml itself but the clients wish to have a few pages on the app with content that they will be able to change regularly without having to look at or understand any code.

Basically what I'm looking to do is have a basic content management system that can only be accessed by the client and they can use it easily enough to change the content of those specific pages.

View 7 Replies View Related

Android :: Change APP Content In Android But Not Need To Update Your Soft Version

Nov 12, 2010

I'm new for android.I want to make an APP change my content everyday, but I don't think my user will like to update my APP everyday.

View 1 Replies View Related

Android :: Switching Content Providers For Same Content URI

Aug 12, 2009

This may seem like a stupid question but I need to be sure. I was wondering if it was possible to pro-grammatically change the Content Provider used when making a query given a Content URI. The reason being I need to know if it's possible to force the Calendar/Contacts applications to read from a different database via a different Content Provider temporarily while my application is running, so that I can reuse those applications to display my own data. Since the Content URI s are hard coded in each of these applications the only way it might be possible is if we could somehow temporarily change the Content Provider used for a given URI. I know this probably isn't possible, I just need to show it isn't. Could someone confirm this can't be done?

View 2 Replies View Related

Android : Content Provider - No Link Between Content Provider And Its CONTENT_URI Declared In Another Class

Mar 1, 2010

I am having a hard time understanding content providers. In the notepad example and others, the content provider never even declares its CONTENT_URI anywhere inside itself, yet the docs say to publicly declare this. It's declared in a different class. So when an activity queries a content provider with a CONTENT_URI, how does Android know which one I want. I see no link between a content provider and its CONTENT_URI declared in another class.

I also don't how to think about intents and content providers. I know that you don't call an intent on a content provider. But an activity queries a content provider without an intent, and an activity has a mimetype attribute in the manifest that would seem to tie it to a content provider.

View 2 Replies View Related

Android :: Custom Content Provider Like Contact Content Provider?

Mar 11, 2010

how can i create a custom content provider like contact content provider? i know how to create custom content providers but i want to integarte to device such a way that it canbe accessed by all application installed in that device.

View 3 Replies View Related

Android :: SurfaceView Transparent Through Its Parent

Feb 11, 2009

I have a SurfaceView that is covering a portion of its parent, a RelativeLayout. I have a background image covering the full RelativeLayout area, and this is my Activity's main layout.

I would like to have the SurfaceView be transparent so that I can see through to the background image on its parent RelativeLayout. I have tried the approach shown in the API Demos example TranslucentGLSurfaceViewActivity, but this succeeds in making the transparency go all the way through my Activity to my desktop!

I'm using the "style/Theme.Translucent" theme on my activity, and setting this on my SurfaceView: mySurfaceView.getHolder().setFormat(PixelFormat.RGBA_8888);

The transparency to the desktop it kinda cool, but not what I'm trying to do! Is it possible to make a SurfaceView transparent only through to its parent?

View 2 Replies View Related







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