All Projects → wangzailfm → Generatefindviewbyid

wangzailfm / Generatefindviewbyid

【暂停更新-20171212】Android Studio Plugin, Can input, can be selected to auto generator findViewById code in Activity or etc, support ButterKnife(version 8.4.0), support ViewHolder.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Generatefindviewbyid

Open Source Android Weather App
☔️ Open source android weather app. See "Issues" tab for current tasks queue. Tasks suitable for beginners are labeled with green "beginner friendly" tags.
Stars: ✭ 81 (-44.14%)
Mutual labels:  butterknife
Annotation Processing Example
It is the example project for the annotation processing tutorial.
Stars: ✭ 116 (-20%)
Mutual labels:  butterknife
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (-12.41%)
Mutual labels:  generate
Searchitem
小搜搜——商品条形码/二维码搜索APP
Stars: ✭ 96 (-33.79%)
Mutual labels:  butterknife
Zealot
一个轻量级的SQL和参数动态生成工具库
Stars: ✭ 109 (-24.83%)
Mutual labels:  generate
Foodsearch
Showcase project of MVP+Dagger+RxJava+StorIO
Stars: ✭ 117 (-19.31%)
Mutual labels:  butterknife
Cinematic
My shot at making a better IMDb App
Stars: ✭ 71 (-51.03%)
Mutual labels:  butterknife
Zenrpc
JSON-RPC 2.0 Server Implementation with SMD support written in Go (go generate)
Stars: ✭ 140 (-3.45%)
Mutual labels:  generate
Cli Spring Boot Scaffold
command line for generate crud and configs for spring boot projects
Stars: ✭ 113 (-22.07%)
Mutual labels:  generate
Docx
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
Stars: ✭ 2,150 (+1382.76%)
Mutual labels:  generate
Mvpframes
整合大量主流开源项目并且可高度配置化的 Android MVP 快速集成框架,支持 AndroidX
Stars: ✭ 100 (-31.03%)
Mutual labels:  butterknife
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-29.66%)
Mutual labels:  generate
Quick uicode
generate unity ui code quickly by editor(通过编辑器快速生成ui代码)
Stars: ✭ 119 (-17.93%)
Mutual labels:  generate
Larafast Fastapi
A Fast Laravel package to help you generate CRUD API Controllers and Resources, Model.. etc
Stars: ✭ 91 (-37.24%)
Mutual labels:  generate
Just Another Android App
An Android base app with loads of cool libraries/configuration NOT MAINTAINED
Stars: ✭ 1,654 (+1040.69%)
Mutual labels:  butterknife
Android Mvp Starter
Create/Generate your MVP projects easily
Stars: ✭ 72 (-50.34%)
Mutual labels:  butterknife
Mvparms
⚔️ A common architecture for Android applications developing based on MVP, integrates many open source projects, to make your developing quicker and easier (一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架).
Stars: ✭ 10,146 (+6897.24%)
Mutual labels:  butterknife
Swiftplate
Easily generate cross platform Swift framework projects from the command line
Stars: ✭ 1,746 (+1104.14%)
Mutual labels:  generate
Androidstarter
A sample Android app using the MVP architecture.
Stars: ✭ 140 (-3.45%)
Mutual labels:  butterknife
Offlinefirstreactiveapp Tutorial
Check out the blog post for more info
Stars: ✭ 120 (-17.24%)
Mutual labels:  butterknife

GenerateFindViewById

演示

FindViewById 演示

ButterKnife 演示 演示

更新

  • 1.4.2 Fix bugs with the same xml name for more than one Module.
  • 1.4.1 Code replace to Kotlin, add Forced Casts option, default true, and Replace code to Kotlin language.Revision 26.0.0 Beta 1 Important changes
  • 1.4 Variable names only support mAaBbCc and aaBbCc naming formats, The switch block adds the default statement.Alibaba Java Coding Guidelines
  • 1.3 Variable names support three naming formats: 1, mAaBbCc, 2, aa_bb_cc, 3, aaBbCc
  • 1.2.2 Onclick can select all or deselect all
  • 1.2.1 Fix ImageView and TextView can not click the OnClick option
  • 1.2 Support ViewHolder
  • 1.1.2 Button defaults to the OnClick option
  • 1.1 Support ButterKnife, version 8.4.0, shortcut keys Ctrl+Alt+Shift+E
  • 1.0 Support Activity and Fragment, shortcut keys Ctrl+Alt+E

安装

  • 下载项目里面的GenerateFindViewById.jar包,然后打开AS的Plugins,点击Install plugin from disk...安装
  • 打开AS的Plugins,点击Browse repositories...然后搜索GenerateFindViewById,然后安装

快捷键

  • FindViewById:Ctrl+Alt+E
  • ButterKnife:Ctrl+Alt+Shift+E

说明

  • 可输入布局字段,可选中布局文件字段,自动生成有id控件相应的代码
  • Activity如果没有onCreate方法,会先生成onCreate方法,再重新操作一次才生成有id控件相应的代码。
  • Fragment如果没有onCreateView方法,会先生成onCreateView方法,再重新操作一次才生成有id控件相应的代码。
  • 可选生成的字段,可编辑变量名,可选择是否LayoutInflater类型。
  • LayoutInflater类型生成的变量规则,如LayoutInflater的变量为mView,生成控件变量后面会加上View

用法

  1. 新建Activity或者Fragment后,选中布局按下快捷键Alt+Insert,然后选择FindViewById或者在菜单栏中的Code中选择FindViewById,或者直接使用快捷键Ctrl+Alt+E
  2. 如果没有选中布局,会弹出输入框,输入布局,插件会自动遍历布局列出所有带id的控件
  3. 会自动检测是否已有代码,可选择是否生成、是否生成OnClick代码,可编辑变量名
  4. 可选择是否生成View view = LayoutInflater.from(context).inflater()代码,可编辑生成的View的变量名
  5. 点击确认生成

ButterKnife用法

  1. 新建Activity或者Fragment后,选中布局按下快捷键Alt+Insert,然后选择ButterKnife或者在菜单栏中的Code中选择ButterKnife,或者直接使用快捷键Ctrl+Alt+Shift+E
  2. 如果没有选中布局,会弹出输入框,输入布局,插件会自动遍历布局列出所有带id的控件
  3. 会自动检测是否已有代码,可选择是否生成、是否生成OnClick代码,可编辑变量名
  4. 可选择是否生成View view = LayoutInflater.from(context).inflater()代码,可编辑生成的View的变量名
  5. 点击确认生成

规则

  1. Activity如果没有onCreate方法,会先生成onCreate方法,Fragment如果没有onCreateView方法,会先生成onCreateView方法
  2. 没有id的控件是不会识别到的
  3. 识别到的控件变量名为mAaBbCc命名
  4. 识别到的控件中有clickable = true属性,自动生成setOnClickListener代码和onClick方法
  5. 识别到的控件ButterKnife都可以生成到onClick方法
  6. 自动识别布局中的include标签, 读取对应布局中的控件
  7. 识别到的控件中有text或者hint属性,会自动生成里面的值到字段注释
  8. LayoutInflater生成的变量名规则为mAaBbCc+View的变量名(如mView会去掉m)
  9. ButterKnife生成的LayoutInflaterButterKnife.findById()来替换view.findViewById()

License

Copyright 2016 Jowan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].