Skip to content

Instantly share code, notes, and snippets.

@akisute
Last active August 29, 2015 14:15
Show Gist options
  • Save akisute/e92ca40a4e3207ccc843 to your computer and use it in GitHub Desktop.
Save akisute/e92ca40a4e3207ccc843 to your computer and use it in GitHub Desktop.
Hello, Android Wear!
public class MainActivity extends Activity {
@InjectView(R.id.text)
TextView mTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final Object activity = this;
final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
@Override
public void onLayoutInflated(WatchViewStub stub) {
ButterKnife.inject(activity, stub);
mTextView.setText("God Fuck");
}
});
}
@Override
protected void onStart() {
super.onStart();
//mTextView.setText("God Fuck");
}
@Override
protected void onResume() {
super.onResume();
//mTextView.setText("God Fuck");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment