tabwidget

Controlling Tab colour-state / size in a TabActivity?

萝らか妹 提交于 2019-11-29 02:31:07
Ok, this is driving me nuts - I've searched all of the references and examples I can find and I still seem to be missing something really obvious. These are the tabs for a 7-day TV Guide (not normally with the red arrow, obviously :) )... What I need to know is what is the object (View or Drawable I assume) that makes up the main body/background of a Tab itself? (as indicated by the red arrow) and how do I access it or have it automatically change its state colour to a list of my choice? Also, how can I get the state colour of the indicator TextView to follow suit? Example: In the capture

How to get rid of horizontal scroll bar in tabhost?

我是研究僧i 提交于 2019-11-28 11:40:24
I want to get rid of horizontal scroll bar in TabHost. It's there even if TabWidget is on top. Below is my xml layout. <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" /> <

Get rid of the line under TabWidget

末鹿安然 提交于 2019-11-28 07:40:06
I've got simple tab activity with next layout: <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> I use buttons as indicators for tabs tabHost.addTab(tabHost.newTabSpec("Tab1") .setIndicator(new Button(this)) .setContent(new Intent(this, TabActivity1.class))); tabHost.addTab(tabHost.newTabSpec("Tab2") .setIndicator(new Button(this)) .setContent

Android: How to Remove Selected Tab Highlight Color & On Press Highlight on TabWidget

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 05:54:44
问题 I am now working with Android TabWidget. I build this TabWidget based on http://mobileorchard.com/android-app-development-tabbed-activities/ I've already add background to the TabWidget, but apparently the highlight of selected tab and pressed tab is always visible and I cant turn it off yet. Here is the picture (sorry cant directly add image because still a newb). : 1. default selected tab : http://postimage.org/image/9ryed6w5b/ 2. on pressed tab : http://postimage.org/image/gwg7m83en/ What

Why do I get a null pointer exception from TabWidget?

主宰稳场 提交于 2019-11-28 04:35:34
问题 I'm writing an android program in which I have an activity that uses tabs. The Activity public class UnitActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = getTabHost(); TabSpec spec; Resources res = getResources(); LayoutInflater.from(this).inflate(R.layout.unit_view, tabHost.getTabContentView(), true); spec = tabHost.newTabSpec("controls"); spec.setIndicator("Control", res.getDrawable(R.drawable.ic

Android: Highlighted tab of TabWidget not readable on HTC Sense

跟風遠走 提交于 2019-11-27 23:06:44
问题 In my Android app I use a TabWidget without any special customization. I'd like Android to take care of the specific appearance, which works fine if you compare Android 1.6 with 2.1 for example. By just using a TabWidget the same code leads to different forms of tabs because the SDK defines how to draw it. Here is how it looks on 2.1 for example: So, the highlighted tab is gray and the font is white and you can read it quite well. But, if you have HTC Sense, it looks like this: The picture

Tab widget have always in capital alphabets in android 4.0

一笑奈何 提交于 2019-11-27 17:54:13
问题 In Android 4.0 i put tab bar with two widget. in code i write in small alphabates(new) but in application it should always display (NEW) How to write small alphabates on tab in android 4.0 回答1: The default theme for tab views in Android 4.0 (the Holo theme) has android:textAllCaps set to true. You can create your own theme and then apply it to the action bar in your manifest to override this behavior. For more information on styling the ActionBar and creating your own styles, see: http:/

How to get rid of horizontal scroll bar in tabhost?

落花浮王杯 提交于 2019-11-27 06:23:49
问题 I want to get rid of horizontal scroll bar in TabHost. It's there even if TabWidget is on top. Below is my xml layout. <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"/> <TabWidget android:id="@android:id/tabs"

Get rid of the line under TabWidget

对着背影说爱祢 提交于 2019-11-27 01:55:28
问题 I've got simple tab activity with next layout: <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> I use buttons as indicators for tabs tabHost.addTab(tabHost.newTabSpec("Tab1") .setIndicator(new Button(this)) .setContent(new Intent(this,

android:orientation=“vertical” does not work for TabWidget

半世苍凉 提交于 2019-11-27 01:55:28
问题 My app has a tabhost with four tabs, and now I'm trying to make nice layouts for landscape mode. In order to make use of additional horizontal space I want to put TabWidget at the right side of the screen, and of cource all tabs must be one under another (like in a column). But when switching to landscape mode all tabs get aligned in a row, it looks quite ugly. How to fix that? <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android