草庐IT

Folder-icon

全部标签

android - 如何访问 res/drawable/"folder"

在我的应用程序中,我有很多图片,我已将它们分组在res/drawable下的文件夹中。但是Android不允许我通过“R”访问它们。有没有办法访问这些文件夹。这是我使用的代码。ImageViewiv=newImageView(conext);iv.setImageResource(R.drawable.**smiley.666**);我标记了我无法访问的部分。提前致谢Safari 最佳答案 不,Android不允许/res/drawable下的子文件夹:CantheAndroiddrawabledirectorycontainsub

android - Cordova /Phonegap - Android : Icon not updating

我使用的是cordova3.3.0(CLI),我按照文档说明(http://cordova.apache.org/docs/en/3.3.0/config_ref_images.md.html)替换了www/res/icons/android文件夹中的图标。问题是,当我构建应用程序并将其发送到我的手机(cordovarunandroid)时,该图标仍然是默认图标,即使我在再次安装之前从手机上卸载了该应用程序。关于如何解决这个问题的任何建议?谢谢! 最佳答案 我正在使用http://ionicframework.com/构建我的应用程

android - 使用 SUGGEST_COLUMN_ICON_1 的网址作为搜索建议

我有一个SearchManager设置,其中建议下拉列表将在用户键入时显示。结果来self的服务器(http)。我想为每个选项显示一个图标(如果该文件确实存在)。查看文档,我看到常量列SUGGEST_COLUMN_ICON_1的选项允许这些选项:Columnnameforsuggestionscursor.Optional.Ifyourcursorincludesthiscolumn,thenallsuggestionswillbeprovidedinaformatthatincludesspacefortwosmallicons,oneattheleftandoneattherigh

android - ViewPagerIndicator 选项卡 : Icons above Text

我正在使用ViewPagerIndicator我想更改选项卡样式,这样我就可以在文本上方获得图标,而不是默认设置,它将图标放在左侧,标题放在右侧。 最佳答案 之所以图标总是出现在左边,是因为这段代码:if(iconResId!=0){tabView.setCompoundDrawablesWithIntrinsicBounds(iconResId,0,0,0);}发现于TabPageIndicator.java这是私有(private)方法(addTab())的一部分,因此,如果不修改库本身就无法更改。幸运的是,这并不难做到。确保您

Android studio安装警告: A folder failed to be moved

我今天安装了androidstudio,发现SDK管理器有问题:我遵循了这个指南:http://developer.android.com/sdk/installing/adding-packages.html当我安装-ARMEABIv7aSystemImage我收到这个错误。我试图禁用防病毒软件,但它仍然不起作用。希望得到解答,谢谢。 最佳答案 我在公司安装时遇到类似的问题,还有android-studio和sdk。通常以管理员身份运行可以解决大部分问题。 关于Androidstudi

android - 错误 : Source Path does not exist for android icon png when building for ionic

Yoursysteminformation:CordovaCLI:6.5.0IonicCLIVersion:2.2.1IonicAppLibVersion:2.2.0OS:macOSSierraNodeVersion:v6.9.5Xcodeversion:Xcode8.2.1Buildversion8C1002我正在尝试使用ionicplatformaddandroid创建一个android项目,但它总是提示resources/android/icon/drawable-hdpi-icon.png不存在。事实上它不存在——这些资源都不存在。它们可以通过ionicresources创建。

android - 如何在 React Native-App 中从 res/drawable-folder 加载图像?

我想在ReactNative-App中显示来自res/drawable-folder的静态图像。但是,没有显示任何内容。我在android子文件夹中有以下文件夹结构:macbook:CompanyApphagen$treeandroid/app/src/main/res/android/app/src/main/res/├──drawable│  ├──a1456.jpg│  └──a1457.jpg├──mipmap-hdpi│  └──ic_launcher.png├──mipmap-mdpi│  └──ic_launcher.png├──mipmap-xhdpi│  └──ic_

Android Notification.Builder : show a notification without icon

Stringns=Context.NOTIFICATION_SERVICE;NotificationManagermNotificationManager=(NotificationManager)getSystemService(ns);inticon=R.drawable.ic_notification_icon;android.app.Notification.Buildernbuilder=newNotification.Builder(this);nbuilder.setContentTitle(getString(R.string.notifcation_title,mPr

android - 如何将 "Action Bar Icon Pack"添加到 Android Studio

我刚刚从https://developer.android.com/design/downloads/index.html下载了操作栏图标包,而且我还没有找到在AndroidStudio中“安装”这些图标的方法……我应该将它一个一个地复制并粘贴到res/drawable文件夹吗?或者有什么目录可以解压它们吗? 最佳答案 ActionBarIconPack类似于在任何项目中使用的普通drawable资源。这样做的目的是让设计师有一个指南来使用Illustrator开发新图标或自定义现有图标>回答你的问题-使用现有图标-根据需要将图标复

安卓 : FileProvider on custom external storage folder

我正在尝试设置一个文件提供程序来共享文件。我的文件保存在外部存储的“AppName”文件夹中(与Android、Movies和Pictures文件夹同级)。这是我的文件提供者配置:和file_paths.xml:当我尝试访问我的文件时:UrifileUri=FileProvider.getUriForFile(activity,"com.mydomain.appname.fileprovider",newFile("/storage/emulated/0/AppName/IMG_20160419_095211.jpg"));它返回一个错误:java.lang.IllegalArgume