Search in sources :

Example 31 with SimpleDraweeView

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;
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView)

Example 32 with SimpleDraweeView

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;
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView)

Example 33 with SimpleDraweeView

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));
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView)

Example 34 with SimpleDraweeView

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();
        }
    });
}
Also used : EditText(android.widget.EditText) KeyEvent(android.view.KeyEvent) Button(android.widget.Button) TextView(android.widget.TextView) TextView(android.widget.TextView) SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) View(android.view.View)

Example 35 with SimpleDraweeView

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;
}
Also used : PlayingActivity(com.wm.remusic.activity.PlayingActivity) Handler(android.os.Handler) Intent(android.content.Intent) ImageView(android.widget.ImageView) TintImageView(com.bilibili.magicasakura.widgets.TintImageView) SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) View(android.view.View) TextView(android.widget.TextView)

Aggregations

SimpleDraweeView (com.facebook.drawee.view.SimpleDraweeView)58 View (android.view.View)30 TextView (android.widget.TextView)20 Uri (android.net.Uri)8 DraweeController (com.facebook.drawee.interfaces.DraweeController)8 Intent (android.content.Intent)6 ImageView (android.widget.ImageView)5 RecyclerView (android.support.v7.widget.RecyclerView)4 Button (android.widget.Button)4 TintImageView (com.bilibili.magicasakura.widgets.TintImageView)4 RoundingParams (com.facebook.drawee.generic.RoundingParams)4 Animatable (android.graphics.drawable.Animatable)3 ViewGroup (android.view.ViewGroup)3 AdapterView (android.widget.AdapterView)3 CompoundButton (android.widget.CompoundButton)3 LinearLayout (android.widget.LinearLayout)3 SwitchCompat (androidx.appcompat.widget.SwitchCompat)3 BaseControllerListener (com.facebook.drawee.controller.BaseControllerListener)3 ControllerListener (com.facebook.drawee.controller.ControllerListener)3 ProgressBarDrawable (com.facebook.drawee.drawable.ProgressBarDrawable)3