首页 \ 问答 \ 启动时的运行时权限(Runtime Permission at Startup)

启动时的运行时权限(Runtime Permission at Startup)

我有一个需要CAMERA和WRITE_SETTINGS权限的手电筒,我需要先处理这些我已经知道如何操作的权限,然后如果它被授予,例如,启动我的主要活动......(抱歉,我是新手安卓)


I have a flashlight that needs CAMERA and WRITE_SETTINGS permissions, I need to first handle these permissions which I already know how to do it, Then if it is granted, for example, start my main activity... (sorry, I am new in android)


原文:https://stackoverflow.com/questions/38361786
更新时间:2023-02-28 16:02

最满意答案

抱歉。 这是我的错误,我没有删除所有可绘制文件夹中的thumbs.db,这就是图像用线条查看的原因。 现在没关系。

在此处输入图像描述


Sorry. It's my mistake I didn't deleted the thumbs.db in all drawable folders that's why the image looked with lines. Now it's fine.

enter image description here

相关问答

更多
  • 如果(android:padding呈现)它覆盖所有其他填充值,否则if(android:paddingXXX呈现)它覆盖bg drawable paddingXXX(XXX = Left | Right | Top | Bottom)else if(view has drawable bg) (在你的情况下为九个补丁),否则将应用默认填充(通常为零) 所以不要使用android:padding =“2dp”。 填充属性覆盖所有内容。 只需使用paddingLeft = 20dp,paddingTop = ...
  • 谷歌是你的朋友看看这些教程: http://radleymarx.com/blog/simple-guide-to-9-patch/ http://www.youtube.com/watch?v=RoCDFQnWrt8 Google is your friend Check out these tutorials: http://radleymarx.com/blog/simple-guide-to-9-patch/ http://www.youtube.com/watch?v=RoCDFQnWrt8
  • 好吧,让我们看一下图像的一个镜头,但更有可能的问题是9补丁是用于你想要复制像素的情况。 所以你需要一个或多或少均匀的像素区域,你需要拉伸。 Well, let's see a shot of the image, but more than likely the problem is that 9 patch is intended to be used in situations where you want to replicate pixels. So you need a more or less ...
  • 在9patch中使用奇数时,我在9Patch上遇到了一些意想不到的行为(请记住,如果你的xhdpi 9patch为75px高,则mdpi为37.5px,这可能会导致意外的绘图场景)。 我的建议是使图形尽可能保持一致,分辨率(l(3),m(4),h(6)和xh(8))以及几何平衡(即:顶部的可调整大小区域是比底部大,你真的需要吗?)。 将等待你的回答! I've experienced some unexpected behavior on 9Patch when using odd numbers in t ...
  • 线条和点是使它成为NinePatch 。 左侧和顶部的点定义了可以拉伸的区域,而另外两条线定义了在NinePatch中绘制内容的边界框。 如果将此类图像设置为背景 - 则不会显示这些线条。 要自己创建这些图像,可以使用android sdk中的draw9patch工具(http://developer.android.com/guide/developing/tools/draw9patch.html)。 需要记住的一点是, NinePatch图像的文件类型必须是,例如: image.9.png 。 否则将 ...
  • http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch 左侧和顶部指南告诉框架可以拉伸什么,右侧和底部指南告诉它哪些行和列是填充(实际上,内部内容可以去的区域)。 http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch The left and top guidelines tell the framewo ...
  • 明确设置android:padding="@null"解决了我的问题。 问题似乎是一个Button(或我正在使用的主题中的一个样式)设置了填充,它覆盖了按钮中的所有其他填充 - 填充背景drawable,以及paddingTop , paddingLeft等。 我的按钮布局现在定义如下:
  • 抱歉。 这是我的错误,我没有删除所有可绘制文件夹中的thumbs.db,这就是图像用线条查看的原因。 现在没关系。 Sorry. It's my mistake I didn't deleted the thumbs.db in all drawable folders that's why the image looked with lines. Now it's fine.
  • 嗯,如果你想支持大多数可用的设备,那就不那么容易了; 只有一组9补丁图像是不够的,除非你只将它们用于背景图案。 每个密度文件夹至少需要一组9个补丁图像,再加上精心设计的布局(对于大型和xlarge设备可能不同),以及对Fragments的良好使用,你可以设法开发出一个好的在大多数设备上寻找app :) Well, it's not that easy if you want to support most of the devices available; just one set of 9-patch i ...

相关文章

更多

最新问答

更多
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
  • 是否可以嵌套hazelcast IMaps?(Is it possible to nest hazelcast IMaps? And whick side effects can I expect? Is it a good Idea anyway?)
  • UIViewAnimationOptionRepeat在两个动画之间暂停(UIViewAnimationOptionRepeat pausing in between two animations)
  • 在x-kendo-template中使用Razor查询(Using Razor query within x-kendo-template)
  • 在BeautifulSoup中替换文本而不转义(Replace text without escaping in BeautifulSoup)
  • 如何在存根或模拟不存在的方法时配置Rspec以引发错误?(How can I configure Rspec to raise error when stubbing or mocking non-existing methods?)
  • asp用javascript(asp with javascript)
  • “%()s”在sql查询中的含义是什么?(What does “%()s” means in sql query?)
  • 如何为其编辑的内容提供自定义UITableViewCell上下文?(How to give a custom UITableViewCell context of what it is editing?)
  • c ++十进制到二进制,然后使用操作,然后回到十进制(c++ Decimal to binary, then use operation, then back to decimal)
  • 以编程方式创建视频?(Create videos programmatically?)
  • 无法在BeautifulSoup中正确解析数据(Unable to parse data correctly in BeautifulSoup)
  • webform和mvc的区别 知乎
  • 如何使用wadl2java生成REST服务模板,其中POST / PUT方法具有参数?(How do you generate REST service template with wadl2java where POST/PUT methods have parameters?)
  • 我无法理解我的travis构建有什么问题(I am having trouble understanding what is wrong with my travis build)
  • iOS9 Scope Bar出现在Search Bar后面或旁边(iOS9 Scope Bar appears either behind or beside Search Bar)
  • 为什么开机慢上面还显示;Inetrnet,Explorer
  • 有关调用远程WCF服务的超时问题(Timeout Question about Invoking a Remote WCF Service)