Gif in profile page
This commit is contained in:
parent
f9f334f920
commit
ff16fb5c17
|
@ -62,6 +62,7 @@ import android.widget.Toast;
|
|||
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.SimpleTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
|
||||
|
@ -619,17 +620,7 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
|
|||
|
||||
|
||||
}
|
||||
Glide.with(getApplicationContext())
|
||||
.asBitmap()
|
||||
.load(account.getAvatar())
|
||||
.into(new SimpleTarget<Bitmap>() {
|
||||
@Override
|
||||
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) {
|
||||
RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), Helper.addBorder(resource, account_pp.getContext()));
|
||||
circularBitmapDrawable.setCircular(true);
|
||||
account_pp.setImageDrawable(circularBitmapDrawable);
|
||||
}
|
||||
});
|
||||
Glide.with(getApplicationContext()).load(account.getAvatar()).apply(RequestOptions.circleCropTransform()).into(account_pp);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@android:color/white"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
|
@ -53,11 +53,13 @@
|
|||
app:layout_collapseMode="parallax"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:padding="10dp"
|
||||
android:padding="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:id="@+id/account_pp"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_scrollFlags="scroll"
|
||||
android:background="@drawable/circle_background_white"
|
||||
android:layout_centerInParent="true"
|
||||
tools:ignore="ContentDescription" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
|
|
|
@ -52,11 +52,13 @@
|
|||
app:layout_collapseMode="parallax"
|
||||
tools:ignore="ContentDescription" />
|
||||
<ImageView
|
||||
android:padding="10dp"
|
||||
android:padding="1dp"
|
||||
android:layout_margin="10dp"
|
||||
android:id="@+id/account_pp"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_scrollFlags="scroll"
|
||||
android:background="@drawable/circle_background_white"
|
||||
android:layout_centerInParent="true"
|
||||
tools:ignore="ContentDescription" />
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
|
|
Loading…
Reference in New Issue