Search in sources :

Example 1 with UserInfo

use of win.pipi.api.data.UserInfo in project MyNewCC98 by 6769.

the class MainActivity method setupUserLogo.

private void setupUserLogo() {
    UserInfo userInfo = UserConfig.getUserInfo();
    if (userInfo != null) {
        userNameLabel.setText(userInfo.getName());
        // userIntroLabel.setText(userInfo.getIntroduction());
        String userpic = userInfo.getPortraitUrl();
        try {
            RequestOptions options = new RequestOptions().centerCrop().dontAnimate();
            Glide.with(this).load(userpic).apply(options).into(userLogo);
        } catch (Exception e) {
            loge(e, "Glide load userpic failed");
        }
    }
}
Also used : RequestOptions(com.bumptech.glide.request.RequestOptions) UserInfo(win.pipi.api.data.UserInfo)

Aggregations

RequestOptions (com.bumptech.glide.request.RequestOptions)1 UserInfo (win.pipi.api.data.UserInfo)1