问题标签 [android-tabstrip]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1020 浏览

android - How to apply padding for Tabs in android

I'm using this library for pagerSlidingTabStrip Component. I have TabStrip which occupies full screen in Portrait Orientation. But In Landscape it doesn't occupy full screen. I'm using app1:paddingLeftRight attribute in tabstrip tag in xml, but it is not working for me. I want to setPadding programmatically for each and every device both in landscape and portrait mode. So I will place the Tabs items equally.

Any Help greatly appreciated...........

Thanks in advance

0 投票
1 回答
1012 浏览

android - 在 ViewPager 中更新屏幕外片段

我有一个包含三个片段的应用程序:Records、Chart 和 PieChart。这些片段存储在单个活动中的 ViewPager 中,用户可以在它们之间滑动。Records 片段有一个表,用户可以在其中输入数据。当用户输入数据时,其他两个片段需要更新,因为它们引用了这些数据。最初,我希望片段在被滑动到时更新,但由于它们是可滑动的,我不能使用 onPause() 和 onResume() 因为 onPause() (因此 onResume())只有在选项卡被调用时才会被调用2+ 屏幕之外。所以我决定让 Records 片段向 Activity 发送一个回调,告诉其他片段在 Records 片段更新时更新自己。我将所有片段保存在内存中,并且在应用程序进入后台之前它工作正常。当应用程序退出后台时,如果用户向表中输入数据,应用程序会崩溃,因为其他片段中的所有变量都为空。为什么会这样?我没有在我的应用程序的任何地方使用 saveinstancestate。我可以做?

0 投票
1 回答
2961 浏览

android-layout - 具有透明模糊背景的 Android 选项卡

我想显示透明的模糊选项卡,以便它后面的 listactivity 屏幕显示模糊图像在此处输入图像描述

和没有分隔线的标签。

0 投票
3 回答
24250 浏览

android - 带有图标的 Android SlidingTabLayout

我在我的视图中使用谷歌的 SlidingTabLayout,但我想向选项卡添加图标。我正在使用这个http://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/SlidingTabLayout.html 有人可以帮忙吗?

这是我的xml:

0 投票
2 回答
1092 浏览

java - 如何在android中删除tabStrip?

我想删除标签色条。我试过setStripEnabled(false);了,但没有奏效。android:tabStripEnabled="false"也在xml代码中尝试过。标签条仍然出现在标签栏上。有人可以告诉我如何删除标签栏中出现的蓝色条带。

XML 代码 -

0 投票
1 回答
154 浏览

android - AndroidSlidingUpPanel 与 PagerSlidingTabStrip

当我尝试通过AndroidSlidingUpPanel在主要内容中使用PagerTitleStrip时,PagerTitleStrip 没有出现。我的结构是:

  • 向上滑动面板布局
    • 线性布局
      • PagerTitleStrip
      • 浏览器
    • 线性布局
      • 上滑布局
0 投票
3 回答
1879 浏览

android - Change the color of the selected TabItem footer

I cannot change the color of the bottom of the selected tab (TabItem) on the TabControl. I need to change from light blue to dark blue as at the top.

I'm using Firemonkey for Android and Delphi XE6.

enter image description here

0 投票
1 回答
3124 浏览

android-fragments - Viewpager in Android with fixed tabs at bottom with Icon and Text in each tab

I want to create the following layout - an activity with a viewpager along with a tab that stays that the bottom of the activity to indicate which of the 4 fragments the user is in (and the selected tab gets highlighted by an 'active colour')

enter image description here

I've spent some time looking at various resources online to add this tab.

http://developer.android.com/training/implementing-navigation/lateral.html#tabs - this looked like it would work well until I found out that actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); is deprecated

I looked here however, it is the same solution (i.e. deprecated)

I looked here however, the PagerTitleStrip shows one tab (and partly the adjacent tabs) while I want to see all the tabs (there are no partially hidden tabs as in the picture)

Is there a tutorial that explains how to achieve this? It is one of the most basic UI elements, so I am hoping I am not finding the best solution

0 投票
0 回答
558 浏览

android - PagerSlidingTabStrip - 在 vi​​ewpager 中替换片段

范围

我正在使用 [PagerSlidingTabStrip][1],我有两个选项卡(A 和 B),每个选项卡中都有一个 ListFragment,其中包含 6 个列表项(1-6),单击它们时,将转换到另一个片段(C)。

范围样本 详细视图示例

问题

在搜索 StackOverflow/Google 并尝试各种方法 4 天后,我始终得到一两个结果(不包括各种错误)。

1.) 在 Fragment 中使用 TextView,TextView 字符串将填充在 ActionBar(测试)和 Tab A 之间。

2.)我会点击一个列表项,它会用一个空白的白色片段替换 ListFragment(比如 C)。

资源

主要活动

A/B 类

任何帮助将不胜感激,因为我已经坚持了将近一个星期,这令人抓狂!

0 投票
0 回答
527 浏览

android - 文本视图未在选项卡布局中完美地在 android 中居中对齐

我正在为我的应用程序使用选项卡布局,但是当我尝试使用它时,我想确保我为选项卡布局设置的文本应该居中对齐,我尝试了不同的教程,在这些教程中我已经成功但有一些问题。每当我单击选项卡时,选项卡的文本都会略微向上移动,这也会使我的屏幕受到干扰,当我第一次单击该屏幕时,选项卡下方会出现灰线。我用过android:tabStripEnabled="false"但是没用

这是我的xml

这是我的代码