当前位置: 首页>>代码示例>>Java>>正文


Java DelayedConfirmationView.setTotalTimeMs方法代码示例

本文整理汇总了Java中android.support.wearable.view.DelayedConfirmationView.setTotalTimeMs方法的典型用法代码示例。如果您正苦于以下问题:Java DelayedConfirmationView.setTotalTimeMs方法的具体用法?Java DelayedConfirmationView.setTotalTimeMs怎么用?Java DelayedConfirmationView.setTotalTimeMs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.wearable.view.DelayedConfirmationView的用法示例。


在下文中一共展示了DelayedConfirmationView.setTotalTimeMs方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();

}
 
开发者ID:PacktPublishing,项目名称:Android-Wear-Projects,代码行数:11,代码来源:DeleteActivity.java

示例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();
}
 
开发者ID:google,项目名称:climb-tracker,代码行数:29,代码来源:ClimbConfirmation.java

示例3: onCreate

import android.support.wearable.view.DelayedConfirmationView; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle b) {
    super.onCreate(b);
    setContentView(R.layout.main_activity);
    delayedConfirmationView = (DelayedConfirmationView) findViewById(R.id.delayed_confirmation);
    delayedConfirmationView.setTotalTimeMs(NUM_SECONDS * 1000);
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .addApi(Wearable.API)
            .addOnConnectionFailedListener(this)
            .build();
}
 
开发者ID:mauimauer,项目名称:AndroidWearable-Samples,代码行数:12,代码来源:MainActivity.java

示例4: 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);
}
 
开发者ID:mauimauer,项目名称:AndroidWearable-Samples,代码行数:12,代码来源:MainActivity.java


注:本文中的android.support.wearable.view.DelayedConfirmationView.setTotalTimeMs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。