Files
vtosters/app/src/main/java/ru/vtosters/hooks/WallpapersHooks.java
T
gdlbo 08dae9b342 Experimental proguard config with hooks refactoring (#1323)
fixed telegram stickers issue
speedup webview coloring
refactored VKUIHook
fixed duplication of eruda
added a check for duplication of adding styles for coloring vkui
2023-05-22 18:48:15 +03:00

20 lines
649 B
Java

package ru.vtosters.hooks;
import android.view.View;
import android.widget.ImageView;
import com.vk.im.engine.h;
import ru.vtosters.hooks.other.ThemesUtils;
import static ru.vtosters.lite.ui.wallpapers.WallpapersHooks.getWallpaper;
import static ru.vtosters.lite.ui.wallpapers.WallpapersHooks.hasWallpapers;
public class WallpapersHooks {
public static void setBg(View view) {
if (hasWallpapers()) {
((ImageView) view).setImageDrawable(getWallpaper()); // set picture to background
} else {
view.setBackgroundColor(ThemesUtils.getColorFromAttr(h.im_bg_chat)); // set default bg color
}
}
}