Coder Social home page Coder Social logo

Comments (7)

ParfoisMeng avatar ParfoisMeng commented on May 20, 2024 1

这个需求。。说实话不太想做,建议你Clone下来自行修改。关键代码见此处

from android-butterknife-injections.

ParfoisMeng avatar ParfoisMeng commented on May 20, 2024

生成字段的规则与 Android ButterKnife Zelezny 一致。其规则大概:取出xml中控件ID,将下划线命名改为小驼峰命名,所以如果你很想要“m”开头那种,也许可以试试在xml中设置id加上“m”。

PS: 可能每个人的习惯不一样,我并不喜欢这种“m”开头的方式。

from android-butterknife-injections.

tainzhi avatar tainzhi commented on May 20, 2024

可以加个开关吗?ps.是不是需求太多了^_^

from android-butterknife-injections.

tainzhi avatar tainzhi commented on May 20, 2024

恩恩。谢谢非常耐心的指导。

from android-butterknife-injections.

ParfoisMeng avatar ParfoisMeng commented on May 20, 2024

@tainzhi 今天在看别的问题时发现原Android ButterKnife Zelezny是有这个功能的(详见下图),我测试了一下的确有效。你可以试一下看是否满足你的需求。

image

from android-butterknife-injections.

tainzhi avatar tainzhi commented on May 20, 2024

我看了下,的确可以,完全满足我的需求。太好了。非常非常感谢

from android-butterknife-injections.

mcxinyu avatar mcxinyu commented on May 20, 2024

这个 m 是 member(成员变量) 的意思,类似 static(静态变量) 就是 s 开头,java code 约定俗成的不就是这样么?
你可以试下用 idea 重命名变量,会给你对应的提示,就沿用了这种规范。

member
image
static
image

from android-butterknife-injections.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.