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


Java DelayedConfirmationView类代码示例

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


DelayedConfirmationView类属于android.support.wearable.view包,在下文中一共展示了DelayedConfirmationView类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (getIntent() != null) {
        String action = getIntent().getAction();
        if (ACTION_CLOSE_SUNROOF.equals(action)) {
            mActionMode = ACTION_MODE_CLOSE_SUNROOF;
        } else if (ACTION_LOCK_DOOR.equals(action)) {
            mActionMode = ACTION_MODE_LOCK_DOOR;
        } else if (ACTION_START_CHARGING.equals(action)) {
            mActionMode = ACTION_MODE_START_CHARGING;
        }
    }
    setContentView(R.layout.activity_notification_confirmation);
    mDelayedConfirmation = (DelayedConfirmationView) findViewById(R.id.delayed_confirm);
    mConfirmationText = (TextView) findViewById(R.id.confirmation_text);
    initView();
}
 
开发者ID:eleks,项目名称:rnd-android-wear-tesla,代码行数:19,代码来源:ConfirmationNotificationActivity.java

示例2: 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

示例3: 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

示例4: onCreateView

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
                         ViewGroup container, Bundle savedInstanceState) {

    // Inflate and customize the UI from its XML layout definition
    final View view = inflater.inflate(R.layout.fragment_view, container, false);
    mConfirmationView = (DelayedConfirmationView)
            view.findViewById(R.id.delayed_confirm);
    mConfirmationView.setImageDrawable(getResources().
            getDrawable(R.drawable.ic_close_door));
    mTextView = (TextView) view.findViewById(R.id.label);
    mTextView.setText("Fechar Porta");
    return view;
}
 
开发者ID:LADOSSIFPB,项目名称:-gdgjp-HackGDGIO2015-IFOpenDoors,代码行数:15,代码来源:FragmentCloseDoor.java

示例5: onCreateView

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater,
                         ViewGroup container, Bundle savedInstanceState) {

    // Inflate and customize the UI from its XML layout definition
    final View view = inflater.inflate(R.layout.fragment_view, container, false);
    mConfirmationView = (DelayedConfirmationView)
            view.findViewById(R.id.delayed_confirm);
    mConfirmationView.setImageDrawable(getResources().
            getDrawable(R.drawable.ic_open_door));
    mTextView = (TextView) view.findViewById(R.id.label);
    mTextView.setText("Abrir Porta");
    return view;
}
 
开发者ID:LADOSSIFPB,项目名称:-gdgjp-HackGDGIO2015-IFOpenDoors,代码行数:15,代码来源:FragmentOpenDoor.java

示例6: onCreate

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_annotate_smoking);

    sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
    final Annotate me = this;

    final WatchViewStub stub = (WatchViewStub) findViewById(R.id.watch_view_stub);
    stub.setOnLayoutInflatedListener(new WatchViewStub.OnLayoutInflatedListener() {
        @Override
        public void onLayoutInflated(WatchViewStub watchViewStub) {
            delayedConfirmationView = (DelayedConfirmationView) findViewById(R.id.delayed_confirmation);
            delayedConfirmationView.setListener(me);

            delayedConfirmationView.setTotalTimeMs(NUM_SECONDS * 1000);
            delayedConfirmationView.start();
        }
    });



 mGoogleApiClient = new GoogleApiClient.Builder(this)
   .addApi(Wearable.API)
   .addOnConnectionFailedListener(this)
   .build();
}
 
开发者ID:m-philipp,项目名称:AndroidSensorLogger,代码行数:29,代码来源:Annotate.java

示例7: 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

示例8: onTimerSelected

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
public void onTimerSelected(View v) {
    v.setPressed(true);
    Notification notification = new NotificationCompat.Builder(this)
            .setSmallIcon(R.drawable.ic_launcher)
            .setContentTitle(getString(R.string.notification_title))
            .setContentText(getString(R.string.notification_timer_selected))
            .build();
    NotificationManagerCompat.from(this).notify(0, notification);
    sendMessageToCompanion(TIMER_SELECTED_PATH);
    // Prevent onTimerFinished from being heard.
    ((DelayedConfirmationView) v).setListener(null);
    finish();
}
 
开发者ID:mauimauer,项目名称:AndroidWearable-Samples,代码行数:15,代码来源:MainActivity.java

示例9: 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

示例10: onCreateView

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_add_note, container, false);
    mConfirmationView = (DelayedConfirmationView) view.findViewById(R.id.confirm_notes);
    mAddNotesTextView = (TextView) view.findViewById(R.id.add_notes_label);
    return view;
}
 
开发者ID:SimoneCasagranda,项目名称:android-wear-tutorial,代码行数:8,代码来源:AddNoteFragment.java

示例11: onCreateView

import android.support.wearable.view.DelayedConfirmationView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_buy_book, container, false);
    mConfirmationView = (DelayedConfirmationView) view.findViewById(R.id.confirm_buy);
    return view;
}
 
开发者ID:SimoneCasagranda,项目名称:android-wear-tutorial,代码行数:7,代码来源:BuyBookFragment.java


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