langfei8818

======================================按下水波纹效果
<?xml version="1.0" encoding="utf-8"?>
<!--波纹效果背景-->
<!--android:color="@color/dark_brown" 按下时的效果-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorPrimary">

<!--正常显示的颜色-->
<item>
<shape>
<!--背景颜色-->
<solid android:color="@color/white"/>
</shape>
</item>
</ripple>
=========================Toolbar和侧滑视图结合======================
toolbar = findView(R.id.toolbar_id);
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_id);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this,drawerLayout,toolbar,R.string.kai,R.string.guan){
//在菜单关闭的时候执行
@Override
public void onDrawerClosed(View drawerView) {
if(itemdianji){
sowHort();
itemdianji = false;
}
}
};
drawerLayout.setDrawerListener(toggle);

 

<activity
android:name=".activity.MainActivity"
android:screenOrientation="portrait" />
<!--
android:screenOrientation=""
landscape 横屏
portrait 竖屏
sensor 根据传感器方向
user 用户设置方法
behind 跟随activity栈中的前一个

 

 

 

估计是有问题的 先记录 以后修改

分类:

技术点:

相关文章:

  • 2022-01-03
  • 2021-12-03
  • 2021-08-24
  • 2022-01-26
  • 2021-11-19
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2021-12-14
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-06-18
相关资源
相似解决方案