本文整理汇总了Java中android.widget.IconTextView类的典型用法代码示例。如果您正苦于以下问题:Java IconTextView类的具体用法?Java IconTextView怎么用?Java IconTextView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IconTextView类属于android.widget包,在下文中一共展示了IconTextView类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onBindViewHolder
import android.widget.IconTextView; //导入依赖的package包/类
@Override
public void onBindViewHolder(ViewHolder viewHolder, Object item) {
ControlView controlView = (ControlView) viewHolder.view;
Control control = (Control) item;
controlView.setControl(control);
IconTextView fontIconIV = controlView.getIconTextView();
fontIconIV.setText(control.getFontId(), TextView.BufferType.NORMAL);
boolean isOn;
if (control == Control.SHUFFLE) {
isOn = SpotifyTvApplication.getInstance().getSpotifyPlayerController().isShuffleOn();
} else {
isOn = false;
}
controlView.toggleControlColor(isOn);
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:18,代码来源:ControlPresenter.java
示例2: onCreateView
import android.widget.IconTextView; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_contact, container, false);
View header = inflater.inflate(R.layout.list_header_contact, null, false);
ButterKnife.bind(this, root);
IconTextView iconWebSite = (IconTextView) header.findViewById(android.R.id.icon1);
IconTextView iconEmail = (IconTextView) header.findViewById(android.R.id.icon2);
TextView webSite = (TextView) header.findViewById(R.id.website);
TextView email = (TextView) header.findViewById(R.id.email);
iconWebSite.setTypeface(Iconify.getTypeface(getActivity()));
iconEmail.setTypeface(Iconify.getTypeface(getActivity()));
webSite.setText(App.SITE_URL.replace("http://", ""));
email.setText(App.CONTACT_EMAIL);
listView.addHeaderView(header);
listView.setAdapter(new ContactAdapter(getActivity(), Db.contacts));
return root;
}
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:21,代码来源:ContactFragment.java
示例3: setupInnerViewElements
import android.widget.IconTextView; //导入依赖的package包/类
@Override
public void setupInnerViewElements(ViewGroup parent, View view) {
// Retrieve elements
mTitle = (TextView) parent.findViewById(R.id.carddemo_myapps_main_inner_title);
IconTextView iTV = (IconTextView) parent.findViewById(R.id.card_icon);
if (mTitle != null)
mTitle.setText(title);
if (iTV != null) {
iTV.setText(getText(iconTextViewTextResource));
iTV.setTextColor(iconTextViewTextColor);
}
}
开发者ID:aminb,项目名称:mathtools,代码行数:17,代码来源:MainFragment.java
示例4: init
import android.widget.IconTextView; //导入依赖的package包/类
private void init() {
setOrientation(VERTICAL);
int size = getResources().getDimensionPixelSize(R.dimen.setting_view_size);
setLayoutParams(new ViewGroup.LayoutParams(size, size));
setBackgroundColor(getResources().getColor(R.color.setting_bg));
setFocusable(true);
setFocusableInTouchMode(true);
setGravity(Gravity.CENTER);
inflate(getContext(), R.layout.setting_view, this);
mIconTextView = (IconTextView) findViewById(R.id.setting_icon);
mTitleTV = (TextView) findViewById(R.id.setting_title);
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:15,代码来源:SettingView.java
示例5: openPlayersDialog
import android.widget.IconTextView; //导入依赖的package包/类
public static void openPlayersDialog(final Activity activity, final String teamName, String teamCategory, int teamRpa){
Db.getTeamPlayers(activity, teamName, teamCategory, teamRpa, new FindCallback<Player>() {
@Override
public void done(final List<Player> list, ParseException e) {
final View playersView = activity.getLayoutInflater().inflate(R.layout.dialog_players, null, false);
final ListView playersList = (ListView) playersView.findViewById(android.R.id.list);
IconTextView redCardsView = (IconTextView) playersView.findViewById(R.id.red_cards);
IconTextView yellowCardsView = (IconTextView) playersView.findViewById(R.id.yellow_cards);
redCardsView.setTypeface(Iconify.getTypeface(activity));
yellowCardsView.setTypeface(Iconify.getTypeface(activity));
ParseObject.pinAllInBackground(list);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
playersList.setAdapter(new PlayerAdapter(activity, list));
final NiftyDialogBuilder playerDialog = NiftyDialogBuilder.getInstance(activity);
playerDialog.setCustomView(playersView, activity)
.withTitle(teamName)
.withMessage(null)
.withDuration(300)
.withEffect(Effectstype.Fadein)
.withDialogColor(activity.getResources().getColor(R.color.primary_dark))
.withTitleColor(activity.getResources().getColor(R.color.accent))
.withButton1Text(activity.getString(R.string.close))
.setButton1Click(new View.OnClickListener() {
@Override
public void onClick(View v) {
playerDialog.dismiss();
}
});
playerDialog.show();
}
});
}
});
}
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:40,代码来源:Util.java
示例6: DrawerMenuHolder
import android.widget.IconTextView; //导入依赖的package包/类
public DrawerMenuHolder(View view) {
mIconTextView = (IconTextView) view.findViewById(R.id.drawer_left_list_item_icon);
mTextView = (TextView) view.findViewById(R.id.drawer_left_list_item_text);
}
开发者ID:wlemuel,项目名称:Cotable,代码行数:5,代码来源:DrawerMenuHolder.java
示例7: getIconTextView
import android.widget.IconTextView; //导入依赖的package包/类
public IconTextView getIconTextView() {
return mIconTextView;
}
开发者ID:wlemuel,项目名称:Cotable,代码行数:4,代码来源:DrawerMenuHolder.java
示例8: init
import android.widget.IconTextView; //导入依赖的package包/类
private void init() {
inflate(getContext(), R.layout.control_view, this);
mIconTextView = (IconTextView) findViewById(R.id.control_icon);
toggleControlColor(false);
}
开发者ID:sregg,项目名称:spotify-tv,代码行数:6,代码来源:ControlView.java
示例9: getEmptyView
import android.widget.IconTextView; //导入依赖的package包/类
public static View getEmptyView(Activity activity){
View emptyView = activity.getLayoutInflater().inflate(R.layout.empty, null);
IconTextView iconView = (IconTextView) emptyView.findViewById(android.R.id.icon);
iconView.setTypeface(Iconify.getTypeface(activity));
return emptyView;
}
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:7,代码来源:Util.java
示例10: onServiceConnected
import android.widget.IconTextView; //导入依赖的package包/类
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
MusicService.MusicBinder binder = (MusicService.MusicBinder) service;
// Get service
musicService = binder.getService();
// Pass song list
musicService.setSongs(songList);
musicService.setUIControls(seekBar, currentPosition, totalDuration);
musicBound = true;
// If we don't have any songs on SD, tell the user about that
if (songList.size() == 0)
findViewById(R.id.no_music).setVisibility(View.VISIBLE);
// Initialize interfaces
musicService.setOnSongChangedListener(new MusicService.OnSongChangedListener() {
ImageView artworkView = (ImageView) findViewById(R.id.playerArtwork);
ImageView previewArtworkView = (ImageView) findViewById(R.id.previewArtwork);
TextView previewSongTitle = (TextView) findViewById(R.id.previewSongTitle);
TextView previewSongArtist = (TextView) findViewById(R.id.previewSongArtist);
IconTextView previewPlayBtn = (IconTextView) findViewById(R.id.previewPlayBtn);
@Override
public void onSongChanged(Song song) {
Bitmap bitmap;
previewSongTitle.setText(song.getTitle());
previewSongArtist.setText(song.getArtist());
bitmap = song.getArtworkBitmap(getApplicationContext());
if (bitmap == null) return; // bitmap might be null.. if it is, dont do anything
artworkView.setImageBitmap(bitmap);
previewArtworkView.setImageBitmap(bitmap);
Bitmap blurredBitmap = bitmap.copy(bitmap.getConfig(), true);
applyBlur(25f, blurredBitmap);
// Scale the bitmap
Matrix matrix = new Matrix();
matrix.postScale(3f, 3f);
blurredBitmap = Bitmap.createBitmap(blurredBitmap, 0, 0, blurredBitmap.getWidth(), blurredBitmap.getHeight(), matrix, true);
((ImageView) findViewById(R.id.playerBg)).setImageBitmap(blurredBitmap);
}
@Override
public void onPlayerStatusChanged(int status) {
switch(status) {
case MusicService.PLAYING:
previewPlayBtn.setText("{fa-pause}");
fab.setImageDrawable(new IconDrawable(getApplicationContext(), Iconify.IconValue.fa_pause)
.colorRes(R.color.dark));
break;
case MusicService.PAUSED:
previewPlayBtn.setText("{fa-play}");
fab.setImageDrawable(new IconDrawable(getApplicationContext(), Iconify.IconValue.fa_play)
.colorRes(R.color.dark));
break;
}
}
});
musicService.setSong(0);
}
开发者ID:gorjuspixels,项目名称:LocalMusicPlayer,代码行数:62,代码来源:StartActivity.java
注:本文中的android.widget.IconTextView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论