m0_38114139 2018-11-13 13:32 采纳率: 0%
浏览 597

Missing styles. Is the correct theme chosen for this layout?

Android安卓中使用ViewPagerIndicator,已经关联library了,布局文件完全拷贝过来的,还是出现这个Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.

Failed to find style 'vpiTabPageIndicatorStyle' in current theme

而且运行后这个TabPagerIndicator不显示,

图片说明
源码:
adapter = new MyAdapter();
vp.setAdapter(adapter); //viewpager
tpi.setVisibility(View.VISIBLE); //TabPagerIndicator
tpi.setViewPager(vp);

    布局文件:
    <?xml version="1.0" encoding="utf-8"?>

xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<com.viewpagerindicator.TabPageIndicator
    android:id="@+id/indicator_newcontext_index"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:visibility="gone"
    />
<android.support.v4.view.ViewPager
    android:id="@+id/vp_newcontext_index"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    />

  • 写回答

1条回答 默认 最新

  • m0_38114139 2018-11-13 13:35
    关注

    在清单文件中也加上了相应theme android:theme="@style/Theme.PageIndicatorDefaults"

    评论

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64