zoukankan      html  css  js  c++  java
  • Android 字典

    android.intent.action.GET_CONTENT:

    调用系统程序用的,比如一个打开一个文件的时候会提示你用哪个软件打开,setType()就是设置默认用哪种格式打开,比如"video/*","audio/amr"
     Intent intent = new Intent();  
     /* 开启Pictures画面Type设定为image */  
     intent.setType(“image/*”); 
     //intent.setType(“audio/*”); //选择音频 
     //intent.setType(“video/*”); //选择视频 (mp4 3gp 是android支持的视频格式) 
     //intent.setType(“video/*;image/*”);//同时选择视频和图片   
     /* 使用Intent.ACTION_GET_CONTENT这个Action */  
     intent.setAction(Intent.ACTION_GET_CONTENT);  
     /* 取得相片后返回本画面 */  
     startActivityForResult(intent, 1); 

     Intent intent=new Intent("android.intent.action.GET_CONTENT");
                    intent.setType("video/*");

    android.permission.INTERNET:

    网络功能权限

    <uses-permission android:name="android.permission.INTERNET"/>

    NavigationView的menu图标使用原本颜色

     NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
     navigationView.setItemIconTintList(null);
    
    

     

    图片按钮,下方带文字

    <Button
                    android:id="@+id/list_popWindow_setting"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentRight="true"
                    android:background="#0000"
                    android:drawableTop="@drawable/tou_xiang"
                    android:padding="5dp"
                    android:text="sadsasda"
                    android:layout_weight="1"/>

     下面是RelativeLayout各个属性

    1. android:layout_above="@id/xxx"  --将控件置于给定ID控件之上

    2. android:layout_below="@id/xxx"  --将控件置于给定ID控件之下

    3. android:layout_toLeftOf="@id/xxx"  --将控件的右边缘和给定ID控件的左边缘对齐

    4. android:layout_toRightOf="@id/xxx"  --将控件的左边缘和给定ID控件的右边缘对齐

    5. android:layout_alignLeft="@id/xxx"  --将控件的左边缘和给定ID控件的左边缘对齐

    6. android:layout_alignTop="@id/xxx"  --将控件的上边缘和给定ID控件的上边缘对齐

    7. android:layout_alignRight="@id/xxx"  --将控件的右边缘和给定ID控件的右边缘对齐

    8. android:layout_alignBottom="@id/xxx"  --将控件的底边缘和给定ID控件的底边缘对齐

    9. android:layout_alignParentLeft="true"  --将控件的左边缘和父控件的左边缘对齐

    10. android:layout_alignParentTop="true"  --将控件的上边缘和父控件的上边缘对齐

    11. android:layout_alignParentRight="true"  --将控件的右边缘和父控件的右边缘对齐

    12. android:layout_alignParentBottom="true" --将控件的底边缘和父控件的底边缘对齐

    13. android:layout_centerInParent="true"  --将控件置于父控件的中心位置

    14. android:layout_centerHorizontal="true"  --将控件置于水平方向的中心位置

    15. android:layout_centerVertical="true"  --将控件置于垂直方向的中心位置

     

    SpannableString

    可以设置文本高亮或图片等等

     
    
    
    
  • 相关阅读:
    紫外传感器波长
    常见设备功耗
    点型感温火灾探测器研发思路
    C#使用Linq to XML进行XPath查询
    题解 最大获利
    题解 走迷宫
    2020-11-16 考试题解
    题解 最小生成树
    题解 「BZOJ4919 Lydsy1706月赛」大根堆
    题解 2020.10.24 考试 T4 模板
  • 原文地址:https://www.cnblogs.com/xinyibufang/p/7278968.html
Copyright © 2011-2022 走看看