use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class MainActivity method findViewAndLoadUri.
private SimpleDraweeView findViewAndLoadUri(@IdRes int viewId, String uri) {
SimpleDraweeView view = findAndPrepare(viewId);
view.setImageURI(Uri.parse(uri));
return view;
}
use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class MainActivity method findViewAndSetController.
private SimpleDraweeView findViewAndSetController(@IdRes int viewId, DraweeController controller) {
SimpleDraweeView view = findAndPrepare(viewId);
view.setController(controller);
return view;
}
use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class DestinationActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.drawee_destination);
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) findViewById(R.id.image);
simpleDraweeView.setActualImageResource(R.drawable.test_image);
getWindow().setSharedElementEnterTransition(DraweeTransition.createTransitionSet(ScalingUtils.ScaleType.CENTER_CROP, ScalingUtils.ScaleType.FIT_CENTER));
getWindow().setSharedElementReturnTransition(DraweeTransition.createTransitionSet(ScalingUtils.ScaleType.FIT_CENTER, ScalingUtils.ScaleType.CENTER_CROP));
}
use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mSimpleDraweeView = (SimpleDraweeView) findViewById(R.id.simple_drawee_view);
final EditText editText = (EditText) findViewById(R.id.uri_edit_text);
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
final boolean isEnterKeyDown = (actionId == EditorInfo.IME_NULL) && (event.getAction() == KeyEvent.ACTION_DOWN);
if (isEnterKeyDown || actionId == EditorInfo.IME_ACTION_DONE) {
updateImageUri(Uri.parse(v.getText().toString()));
}
return false;
}
});
final Button clearButton = (Button) findViewById(R.id.clear_uri);
clearButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
editText.getText().clear();
}
});
}
use of com.facebook.drawee.view.SimpleDraweeView in project remusic by aa112901.
the class QuickControlsFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.bottom_nav, container, false);
this.rootView = rootView;
mPlayPause = (TintImageView) rootView.findViewById(R.id.control);
mProgress = (TintProgressBar) rootView.findViewById(R.id.song_progress_normal);
mTitle = (TextView) rootView.findViewById(R.id.playbar_info);
mArtist = (TextView) rootView.findViewById(R.id.playbar_singer);
mAlbumArt = (SimpleDraweeView) rootView.findViewById(R.id.playbar_img);
next = (ImageView) rootView.findViewById(R.id.play_next);
playQueue = (ImageView) rootView.findViewById(R.id.play_list);
mProgress.setProgressTintList(ThemeUtils.getThemeColorStateList(mContext, R.color.theme_color_primary));
mProgress.postDelayed(mUpdateProgress, 0);
mPlayPause.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPlayPause.setImageResource(MusicPlayer.isPlaying() ? R.drawable.playbar_btn_pause : R.drawable.playbar_btn_play);
mPlayPause.setImageTintList(R.color.theme_color_primary);
if (MusicPlayer.getQueueSize() == 0) {
Toast.makeText(MainApplication.context, getResources().getString(R.string.queue_is_empty), Toast.LENGTH_SHORT).show();
} else {
HandlerUtil.getInstance(MainApplication.context).postDelayed(new Runnable() {
@Override
public void run() {
MusicPlayer.playOrPause();
}
}, 60);
}
}
});
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
MusicPlayer.next();
}
}, 60);
}
});
playQueue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
PlayQueueFragment playQueueFragment = new PlayQueueFragment();
playQueueFragment.show(getFragmentManager(), "playqueueframent");
}
}, 60);
}
});
rootView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainApplication.context, PlayingActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApplication.context.startActivity(intent);
}
});
return rootView;
}
Aggregations