Vote count:
0
I want to load a ImageView and then fade it in. But for now it doesn't work.
Here is the code:
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// This code will always run on the UI thread, therefore is safe to modify UI elements.
ProgressBar pb_befree = (ProgressBar) getActivity().findViewById(R.id.pb_befree);
ImageView befree = (ImageView) getActivity().findViewById(R.id.befree);
befree.setImageResource(R.drawable.sc_befreejpg);
pb_befree.setVisibility(View.GONE);
Animation animFade;
animFade = AnimationUtils.loadAnimation(getActivity(), R.anim.motivation_fadein);
befree.setAnimation(animFade);
befree.setVisibility(View.VISIBLE);
XML:
<?xml version="1.0" encoding="utf-8"?>
<set>
<alpha xmlns:android="http://ift.tt/nIICcg"
android:propertyName="alpha"
android:valueType="floatType"
android:valueFrom="0"
android:valueTo="100"
android:duration="500"/>
</set>
I really don't know what I am doing wrong. I get no Exception or something. The animation is just missing.
asked 29 secs ago
ImageView Transition Animation after loading
Aucun commentaire:
Enregistrer un commentaire