| 1 |
package ${packageName}; |
| 2 |
|
| 3 |
import android.app.Activity; |
| 4 |
import android.os.Bundle; |
| 5 |
import android.support.wearable.view.WatchViewStub; |
| 6 |
import android.widget.TextView; |
| 7 |
|
| 8 |
public class ${activityClass} extends Activity { |
| 9 |
|
| 10 |
private TextView mTextView; |
| 11 |
|
| 12 |
@Override |
| 13 |
protected void onCreate(Bundle savedInstanceState) { |
| 14 |
super.onCreate(savedInstanceState); |
| 15 |
setContentView(R.layout.${layoutName}); |
| 16 |
final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub); |
| 17 |
stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() { |
| 18 |
@Override |
| 19 |
public void onLayoutInflated(WatchViewStub stub) { |
| 20 |
mTextView = (TextView) stub.findViewById(R.id.text); |
| 21 |
} |
| 22 |
}); |
| 23 |
} |
| 24 |
} |