zoukankan      html  css  js  c++  java
  • Android学习笔记---水波纹效果

    ======================================按下水波纹效果
    <?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栈中的前一个

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

  • 相关阅读:
    P5304旅行者(比bk201还要流氓的解法)
    考试T1护花
    考试T2修剪草坪
    考试T3麻将
    账号密码
    T7
    P2885 [USACO07NOV]电话线Telephone Wire
    P4965 薇尔莉特的打字机
    P1505 [国家集训队]旅游
    T2
  • 原文地址:https://www.cnblogs.com/langfei8818/p/7598114.html
Copyright © 2011-2022 走看看