Skip to content

Instantly share code, notes, and snippets.

@ShikherVerma
Created September 17, 2017 05:40
Show Gist options
  • Save ShikherVerma/35867847dfe5eb7654aefa2a19eba1dc to your computer and use it in GitHub Desktop.
Save ShikherVerma/35867847dfe5eb7654aefa2a19eba1dc to your computer and use it in GitHub Desktop.
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class MainActivity extends Activity {
@BindView(R.id.text)
TextView text;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
}
@OnClick(R.id.button)
public void onButtonClick(View v) {
text.setText("Epoch :" + System.currentTimeMillis()/1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment