android开发记录

一、横屏调整为竖屏,显示导航栏,并且内容在导航栏之上显示

                pContext.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
                // 设置导航栏不隐藏且占用空间
                if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
                    View vv = pContext.getWindow().getDecorView();
                    vv.setSystemUiVisibility(View.VISIBLE);
                } else if (Build.VERSION.SDK_INT >= 19) {
                    //for new api versions.
                    View decorView = pContext.getWindow().getDecorView();
                    int uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
                    decorView.setSystemUiVisibility(uiOptions);
                }
                final WindowManager.LayoutParams attrs = pContext.getWindow().getAttributes();
                attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
                pContext.getWindow().setAttributes(attrs);
                pContext.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
                pContext.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

二、配置android studio的terminal指向git的bash.exe

2.1、下载安装git

在这里插入图片描述

2.2、配置Shell path指向bash.exe

在这里插入图片描述

1、打开Android Studio。

2、进入File > Settings (或 Android Studio > Preferences 在Mac上)。

3、在设置中,导航至Tools > Terminal。

4、在Shell path 下,选择Git Bash的路径。通常,Git Bash可执行文件的路径是C:\Program Files\Git\bin\bash.exe。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值