- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
41 lines
1.3 KiB
Java
41 lines
1.3 KiB
Java
package com.helpshift.util;
|
|
|
|
import android.app.Activity;
|
|
import android.graphics.Color;
|
|
import android.view.View;
|
|
import android.webkit.ValueCallback;
|
|
import android.webkit.WebView;
|
|
import com.helpshift.log.HSLogger;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public abstract class ViewUtil {
|
|
public static void setVisibility(View view, boolean z) {
|
|
if (z) {
|
|
view.setVisibility(0);
|
|
} else {
|
|
view.setVisibility(8);
|
|
}
|
|
}
|
|
|
|
public static void setStatusBarColor(Activity activity, String str) {
|
|
if (activity != null) {
|
|
if (Utils.isNotEmpty(str) && Utils.isValidJsonString(str)) {
|
|
try {
|
|
activity.getWindow().setStatusBarColor(Color.parseColor(new JSONObject(str).optString("primaryColor", "#453FB9")));
|
|
return;
|
|
} catch (JSONException e) {
|
|
HSLogger.e("ViewUtil", "Error setting status bar color", e);
|
|
return;
|
|
}
|
|
}
|
|
activity.getWindow().setStatusBarColor(Color.parseColor("#453FB9"));
|
|
}
|
|
}
|
|
|
|
public static void callJavascriptCode(WebView webView, String str, ValueCallback valueCallback) {
|
|
webView.evaluateJavascript(str, valueCallback);
|
|
}
|
|
}
|