Search in sources :

Example 6 with RingAccountViewModelImpl

use of cx.ring.account.RingAccountViewModelImpl in project ring-client-android by savoirfairelinux.

the class TVProfileCreationFragment method goToNext.

@Override
public void goToNext(RingAccountViewModel ringAccountViewModel) {
    GuidedStepFragment next;
    if (ringAccountViewModel.isLink()) {
        next = TVRingLinkAccountFragment.newInstance((RingAccountViewModelImpl) ringAccountViewModel);
    } else {
        next = TVRingAccountCreationFragment.newInstance((RingAccountViewModelImpl) ringAccountViewModel);
    }
    GuidedStepFragment.add(getFragmentManager(), next);
}
Also used : GuidedStepFragment(android.support.v17.leanback.app.GuidedStepFragment) RingAccountViewModelImpl(cx.ring.account.RingAccountViewModelImpl)

Example 7 with RingAccountViewModelImpl

use of cx.ring.account.RingAccountViewModelImpl in project ring-client-android by savoirfairelinux.

the class TVRingLinkAccountFragment method onViewCreated.

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    ((RingApplication) getActivity().getApplication()).getRingInjectionComponent().inject(this);
    super.onViewCreated(view, savedInstanceState);
    RingAccountViewModelImpl ringAccountViewModel = getArguments().getParcelable(RingAccountCreationFragment.KEY_RING_ACCOUNT);
    presenter.init(ringAccountViewModel);
    if (ringAccountViewModel.getPhoto() != null) {
        getGuidanceStylist().getIconView().setImageBitmap(ringAccountViewModel.getPhoto());
    }
}
Also used : RingAccountViewModelImpl(cx.ring.account.RingAccountViewModelImpl)

Example 8 with RingAccountViewModelImpl

use of cx.ring.account.RingAccountViewModelImpl in project ring-client-android by savoirfairelinux.

the class TVRingAccountCreationFragment method onViewCreated.

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    ((RingApplication) getActivity().getApplication()).getRingInjectionComponent().inject(this);
    // Bind the presenter to the view
    super.onViewCreated(view, savedInstanceState);
    RingAccountViewModelImpl ringAccountViewModel = getArguments().getParcelable(RingAccountCreationFragment.KEY_RING_ACCOUNT);
    if (ringAccountViewModel == null) {
        Log.e(TAG, "Not able to get model");
        return;
    }
    presenter.init(ringAccountViewModel);
    presenter.ringCheckChanged(false);
    Glide.with(getActivity()).load(ringAccountViewModel.getPhoto()).apply(AvatarFactory.getGlideOptions(true, false)).transition(DrawableTransitionOptions.withCrossFade()).into(getGuidanceStylist().getIconView());
}
Also used : RingAccountViewModelImpl(cx.ring.account.RingAccountViewModelImpl)

Aggregations

RingAccountViewModelImpl (cx.ring.account.RingAccountViewModelImpl)8 Bitmap (android.graphics.Bitmap)1 GuidedStepFragment (android.support.v17.leanback.app.GuidedStepFragment)1 VCard (ezvcard.VCard)1 FormattedName (ezvcard.property.FormattedName)1 Photo (ezvcard.property.Photo)1 Uid (ezvcard.property.Uid)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1