Search in sources :

Example 11 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project twicalico by moko256.

the class MainActivity method startMyUserActivity.

private void startMyUserActivity() {
    ActivityOptionsCompat animation = ActivityOptionsCompat.makeSceneTransitionAnimation(this, userImage, "icon_image");
    startActivity(ShowUserActivity.getIntent(this, GlobalApplication.userId), animation.toBundle());
}
Also used : ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 12 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project PainlessMusicPlayer by Doctoror.

the class PlaylistsFragment method goToRecentAlbumsActivity.

private void goToRecentAlbumsActivity(@NonNull final Activity context, final int position) {
    final long[] recentAlbums = mRecentActivityManager.getRecentlyPlayedAlbums();
    if (recentAlbums.length == 0) {
        Toast.makeText(context, R.string.You_played_no_albums_yet, Toast.LENGTH_LONG).show();
    } else {
        final Intent intent = Henson.with(context).gotoRecentAlbumsActivity().build();
        final View view = itemViewForPosition(position);
        if (view != null) {
            final ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(context, view, RecentAlbumsActivity.TRANSITION_NAME_ROOT);
            startActivity(intent, options.toBundle());
        } else {
            startActivity(intent);
        }
    }
}
Also used : Intent(android.content.Intent) BindView(butterknife.BindView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 13 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project BetterBatteryStats by asksven.

the class StatsAdapter method showInstalledPackageDetails.

public void showInstalledPackageDetails(Context context, String packageName, View view) {
    Intent intentPerms = new Intent(context, PackageInfoActivity.class);
    intentPerms.putExtra("package", packageName);
    // context.startActivity(intentPerms);
    View source_icon = view.findViewById(R.id.icon);
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(m_parent, source_icon, TRANSITION_NAME);
    ActivityCompat.startActivity(m_parent, intentPerms, options.toBundle());
}
Also used : Intent(android.content.Intent) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 14 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project samourai-wallet-android by Samourai-Wallet.

the class UTXODetailsActivity method setUTXOState.

void setUTXOState() {
    if (isBlocked()) {
        statusTextView.setText("Blocked");
    } else {
        statusTextView.setText(getText(R.string.spendable));
    }
    addressTextView.setText(addr);
    hashTextView.setText(hash);
    amountTextView.setText(df.format(((double) (amount) / 1e8)) + " BTC");
    if (isBIP47(addr)) {
        paynymLayout.setVisibility(View.VISIBLE);
        String pcode = BIP47Meta.getInstance().getPCode4AddrLookup().get(addr);
        ImageView avatar = paynymLayout.findViewById(R.id.paynym_avatar);
        paynymLayout.findViewById(R.id.paynym_list_container).setOnClickListener(view -> {
            ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, avatar, "profile");
            startActivity(new Intent(this, PayNymDetailsActivity.class).putExtra("pcode", pcode), options.toBundle());
        });
        if (pcode != null && pcode.length() > 0) {
            ((TextView) paynymLayout.findViewById(R.id.paynym_code)).setText(BIP47Meta.getInstance().getDisplayLabel(pcode));
            Picasso.with(getApplicationContext()).load(WebUtil.PAYNYM_API + pcode + "/avatar").into(avatar);
        } else {
            ((TextView) paynymLayout.findViewById(R.id.paynym_code)).setText(getText(R.string.paycode).toString());
        }
    }
}
Also used : Intent(android.content.Intent) TextView(android.widget.TextView) ImageView(android.widget.ImageView) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Example 15 with ActivityOptionsCompat

use of android.support.v4.app.ActivityOptionsCompat in project samourai-wallet-android by Samourai-Wallet.

the class PaynymListFragment method onPayNymItemClick.

public void onPayNymItemClick(String pcode, PaynymAdapter.ViewHolder holder) {
    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(getActivity(), holder.avatar, "profile");
    startActivity(new Intent(getActivity(), PayNymDetailsActivity.class).putExtra("pcode", pcode), options.toBundle());
}
Also used : Intent(android.content.Intent) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat)

Aggregations

ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)92 Intent (android.content.Intent)72 View (android.view.View)31 Pair (android.support.v4.util.Pair)18 ImageView (android.widget.ImageView)15 TextView (android.widget.TextView)14 RecyclerView (android.support.v7.widget.RecyclerView)13 Activity (android.app.Activity)12 OnClick (butterknife.OnClick)7 ActivityOptions (android.app.ActivityOptions)4 Context (android.content.Context)4 Bundle (android.os.Bundle)4 Handler (android.os.Handler)4 BindView (butterknife.BindView)4 CardView (android.support.v7.widget.CardView)3 Explode (android.transition.Explode)3 AdapterView (android.widget.AdapterView)3 LinearLayout (android.widget.LinearLayout)3 Uri (android.net.Uri)2 LayoutInflater (android.view.LayoutInflater)2