Back to project page WearPomodoro.
The source code is released under:
GNU General Public License
If you think the Android project WearPomodoro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (C) 2014 Alex Korovyansky.//w ww . ja v a 2 s .c o m */ package com.alexkorovyansky.wearpomodoro.app.base; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.wearable.view.WatchViewStub; import butterknife.ButterKnife; import hugo.weaving.DebugLog; public class BasePomodoroActivity extends Activity implements WatchViewStub.OnLayoutInflatedListener { @DebugLog @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @DebugLog @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); } @DebugLog public void setContentViews(int rectRoundLayoutResId) { setContentViews(rectRoundLayoutResId, rectRoundLayoutResId); } @DebugLog public void setContentViews(int rectLayoutResId, int roundLayoutResId) { WatchViewStub watchViewStub = new WatchViewStub(this); watchViewStub.setLayoutParams(new WatchViewStub.LayoutParams(WatchViewStub.LayoutParams.MATCH_PARENT, WatchViewStub.LayoutParams.MATCH_PARENT)); watchViewStub.setRectLayout(rectLayoutResId); watchViewStub.setRoundLayout(roundLayoutResId); watchViewStub.setOnLayoutInflatedListener(this); setContentView(watchViewStub); } @DebugLog @Override public void onLayoutInflated(WatchViewStub stub) { ButterKnife.inject(this, stub.getRootView()); } @DebugLog @Override protected void onStart() { super.onStart(); } @DebugLog @Override protected void onResume() { super.onResume(); } @DebugLog @Override protected void onPause() { super.onPause(); } @DebugLog @Override protected void onStop() { super.onStop(); } @DebugLog @Override protected void onDestroy() { super.onDestroy(); ButterKnife.reset(this); } }