myterial view pager library

时间:2015-06-23 12:25:20

标签: android styles themes android-appcompat

嗨我只是导入了材质视图分页器库,但它在样式资源中显示错误,我使用了appcompact 7,

听到的是样式代码 -

    <resources xmlns:tools="http://schemas.android.com/tools">
   <style name="MVP_AppBaseTheme"         
    parent="@style/Theme.AppCompat.Light.NoActionBar">
  </style>

<!-- Base application theme. -->
<style name="MVP_AppTheme" parent="MVP_AppBaseTheme">

    <item name="android:textColorPrimary">@android:color/white</item>
    <item name="drawerArrowStyle">@style/MVP_DrawerArrowStyle</item>
    <item name="android:windowTranslucentStatus" tools:targetApi="19">true</item>

    <item name="android:windowContentOverlay">@null</item>
    <item name="windowActionBar">false</item>

    <!-- Toolbar Theme / Apply white arrow -->
    <item name="colorControlNormal">@android:color/white</item>
    <item name="actionBarTheme">@style/MVP_AppTheme.ActionBarTheme</item>

    <!-- Material Theme -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/accent_color</item>

    <item name="android:statusBarColor" tools:targetApi="21">@color/statusBarColor</item>
    <item name="android:navigationBarColor" tools:targetApi="21">@color/navigationBarColor</item>
    <item name="android:windowDrawsSystemBarBackgrounds" tools:targetApi="21">true</item>

</style>

<style name="MVP_AppTheme.ActionBarTheme" parent="@style/ThemeOverlay.AppCompat.ActionBar">
    <!-- White arrow -->
    <item name="colorControlNormal">@android:color/white</item>
</style>

<style name="MVP_DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
    <item name="spinBars">true</item>
    <item name="color">@color/drawerArrowColor</item>
</style>

  end the error in second line
      <style name="MVP_AppBaseTheme"         
    parent="@style/Theme.AppCompat.Light.NoActionBar">

错误是       ror:检索项目的父项时出错:找不到与给定名称匹配的资源&#39; @ style / Theme.AppCompat.Light.NoActionBar&#39;。     如果你能提前感谢,请帮忙

1 个答案:

答案 0 :(得分:0)

我遇到了同样的错误

您可以尝试使用gms版本7.5

dependencies {
    compile 'com.google.android.gms:play-services:7.5.+'
    . . . 
}