设置全局导航栏颜色,标题大小和UIBarButtonItem字体大小 在appdelegate里面设置 swift: UINavigationBar.appearance().barTintColor = UIColor.init(red: 47, green: 48, blue: 52) UINavigationBar.appearance().tintColor = UIColor.whiteColor() UINavigationBar.appearance().titleTextAttr…
获取不同机型微信小程序状态栏+导航栏高度 一. 前言 很多时候我们开发微信小程序,都需要先知道状态栏和导航栏的高度,才能去做其他功能 二. 获取微信小程序状态栏高度 用wx.getSystemInfoSync()[官方文档]获取系统信息,里面有个参数:statusBarHeight(状态栏高度),是我们后面计算整个导航栏的高度需要用到的. let res = wx.getSystemInfoSync(); let statusHeight = res.statusBarHeight; // 注意…
Android 修改底部导航栏navigationbar的颜色 getWindow().setNavigationBarColor(Color.BLUE); //写法一 getWindow().setNavigationBarColor(getResources().getColor(R.color.black_12));//写法二…
<style name="test"> <!--状态栏颜色--> <item name="colorPrimaryDark">@color/md_red_900</item> <!--控制各个控件被选中时的颜色--> <item name="colorAccent">@color/md_red_100</item> <!--页面背景色--> <i…
Translucent system UI styling To get the most impact out of your content, you can now use new window styles and themes to request translucent system UI, including both the status bar and navigation bar. To ensure the legibility of navigation bar butt…
1. 隐藏当前Activity标题栏 在当前Activity中调用:this.requestWindowFeature(Window.FEATURE_NO_TITLE); 2. 隐藏当前Activity状态栏(Status Bar) 2.1 Android 4.0 and Lower public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) {…
下面的代码是基于开源项目SystemBarTint,我们需要添加其依赖 compile 'com.readystatesoftware.systembartint:systembartint:1.0.3' 下面的代码,我在类原生的Android7.0系统测试通过,其他的国产ROM系统未进行测试 设置状态栏白色 1. 设置主题theme 在AndroidManifest文件中,设置theme 按住Ctrl,点开那个theme,修改theme 2. 设置xml文件 之后在xml文件中的根节点,添加属…
在软件开发过程中,经常见到,就是APP 的标题栏样式几乎都是一样的,只是文字不同而已,两边图标不同.为了减少重复代码,提高效率, 方便大家使用,我们把标题栏通过组合的方式定义成一个控件. 例下图: 点击: 如不设置左边,右边图片: 下面说一下具体实现步骤: 步骤一: 导航栏包括: * 返回按钮 * 标题 * 右侧按钮(功能不确定) 首先是布局文件,如下: </pre><p></p><pre name="code" class="jav…
1.要实现的效果图以及工程目录结构: 先看看效果图吧: 接着看看我们的工程的目录结构: 2.实现流程: Step 1:写下底部选项的一些资源文件 我们从图上可以看到,我们底部的每一项点击的时候都有不同的效果是吧! 我们是通过是否selected来判定的!我们要写的资源文件有:首先是图片,然后是文字,接着是背景! 图片Drawable资源:tab_menu_channel.xml <?xml version="1.0" encoding="utf-8"?>…
最近遇到设置状态栏和二维码AVCaptureMetadataOutput setMetadataObjectTypes: unspported type found的错误问题,所以我在这里进行总结一下,方便大家以后的使用: 设置状态栏: (个人方法:是在AppDelegate头文件中设置,自己的主题色) [[UINavigationBar appearance] setBarTintColor:THEME_COLOR];    [[UINavigationBar appearance] setT…