草庐IT

add_theme_support

全部标签

android - 如何在默认主题 Theme.Holo.Light 中更改 homeAsUpIndicator 的图像

在我的安卓应用中,我使用的是默认主题Theme.Holo.Light。现在我想更改默认使用的“@android:drawable/ic_ab_back_holo_light通过将其更改为@drawable/ic_launcher但这里的标志保持原样,它不会改变图像。我附上了actionBar的屏幕截图。任何帮助将不胜感激。 最佳答案 将它们放入您的默认Activity主题中。@drawable/ic_launcher 关于android-如何在默认主题Theme.Holo.Light中更

android - 项目依赖com.google.android.support :wearable:2. 0.2

我用androidstudio创建了一个demowear项目,但没有接触任何东西。在build.Gradle中发生了这个错误,尽管我很好奇它允许应用程序编译。Projectdependsoncom.google.android.support:wearable:2.0.2,soitmustalsodepend(asaprovideddependency)oncom.google.android.wearable:wearable:2.0.2dependencies{compilefileTree(dir:'libs',include:['*.jar'])compile'com.goog

android - 动态更改 android.support.v4.view.PagerTitleStrip 的标题

我目前正在我的应用程序中使用PagerTitleStrip(文档:http://developer.android.com/reference/android/support/v4/view/PagerTitleStrip.html)一切正常,我设置的标题是这样的:publicclassPageAdapterextendsFragmentPagerAdapter{privateListfragments;publicPageAdapter(FragmentManagerfm,Listfragments){super(fm);this.fragments=fragments;}@Over

android - android-support-v7-mediarouter 中的 styles.xml 错误

以下是android-support-v7-mediarouter的styles.xml文件。56dp48dp0dptrue@string/mr_media_route_button_content_description@drawable/mr_ic_media_route_holo_dark56dp48dp0dptrue@string/mr_media_route_button_content_description@drawable/mr_ic_media_route_holo_light但是我收到很多没有找到资源的错误,其中一些是:[2014-04-0510:03:14-Spl

android - LinearLayout$LayoutParams 无法转换为 android.support.v4.widget.DrawerLayout$LayoutParams

我正在尝试做抽屉导航选项。这是我的xml:如果我删除Linearlayout则没有错误。此按钮出现在listview后面,edittext出现在屏幕中间。问题是对象没有对齐。有没有办法在DrawerLayout中对齐View对象?如果我不删除linearlayout我会得到这个错误:LinearLayout$LayoutParamscannotbecasttoandroid.support.v4.widget.DrawerLayout$LayoutParams堆栈跟踪:E/AndroidRuntime(3454):FATALEXCEPTION:mainProcess:com.brill

java - 检索项目 : No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar' 的父项时出错

我正在关注来自developers.android.com的android开发教程,目前我正在尝试使用此处提供的信息来设置操作栏的样式:https://developer.android.com/training/basics/actionbar/styling.html#CustomBackground7这是res/values/themes.xml的代码:@style/MyActionBar@style/MyActionBar@drawable/actionbar_background@drawable/actionbar_background我在“style”开始标签旁边看到红叉

android - 错误 : IllegalArgumentException: The style on this component requires your app theme to be Theme. Material 组件

下面是我的依赖implementation'com.google.android.material:material:1.0.0'implementation'androidx.appcompat:appcompat:1.0.2'implementation'androidx.constraintlayout:constraintlayout:1.1.3'我的layout.xml上面的代码对我来说工作正常但是当我更新materialdesign的dependenciesimplementation'com.google.android.material:material:1.1.0-a

删除 R.java 时生成的 android-support-v4 错误

好的,下面是步骤。1-从现有源创建新项目2-选择Android\android-sdk\extras\android\compatibility\v4\samples\Support4Demos3-完成所以,我漂亮的eclipse创建了项目,但他从gen中删除了R.java类,所以我从包的每个类中得到错误。我的事还有,style.xml给我一些错误。这让我很难受,因为我已经3天无法从中学到任何东西,而且我的friendgoogle也没有提供帮助。提前致谢! 最佳答案 我在Eclipse中尝试了同样的事情,我看到大多数文件都导入失败:

android:theme ="@android:style/Theme.NoTitleBar.Fullscreen"安卓不工作

我在list文件中声明我的Activity,如下所示。我声明了全屏主题的Activity。但它不起作用。我也使用第二种全屏方式,如下所示。requestWindowFeature(Window.FEATURE_NO_TITLE);getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);但是没有成功。请帮我找到这个。 最佳答案 我通过在应用程序级别声明全屏主题来解决它。

java - 错误 : diamond operator is not supported in -source1. 5

我正在创建一个使用cordovaionic和angular的应用程序,对于条形码扫描,我使用的是native并且能够与javascript代码集成。如果我使用eclipseIDE运行该项目,它工作正常,但如果我使用ionic运行android-出现上述错误-菱形运算符在-源1.5中不受支持对于native,我使用了此链接https://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/并且工作正常。谁能帮