gpt4 book ai didi

android.support.wearable.view.WearableListView.setClickListener()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 12:05:05 32 4
gpt4 key购买 nike

本文整理了Java中android.support.wearable.view.WearableListView.setClickListener()方法的一些代码示例,展示了WearableListView.setClickListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WearableListView.setClickListener()方法的具体详情如下:
包路径:android.support.wearable.view.WearableListView
类名称:WearableListView
方法名:setClickListener

WearableListView.setClickListener介绍

暂无

代码示例

代码示例来源:origin: AmazMod/AmazMod

private void loadAdapter(String header) {
  mHeader.setText(header);
  mAdapter = new MenuListAdapter(this, items);
  listView.setAdapter(mAdapter);
  listView.addOnScrollListener(mOnScrollListener);
  listView.setClickListener(this);
}

代码示例来源:origin: AmazMod/AmazMod

private void loadAdapter(String header) {
  mHeader.setText(header);
  mAdapter = new MenuListAdapter(mContext, items);
  listView.setAdapter(mAdapter);
  listView.addOnScrollListener(mOnScrollListener);
  listView.setClickListener(this);
}

代码示例来源:origin: NordicSemiconductor/Android-nRF-Toolbox

@Override
protected void onCreate(final Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_list);
  // Check if the WEAR device is connected to the UART device itself, or by the phone.
  // Binding will fail if we are using phone as proxy as the service has not been started before.
  final Intent service = new Intent(this, BleProfileService.class);
  bindService(service, mServiceConnection, 0);
  final WearableListView listView = findViewById(R.id.list);
  listView.setClickListener(this);
  listView.setAdapter(mAdapter = new UARTConfigurationsAdapter(this));
  mGoogleApiClient = new GoogleApiClient.Builder(this)
      .addApi(Wearable.API)
      .addConnectionCallbacks(this)
      .addOnConnectionFailedListener(this)
      .build();
  // Register the broadcast receiver that will listen for events from the device
  final IntentFilter filter = new IntentFilter();
  filter.addAction(BleProfileService.BROADCAST_CONNECTION_STATE);
  filter.addAction(BleProfileService.BROADCAST_ERROR);
  LocalBroadcastManager.getInstance(this).registerReceiver(mServiceBroadcastReceiver, filter);
}

代码示例来源:origin: googlesamples/android-Timer

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  int paramLength = getIntent().getIntExtra(AlarmClock.EXTRA_LENGTH, 0);
  if (Log.isLoggable(TAG, Log.DEBUG)) {
    Log.d(TAG, "SetTimerActivity:onCreate=" + paramLength);
  }
  if (paramLength > 0 && paramLength <= 86400) {
    long durationMillis = paramLength * 1000;
    setupTimer(durationMillis);
    finish();
    return;
  }
  Resources res = getResources();
  for (int i = 0; i < NUMBER_OF_TIMES; i++) {
    mTimeOptions[i] = new ListViewItem(
        res.getQuantityString(R.plurals.timer_minutes, i + 1, i + 1),
        (i + 1) * 60 * 1000);
  }
  setContentView(R.layout.timer_set_timer);
  // Initialize a simple list of countdown time options.
  mWearableListView = (WearableListView) findViewById(R.id.times_list_view);
  mWearableListView.setAdapter(new TimerWearableListViewAdapter(this));
  mWearableListView.setClickListener(this);
}

代码示例来源:origin: NordicSemiconductor/Android-nRF-Toolbox

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_list_with_header);
  // Get the list component from the layout of the activity
  final WearableListView listView = findViewById(R.id.devices_list);
  listView.setAdapter(mDeviceAdapter = new DevicesAdapter(listView));
  listView.setClickListener(mOnRowClickListener);
  listView.addOnScrollListener(mOnScrollListener);
  // The header will be moved as the list is scrolled
  mHeader = findViewById(R.id.header);
  // Register a broadcast receiver that will listen for events from the service.
  LocalBroadcastManager.getInstance(this).registerReceiver(mServiceBroadcastReceiver, BleProfileService.makeIntentFilter());
}

代码示例来源:origin: AmazMod/AmazMod

listView.setClickListener(this);
listView.addOnScrollListener(mOnScrollListener);

代码示例来源:origin: googlesamples/android-WatchFace

listView.setClickListener(this);
listView.addOnScrollListener(this);

代码示例来源:origin: marcouberti/american_sunsets_watch_face

listView.setClickListener(this);
listView.addOnScrollListener(this);

代码示例来源:origin: AmazMod/AmazMod

listView.setGreedyTouchMode(true);
listView.addOnScrollListener(mOnScrollListener);
listView.setClickListener(this);

代码示例来源:origin: AmazMod/AmazMod

listView.setGreedyTouchMode(true);
listView.addOnScrollListener(mOnScrollListener);
listView.setClickListener(this);

代码示例来源:origin: marcouberti/american_sunsets_watch_face

listView.setClickListener(this);
listView.addOnScrollListener(this);

代码示例来源:origin: nglauber/dominando_android2

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main_wear);
  setAmbientEnabled();
  String[] dados = new String[] {
      "Opção 1", "Opção 2", "Opção 3", "Opção 4"
  };
  mAdapter = new MeuListAdapter(this, dados);
  mListView = (WearableListView) findViewById(R.id.wearable_list);
  mListView.setAdapter(mAdapter);
  mListView.setClickListener(new WearableListView.ClickListener() {
    @Override
    public void onClick(WearableListView.ViewHolder viewHolder) {
      int position = viewHolder.getAdapterPosition();
      // Clicou em um item da lista...
      if (position == 3) {
        mListView.setVisibility(View.GONE);
        exibirConfirmacao();
      }
    }
    @Override
    public void onTopEmptyRegionClick() {
      // Clicou na parte superior vazia da lista
    }
  });
}

代码示例来源:origin: SMSTicket/sms-ticket

vList.setClickListener(new WearableListView.ClickListener() {
  @Override
  public void onClick(WearableListView.ViewHolder viewHolder) {

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com