Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
在旋转时从错误的资源文件夹中提取可绘制对象
在这里拉我的头发 因此 我正在使用一个具有多种类型的可绘制对象的应用程序 并且它们的结构如下 res Portrait resources drawable mdpi drawable hdpi drawable xhdpi Landsca
Android
Rotation
androidactivity
androidresources
androiddrawable
访问 xml 中的整数资源
我读过了this http developer android com guide topics resources more resources html Integer在哪里找到了如何访问java类中的整数资源 但没有其他资源的文档 这
Android
androidlayout
androidresources
为什么保存加载的位图会增加其大小?
我从 SD 卡加载一个 png 文件 我以某种方式更改它 然后再次保存 我注意到保存的文件比原始文件大得多 一开始以为是修改文件的原因 然后我用下面的代码进行测试 仍然发生 我只是加载一个 png 文件 然后用另一个名称保存它 原始文件是3
Android
Bitmap
androidresources
主题切换时的过渡(或Activity.recreate())
我的目标是 API 级别 14 所以我使用了Activity recreate http developer android com reference android app Activity html recreate 28 29用于我
Android
androidactivity
themes
androidresources
如何从内存转储中查找预加载系统绘图(位图)的 ID 或名称
我正在分析我们应用程序的内存使用情况 发现很奇怪Drawables 它不断地 吃掉 几兆字节的堆 以下是一些截图MAT http www eclipse org mat Dominator tree with 2 pretty big bi
可下载字体例外
我决定使用可下载字体 https developer android com guide topics ui look and feel downloadable fonts html在我的项目中 IS 按照指南中的建议实施了所有内容 当我
Android
androidresources
androidfonts
如何获取与 TextView 关联的字符串资源的 id?
我可以访问 TextView 实例 获取它的资源 ID 并通过以下方式获取它的资源名称getResources getResourceEntryName 但我似乎找不到一种方法来获取与其关联的字符串的 id 如何动态获取与 TextView
Android
TextView
androidresources
使用 Android O 的“android:fontFamily”时出现错误“文件名必须以 .xml 结尾”?
Android O 引入了一项新功能 XML 中的字体 它允许您将字体用作资源 我正在创建font资源文件中的文件夹 由安卓开发者 https developer android com preview features working w
Android
Layout
fonts
androidresources
android80oreo
如何拦截全局资源加载?
背景 我需要使用翻译 SDK Lokalise 文档here https docs lokalise com en articles 3487109 lokalise android sdk 2 0 beta 旨在从其服务器加载字符串资源
TypedArray 的 getResourceId 方法
我正在阅读有关的文档获取资源Id https developer android com reference android content res TypedArray html getResourceId int 20int 方法 它说
删除Android所有语言中的字符串
我有一个包含多个翻译的应用程序 我想删除一些字符串 我怎样才能重构并删除它们一次 例如在默认情况下strings xml文件并自动将删除传播到其他翻译的其他 strings xml 文件 您可以通过 Android Studio 中的 翻译
Android
xml
string
androidresources
如何以编程方式获取 Android 项目(非设备)中支持的语言列表
在一些项目中我们可能会出现这种情况 如何以编程方式获取此应用程序 项目支持的语言列表 结果我需要这样的字符串数组 en bg bs da de hr it nl pl pt sk sr tr 当然 我可以通过键入它来对其进行硬编码 但我认为
Android
Localization
androidresources
有没有办法在 Android Studio 中为 java 文件提取带有自动生成资源名称的字符串?
在 Android Studio 中 Alt Enter gt java 文件中的 提取字符串资源 将打开以下窗口 Please note that the Resource name field is blank However the
AndroidStudio
androidresources
androidstudio21
如何包含塞尔维亚语的 2 种变体?带有拉丁字母和西里尔字母
我有一个 Android 应用程序 我想翻译成塞尔维亚语 并且我想要该语言的两种变体 拉丁字母和西里尔字母 我尝试过这个变体 value sr rRS Latn value sr Latn value sr rRS Cyrl value s
Android
androidresources
Android Studio 3.1 无法解析符号(主题、小部件、attr 等)
我今天将 Android Studio 升级到 3 1 现在 Android Studio 表示无法解析大多数资源的符号 例如ThemeOverlay in styles xml or attr actionBarSize 到目前为止 这似
Android
AndroidStudio
intellijidea
androidresources
androidstudio31
从 asset 或 res/raw 中的文件获取 Uri
我试图让它发挥作用 并且在网上查看了许多不同的资源 正如您从我所做的所有评论中看到的那样 我想访问位于 asset 或 res 中的 pdf 文件 哪一个并不重要 所以最简单的方法就可以了 我有下面的方法 它将获取实际文件 并使用参数中的
Java
Android
pdf
uri
androidresources
这是从片段中获取字符串资源的正确方法吗?
在片段中读取字符串资源时 哪种方法通常更好 更安全 我在这里读到getResources getString 直接地 public class SomeFragment extends Fragment public static Some
Android
string
androidfragments
androidresources
androidcontext
getColor(int id) 在 Android 6.0 Marshmallow (API 23) 上已弃用
The Resources getColor int id 方法已被弃用 ColorInt Deprecated public int getColor ColorRes int id throws NotFoundException re
Android
androidresources
android60marshmallow
androidmnc
Android Resources$NotFoundException:无法找到资源 ID
我从 Firebase 收到一份活动报告 由于找不到我的资源而导致活动失败 我真的很困惑为什么找不到它 因为我相信所有文件都在正确的目录中 并且用户使用的是 Android v8 1 它并不古老 应该能够处理我认为有的东西自 v1 1 以来
Android
androidresources
androidvectordrawable
android81oreo
如何通过参考id获取主题
我需要从主题中提取默认值 但不是从当前主题中提取 我知道我可以从当前主题中获取属性 如下所示 TypedValue typedValue new TypedValue Theme currentTheme context getTheme
Android
androidresources
1
2
3
4
5
6
»