gpt4 book ai didi

android.support.wearable.view.WearableListView类的使用及代码示例

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

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

WearableListView介绍

暂无

代码示例

代码示例来源: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: nglauber/dominando_android2

@Override
  public void onTimerSelected(View view) {
    mPodeFechar = false;
    messageView.setVisibility(View.GONE);
    mListView.setVisibility(View.VISIBLE);
  }
});

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

public void showConfirm() {
  //listView.getAnimation().setFillAfter(false);
  listView.setVisibility(View.GONE);
  mHeader.setVisibility(View.GONE);
  confirmView.setVisibility(View.VISIBLE);
  listView.setClickable(false);
  listView.clearAnimation();
  confirmView.requestFocus();
  confirmView.setClickable(true);
}

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

public void hideConfirm() {
  //confirmView.getAnimation().setFillAfter(false);
  confirmView.setVisibility(View.GONE);
  mHeader.setVisibility(View.VISIBLE);
  listView.setVisibility(View.VISIBLE);
  confirmView.setClickable(false);
  confirmView.clearAnimation();
  listView.requestFocus();
  listView.setClickable(true);
}

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

listView.setHasFixedSize(true);
listView.setClickListener(this);
listView.addOnScrollListener(this);
listView.setAdapter(new ColorListAdapter(colors));

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

listView.setVisibility(View.GONE);
progressBar.setVisibility(View.VISIBLE);
listView.setLongClickable(true);
listView.setGreedyTouchMode(true);
listView.addOnScrollListener(mOnScrollListener);
listView.setClickListener(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) {
vList.addOnScrollListener(new WearableListView.OnScrollListener() {
  @Override
  public void onScroll(int i) {

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

@Subscribe
public void onCitiesList(CitiesEvent event) {
  mCities = event.getCities();
  if (mCities != null && mCities.size() > 0) {
    mCitiesAdapter = new CitiesAdapter(MainActivity.this, mCities);
    vList.setAdapter(mCitiesAdapter);
    loadBackground(0);
  } else {
    vTxtError.setVisibility(View.VISIBLE);
    vTxtError.setText(R.string.error_general);
  }
}

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

listView.setHasFixedSize(true);
listView.setClickListener(this);
listView.addOnScrollListener(this);
listView.setAdapter(new ColorListAdapter(colors));

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

Log.i(Constants.TAG,"WearAppsFragment loadApps");
wearAppsFrameLayout.setVisibility(View.VISIBLE);
listView.setVisibility(View.GONE);
progressBar.setVisibility(View.VISIBLE);
listView.setLongClickable(true);
listView.setGreedyTouchMode(true);
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: AmazMod/AmazMod

public void showConfirm() {
  //listView.getAnimation().setFillAfter(false);
  listView.setVisibility(View.GONE);
  mHeader.setVisibility(View.GONE);
  confirmView.setVisibility(View.VISIBLE);
  listView.setClickable(false);
  listView.clearAnimation();
  confirmView.requestFocus();
  confirmView.setClickable(true);
}

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

public void hideConfirm() {
  //confirmView.getAnimation().setFillAfter(false);
  confirmView.setVisibility(View.GONE);
  mHeader.setVisibility(View.VISIBLE);
  listView.setVisibility(View.VISIBLE);
  confirmView.setClickable(false);
  confirmView.clearAnimation();
  listView.requestFocus();
  listView.setClickable(true);
}

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

listView.setHasFixedSize(true);
listView.setClickListener(this);
listView.addOnScrollListener(this);
listView.setAdapter(new ColorListAdapter(colors));
mPeerId = getIntent().getStringExtra(WatchFaceCompanion.EXTRA_PEER_ID);
mGoogleApiClient = new GoogleApiClient.Builder(this)

代码示例来源: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

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

代码示例来源: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: AmazMod/AmazMod

public void hideInfo(View v) {
  infoView.setVisibility(View.GONE);
  listView.setVisibility(View.VISIBLE);
}

代码示例来源: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());
}

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