mirror of
https://github.com/niushuai233/DevControl.git
synced 2024-10-27 22:43:20 +08:00
feat: 提交内容
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package cc.niushuai.project.devcontrol.base.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.TypedValue;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class UiUtil {
|
||||
|
||||
@@ -11,4 +13,8 @@ public class UiUtil {
|
||||
return (int) TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP, dipValue, r.getDisplayMetrics());
|
||||
}
|
||||
|
||||
public static String getTextViewTextById(Activity activity, int id) {
|
||||
return ((TextView) activity.findViewById(id)).getText().toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user