本文整理了Java中android.view.MenuItem.getTitleCondensed()
方法的一些代码示例,展示了MenuItem.getTitleCondensed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.getTitleCondensed()
方法的具体详情如下:
包路径:android.view.MenuItem
类名称:MenuItem
方法名:getTitleCondensed
暂无
代码示例来源:origin: square/assertj-android
public MenuItemAssert hasCondensedTitle(CharSequence title) {
isNotNull();
CharSequence actualTitle = actual.getTitleCondensed();
assertThat(actualTitle) //
.overridingErrorMessage("Expected condensed title <%s> but was <%s>.", title,
actualTitle) //
.isEqualTo(title);
return this;
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
public CharSequence getTitleCondensed() {
return mNativeItem.getTitleCondensed();
}
代码示例来源:origin: com.willowtreeapps/oak-demos
@Override
public CharSequence getTitleCondensed() {
return mNativeItem.getTitleCondensed();
}
代码示例来源:origin: com.squareup.assertj/assertj-android
public MenuItemAssert hasCondensedTitle(CharSequence title) {
isNotNull();
CharSequence actualTitle = actual.getTitleCondensed();
assertThat(actualTitle) //
.overridingErrorMessage("Expected condensed title <%s> but was <%s>.", title,
actualTitle) //
.isEqualTo(title);
return this;
}
代码示例来源:origin: ABTSoftware/SciChart.Android.Examples
@Override
public boolean onNavigationItemSelected(MenuItem item) {
String category = String.valueOf(item.getTitleCondensed());
navigationView.setCheckedItem(item.getItemId());
selectedPosition = categories.indexOf(category);
updateLoadExamples(selectedPosition);
tryCloseDrawer();
return true;
}
代码示例来源:origin: derry/delion
private void setupStandardMenuItemViewHolder(StandardMenuItemViewHolder holder,
View convertView, final MenuItem item) {
// Set up the icon.
Drawable icon = item.getIcon();
holder.image.setImageDrawable(icon);
holder.image.setVisibility(icon == null ? View.GONE : View.VISIBLE);
holder.image.setChecked(item.isChecked());
holder.text.setText(item.getTitle());
holder.text.setContentDescription(item.getTitleCondensed());
boolean isEnabled = item.isEnabled();
// Set the text color (using a color state list).
holder.text.setEnabled(isEnabled);
// This will ensure that the item is not highlighted when selected.
convertView.setEnabled(isEnabled);
convertView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAppMenu.onItemClick(item);
}
});
}
代码示例来源:origin: hamidness/restring
bottomNavigationView.getMenu().getItem(item).getTitle().toString(), startsWith(getLanguage()));
assertThat("BottomNavigationView#" + item + "[titleCondensed]",
bottomNavigationView.getMenu().getItem(item).getTitleCondensed().toString(), startsWith(getLanguage()));
代码示例来源:origin: derry/delion
private void setupImageButton(TintedImageButton button, final MenuItem item) {
// Store and recover the level of image as button.setimageDrawable
// resets drawable to default level.
int currentLevel = item.getIcon().getLevel();
button.setImageDrawable(item.getIcon());
item.getIcon().setLevel(currentLevel);
if (item.isChecked()) {
button.setTint(ApiCompatibilityUtils.getColorStateList(
button.getResources(), R.color.blue_mode_tint));
}
button.setEnabled(item.isEnabled());
button.setFocusable(item.isEnabled());
button.setContentDescription(item.getTitleCondensed());
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAppMenu.onItemClick(item);
}
});
}
代码示例来源:origin: MCMrARM/revolution-irc
mDateFormat.setText(item.getTitleCondensed());
return false;
});
内容来源于网络,如有侵权,请联系作者删除!