zoukankan      html  css  js  c++  java
  • Android开发日记(六)

    textViewUserName.setCursorVisible(false);//隐藏光标
    textViewUserName.setFocusable(false);//失去焦点
    textViewUserName.setFocusableInTouchMode(false);//虚拟键盘隐藏

    if(!userLocalName.equalsIgnoreCase("null")&&!userLocalEmail.equalsIgnoreCase("null")){
     layoutUserInfo.setVisibility(View.VISIBLE);
     layoutUserLogin.setVisibility(View.GONE);
    }else{
     layoutUserInfo.setVisibility(View.GONE);
     layoutUserLogin.setVisibility(View.VISIBLE);
     
    }
    XML上两个LinearLayout Info和Login 通过判断确定两个的显示和隐藏情况。
    ① fill_parent

     设置一个视图的布局为fill_parent将强制性地使视图扩展至父元素大小。

     ② match_parent
     Android 中match_parent和fill_parent意思一样,但match_parent更贴切,于是从2.2开始两个词都可以
     用,但2.3版本后建议使用match_parent。
     ③ wrap_content
     自适应大小,强制性地使视图扩展以便显示其全部内容。以TextView和ImageView控件为例,设置为
     wrap_content将完整显示其内部的文本和图像。布局元素将根据内容更改大小。
    android:layout_gravity="center"//使控件居中
     

  • 相关阅读:
    vue.js 第二课
    vue.js学习(第一课)
    2016-11-14看张大神的微博总结
    这几天的工作总结:
    调了一天的兼容总结下
    鸭式辩论
    prototype 原型
    前端ps常用的小技巧
    Android的开始之相对布局
    Android的开始之线性布局
  • 原文地址:https://www.cnblogs.com/to-creat/p/5024740.html
Copyright © 2011-2022 走看看