Name: android_external_JakeWharton_butterknife
Owner: PAC-ROM
Description: null
Created: 2015-10-17 21:20:27.0
Updated: 2015-10-17 21:20:51.0
Pushed: 2015-10-17 21:20:48.0
Homepage: null
Size: 2420
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Field and method binding for Android views which uses annotation processing to generate boilerplate code for you.
findViewById
calls by using @Bind
on fields.@OnClick
and others.s ExampleActivity extends Activity {
ind(R.id.user) EditText username;
ind(R.id.pass) EditText password;
indString(R.string.login_error)
ring loginErrorMessage;
nClick(R.id.submit) void submit() {
// TODO call server...
verride public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.simple_activity);
ButterKnife.bind(this);
// TODO Use fields...
For documentation and additional information see the website.
Remember: A butter knife is like a dagger only infinitely less sharp.
Download the latest JAR or grab via Maven:
endency>
roupId>com.jakewharton</groupId>
rtifactId>butterknife</artifactId>
ersion>7.0.1</version>
pendency>
or Gradle:
ile 'com.jakewharton:butterknife:7.0.1'
Snapshots of the development version are available in Sonatype's snapshots
repository.
Copyright 2013 Jake Wharton
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.