Android Studio “懒人”必备插件android layout id converter
在一个布局文件里。假设定义了非常多非常多id,代码中一个个findview是一件非常枯燥而且浪费时间的事情。
所以这里向大家推荐一个必备插件android layout id converter。
配置完毕后仅仅须要在xml文件右键点击Convert android layout xml,然后在你activity中仅仅须要粘贴,就能够帮助你自己主动生成代码。例如以下这些就是自己主动生成的:
private WheelView wheelview;
private ScrollView scrollView1;
private LinearLayout vName;
private EditText etName;
private LinearLayout vMobile;
private EditText etMobile;
private EditText etCard;
private EditText etCarOwnerName;
private LinearLayout vCarOwnerMobile;
private EditText etCarOwnerMobile;
private EditText etInsuranceCompany;
private EditText etInsuranceNum;
private EditText etBank;
private EditText etBankNumber;
private RelativeLayout vCarType;
private AppCompatSpinner spCarType;
private EditText etCarTonnage;
private TextView tvCarNum;
private EditText etCarNum;
private LinearLayout vTrailerCarNum;
private TextView tvTrailerCarNum;
private EditText etTrailerCarNum;
private ImageView iv1;
private ImageView iv3;
private ImageView iv5;
private ImageView iv2;
private ImageView iv4;
private EditText etFamilyName;
private EditText etFamilyTel;
private EditText etRelation;
private Button btnSubmit;
private void assignViews() {
wheelview = (WheelView) findViewById(R.id.wheelview);
scrollView1 = (ScrollView) findViewById(R.id.scrollView1);
vName = (LinearLayout) findViewById(R.id.v_name);
etName = (EditText) findViewById(R.id.et_name);
vMobile = (LinearLayout) findViewById(R.id.v_mobile);
etMobile = (EditText) findViewById(R.id.et_mobile);
etCard = (EditText) findViewById(R.id.et_card);
etCarOwnerName = (EditText) findViewById(R.id.et_carOwnerName);
vCarOwnerMobile = (LinearLayout) findViewById(R.id.v_carOwnerMobile);
etCarOwnerMobile = (EditText) findViewById(R.id.et_carOwnerMobile);
etInsuranceCompany = (EditText) findViewById(R.id.et_insuranceCompany);
etInsuranceNum = (EditText) findViewById(R.id.et_insuranceNum);
etBank = (EditText) findViewById(R.id.et_bank);
etBankNumber = (EditText) findViewById(R.id.et_bankNumber);
vCarType = (RelativeLayout) findViewById(R.id.v_carType);
spCarType = (AppCompatSpinner) findViewById(R.id.sp_carType);
etCarTonnage = (EditText) findViewById(R.id.et_car_tonnage);
tvCarNum = (TextView) findViewById(R.id.tv_carNum);
etCarNum = (EditText) findViewById(R.id.et_carNum);
vTrailerCarNum = (LinearLayout) findViewById(R.id.v_trailerCarNum);
tvTrailerCarNum = (TextView) findViewById(R.id.tv_trailerCarNum);
etTrailerCarNum = (EditText) findViewById(R.id.et_trailerCarNum);
iv1 = (ImageView) findViewById(R.id.iv1);
iv3 = (ImageView) findViewById(R.id.iv3);
iv5 = (ImageView) findViewById(R.id.iv5);
iv2 = (ImageView) findViewById(R.id.iv2);
iv4 = (ImageView) findViewById(R.id.iv4);
etFamilyName = (EditText) findViewById(R.id.et_family_name);
etFamilyTel = (EditText) findViewById(R.id.et_family_tel);
etRelation = (EditText) findViewById(R.id.et_relation);
btnSubmit = (Button) findViewById(R.id.btn_submit);
}
Android Studio “懒人”必备插件android layout id converter的更多相关文章
- 懒人模式开启Android模块自动化Api之旅
推荐阅读: 滴滴Booster移动App质量优化框架-学习之旅 一 Android 模块Api化演练 不一样视角的Glide剖析(一) 在将业务进行模块化时,避免不了模块页面路由和模块通信, 大多数我 ...
- 【原创】窥视懒人的秘密---android下拉刷新开启手势的新纪元
小飒的成长史原创作品:窥视懒人的秘密---android下拉刷新开启手势的新纪元转载请注明出处 **************************************************** ...
- Android studio新建文件出现setContentView(R.layout.activity_main);中的R标红错误解决方法
今天打开Android studio突然出现了setContentView(R.layout.activity_main);中的R标红错误,这已经不是第一次出现这个错误了,真心的觉得Android s ...
- AMD CPU环境下使用android studio,eclipse的Genymotion插件
1.下载安装VirtualBox Genymotion的运行需要此环境(链接) 2.下载安装android模拟器Genymotion 由于官网的下载速度过慢,建议直接百度下载Genymotion(链接 ...
- 【Android Studio使用教程3】Android Studio的一些设置 体验更好了
Android Studio 简单设置 界面设置 默认的 Android Studio 为灰色界面,可以选择使用炫酷的黑色界面. Settings --> Appearance --> T ...
- Android Studio xcode单步调试 WebRTC Android & iOS
mac环境 如何在 Android Studio 里单步调试 WebRTC Android 的 native 代码. WebRTC 代码下载 depot tools 是 chromium 代码库管理工 ...
- android studio 导入一个已有的android studio project作为lib使用
android studio 导入一个已有的android studio project作为lib使用 新项目来了. 需要搭建框架. android studio对我来说还是很陌生,之前一个项目在同事 ...
- 解决Android Studio Conflict with dependency 'com.android.support:support-annotations'报错
解决Android Studio Conflict with dependency 'com.android.support:support-annotations'报错 在Android Studi ...
- Android studio 安装与配置【Android学习入门】
终于下定决心认真学习Android开发了. 之前在很多平台看到很多大牛们学习Android的经验和心得,纸上得来终觉浅. 这里推荐stormzhang老师总结的Android学习之路. 为了防止电脑卡 ...
随机推荐
- Matlab 7.1安装及打不开问题解决
一.安装方法 1.解压[MATLAB.V7.1.Windows版本号].MATLAB.V7.1.R14.SP3.CD1.iso,双击setup进行安装,输入username,单位,找到crac ...
- 微软收购跨平台移动开发公司Xamarin
摘要:北京时间2月25日早间消息,微软周三宣布收购创业公司Xamarin,这也是该公司为了吸引更多软件工程师为其云计算服务编写程序而采取的最新举措.古斯里表示,总部位于旧金山的Xamarin创立于20 ...
- WSAEventSelect模型编程 详解
转自:http://blog.csdn.net/wangjieest/article/details/7042108 WSAEventSelect模型编程 WSAEventSelect模型编程这个模型 ...
- Android App组件之Fragment说明和示例
Android App组件之Fragment说明和示例 1 Fragement介绍 Android从3.0开始引入Fragment,主要是为了支持更动态更灵活的界面设计. Fragment是activ ...
- tms web core介绍
tms web core介绍 TMS Web CORE是基于将Delphi UI代码编译为javascript并以此方式创建的 称为单页应用程序.TMS Web核心应用程序可以包含多个表单. 这些多个 ...
- ECSHOP商城网站建设之自定义调用广告方法(二)
原文地址:http://www.cnblogs.com/zgzy/p/3598991.html 使用ecshop进行商城网站建设时,ecshop默认的很多功能对于我们个性化设计之后不太使用.今天我们主 ...
- iOS 程序插件及功能动态更新思路
所用框架及语言 iOS客户端-Wax(开发愤怒的小鸟的连接Lua 和 Objc的框架),Lua,Objc, 服务端-Java(用于返回插件页面) 工具框架链接地址:Wax - https://gith ...
- poj 3041(最大匹配问题)
http://poj.org/problem?id=3041 Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions ...
- Linux学习19-gitlab配置邮箱postfix(新用户激活邮件)
前言 gitlab新增新用户有两种方式,第一种可以用户主动注册(自己设置密码):第二种也可以通过root管理员用户直接添加用户,发个邮件到用户的邮箱里,收到邮件后激活. 如果是第二种方式添加新用户的话 ...
- 如何在Windows下运行linux shell脚本
在工作中情况会在碰到linux下进行执行shell的脚本,而就会使用shell的脚本,但经常使用的Windows的系统,而想在Windows电脑中进行直接shell的脚本,而不用再进行学习其它的脚本语 ...