本文整理汇总了Java中android.support.wearable.view.DelayedConfirmationView.setListener方法的典型用法代码示例。如果您正苦于以下问题:Java DelayedConfirmationView.setListener方法的具体用法?Java DelayedConfirmationView.setListener怎么用?Java DelayedConfirmationView.setListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.wearable.view.DelayedConfirmationView
的用法示例。
在下文中一共展示了DelayedConfirmationView.setListener方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.support.wearable.view.DelayedConfirmationView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_delete);
mDelayedConfirmationView = (DelayedConfirmationView) findViewById(R.id.delayed_confirmation);
mDelayedConfirmationView.setListener(this);
mDelayedConfirmationView.setTotalTimeMs(3000);
mDelayedConfirmationView.start();
}
示例2: onCreate
import android.support.wearable.view.DelayedConfirmationView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_confirmation);
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Wearable.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
mGoogleApiClient.connect();
mDelayedView = (DelayedConfirmationView) findViewById(R.id.delayed_confirm);
mDelayedView.setListener(this);
routeGradeLabelToSave = getIntent().getStringExtra(ClimbTrackerWear.EXTRA_ROUTE_GRADE_LABEL);
// change the recap text
TextView climbRecapText = (TextView) findViewById(R.id.climb_recap);
String recapString = getString(R.string.climb_recap, routeGradeLabelToSave);
climbRecapText.setText(recapString);
// Four seconds to cancel the action
mDelayedView.setTotalTimeMs(4000);
// Start the timer
mDelayedView.start();
}
示例3: onStartTimer
import android.support.wearable.view.DelayedConfirmationView; //导入方法依赖的package包/类
/**
* Handles the button to start a DelayedConfirmationView timer.
*/
public void onStartTimer(View view) {
DelayedConfirmationView delayedConfirmationView = (DelayedConfirmationView)
findViewById(R.id.timer);
delayedConfirmationView.setTotalTimeMs(NUM_SECONDS * 1000);
delayedConfirmationView.setListener(this);
delayedConfirmationView.start();
scroll(View.FOCUS_DOWN);
}