Actionbarsherlock与Viewpagerindicator [英] Actionbarsherlock with Viewpagerindicator

查看:139
本文介绍了Actionbarsherlock与Viewpagerindicator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Viewpagerindicator的应用程序。我使用它的标签部分。我用一个黑色的背景和默认的蓝色指示灯的颜色。我想一个动作条添加到我的应用程序,所以我开始使用Actionbarsherlock。为了让我的标签显示一个操作栏,以显示我创造了我自己的他们被称为在我的清单文件。我创建的主题是这样的:

 < XML版本=1.0编码=UTF-8&GT?;

<资源的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android>
<! - 这是我们的主要ActionBarSherlock主题 - >
<样式名称=Theme.Styled父=Theme.Sherlock.Light.DarkActionBar>
< /风格>

<样式名称=Theme.VPI父=Theme.Styled>
      <项目名称=vpiTitlePageIndicatorStyle> @风格/ Widget.TitlePageIndicator< /项目>
      <项目名称=vpiTabPageIndicatorStyle> @风格/ Widget.TabPageIndicator< /项目>
      <项目名称=vpiTabTextStyle> @风格/ Widget.TabPageIndicator.Text< /项目>

< /风格>

< /资源>
 

当我运行的应用程序,让我的蓝色指示灯的颜色,但在整个应用程序的背景是白色的。

本来我是如何code里面的:

 <样式名称=Theme.VPI父=Theme.Styled>
   <项目名称=vpiTabPageIndicatorStyle> @风格/ CustomTabPageIndicator< /项目>
< /风格>
 

这是一个白色背景给我冲指标。我所知道的自定义选项卡是红色与白色的背景,这就是为什么我把它从CustomTabPageIndicator到Widget.TabPageIndicator。不过,我仍然得到一个全白色背景。

我试图只是让我的布局有一个黑色的背景我pageviewer里面,但是当我这样做,我的按钮变得非常暗,无法读取。

我的主要问题是要找到在哪里我可以改变的Viewpagerindicator主题里面的颜色。

任何建议将是多少AP preciated。谢谢你。

解决方案
  
    

参观这个例子; 制作ActionBarSherlock和ViewPagerIndicator发挥好

         

在这个例子中可能的错误; <一href="http://stackoverflow.com/questions/14124354/android-supportmapfragment-with-google-map-api-2-0-giving-error/">Android - SupportMapFragment与谷歌地图API 2.0给错误

         
      
        

祝你好运.. !!

      
    
  

I have an app that is using Viewpagerindicator. I am using the tabs portion of it. I use a black background and the default blue indicator color. I wanted to add an actionbar to my app so I started using Actionbarsherlock. In order to get my tabs to show an the action bar to show I created my own them which is called in my manifest file. The theme I created is this:

<?xml version="1.0" encoding="utf-8"?>

<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is our main ActionBarSherlock theme -->
<style name="Theme.Styled" parent="Theme.Sherlock.Light.DarkActionBar">
</style>

<style name="Theme.VPI" parent="Theme.Styled">
      <item name="vpiTitlePageIndicatorStyle">@style/Widget.TitlePageIndicator</item>
      <item name="vpiTabPageIndicatorStyle">@style/Widget.TabPageIndicator</item>
      <item name="vpiTabTextStyle">@style/Widget.TabPageIndicator.Text</item>

</style>    

</resources>

When I run the app, I get my blue indicator color but the background of the entire app is white.

Originally I was how this code inside:

<style name="Theme.VPI" parent="Theme.Styled">
   <item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
</style>  

That gave me red indicators with a white background. I know the custom tabs are red with a white background and that is why I changed it from CustomTabPageIndicator to Widget.TabPageIndicator. However, I am still getting an all white background.

I have tried to just make my layout have a black background inside of my pageviewer, however when I do that, my buttons become really dark and unreadable.

My main question is to find where I can change the color inside of the Viewpagerindicator theme.

Any suggestions would be much appreciated. Thank You.

解决方案

Visit this example; Making ActionBarSherlock and ViewPagerIndicator play nice

Possible Bug in that example; Android - SupportMapFragment with google Map API 2.0 giving error

Good Luck..!!

这篇关于Actionbarsherlock与Viewpagerindicator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆