mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fixes
This commit is contained in:
@@ -26,7 +26,7 @@ public class CommonLayoutParams extends FrameLayout.LayoutParams {
|
|||||||
private static final StringBuilder sb = new StringBuilder();
|
private static final StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
public CommonLayoutParams() {
|
public CommonLayoutParams() {
|
||||||
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
|
super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.FILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float widthPercent = 0;
|
public float widthPercent = 0;
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ class TabStrip extends LinearLayout {
|
|||||||
private final SimpleTabColorizer mDefaultTabColorizer;
|
private final SimpleTabColorizer mDefaultTabColorizer;
|
||||||
|
|
||||||
private int mDefaultTabTextColor;
|
private int mDefaultTabTextColor;
|
||||||
private Integer mTabTextColor;
|
private int mTabTextColor = -1;
|
||||||
private Integer mSelectedTabTextColor;
|
private int mSelectedTabTextColor = -1;
|
||||||
|
|
||||||
TabStrip(Context context) {
|
TabStrip(Context context) {
|
||||||
this(context, null);
|
this(context, null);
|
||||||
@@ -98,21 +98,21 @@ class TabStrip extends LinearLayout {
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setTabTextColor(Integer color){
|
void setTabTextColor(int color){
|
||||||
mTabTextColor = color;
|
mTabTextColor = color;
|
||||||
updateTabsTextColor();
|
updateTabsTextColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer getTabTextColor(){
|
int getTabTextColor(){
|
||||||
return mTabTextColor;
|
return mTabTextColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSelectedTabTextColor(Integer color){
|
void setSelectedTabTextColor(int color){
|
||||||
mSelectedTabTextColor = color;
|
mSelectedTabTextColor = color;
|
||||||
updateTabsTextColor();
|
updateTabsTextColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer getSelectedTabTextColor(){
|
int getSelectedTabTextColor(){
|
||||||
return mSelectedTabTextColor;
|
return mSelectedTabTextColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ class TabStrip extends LinearLayout {
|
|||||||
LinearLayout linearLayout = (LinearLayout)getChildAt(i);
|
LinearLayout linearLayout = (LinearLayout)getChildAt(i);
|
||||||
TextView textView = (TextView)linearLayout.getChildAt(1);
|
TextView textView = (TextView)linearLayout.getChildAt(1);
|
||||||
if (i == mSelectedPosition){
|
if (i == mSelectedPosition){
|
||||||
if (mSelectedTabTextColor != null){
|
if (mSelectedTabTextColor >= 0){
|
||||||
textView.setTextColor(mSelectedTabTextColor);
|
textView.setTextColor(mSelectedTabTextColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -130,7 +130,7 @@ class TabStrip extends LinearLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (mTabTextColor != null){
|
if (mTabTextColor >= 0){
|
||||||
textView.setTextColor(mTabTextColor);
|
textView.setTextColor(mTabTextColor);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class ViewHelper {
|
|||||||
public static int getMinWidth(android.view.View view) {
|
public static int getMinWidth(android.view.View view) {
|
||||||
return view.getMinimumWidth();
|
return view.getMinimumWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMinWidth(android.view.View view, int value) {
|
public static void setMinWidth(android.view.View view, int value) {
|
||||||
view.setMinimumWidth(value);
|
view.setMinimumWidth(value);
|
||||||
}
|
}
|
||||||
@@ -27,6 +28,7 @@ public class ViewHelper {
|
|||||||
public static int getMinHeight(android.view.View view) {
|
public static int getMinHeight(android.view.View view) {
|
||||||
return view.getMinimumHeight();
|
return view.getMinimumHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMinHeight(android.view.View view, int value) {
|
public static void setMinHeight(android.view.View view, int value) {
|
||||||
view.setMinimumHeight(value);
|
view.setMinimumHeight(value);
|
||||||
}
|
}
|
||||||
@@ -39,6 +41,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return ViewGroup.LayoutParams.MATCH_PARENT;
|
return ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setWidth(android.view.View view, int value) {
|
public static void setWidth(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
@@ -49,6 +52,20 @@ public class ViewHelper {
|
|||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setWidthPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.widthPercent = value;
|
||||||
|
lp.width = (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.FILL_HORIZONTAL ? ViewGroup.LayoutParams.MATCH_PARENT : ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static int getHeight(android.view.View view) {
|
public static int getHeight(android.view.View view) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
if (params != null) {
|
if (params != null) {
|
||||||
@@ -57,6 +74,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return ViewGroup.LayoutParams.MATCH_PARENT;
|
return ViewGroup.LayoutParams.MATCH_PARENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setHeight(android.view.View view, int value) {
|
public static void setHeight(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
@@ -67,6 +85,20 @@ public class ViewHelper {
|
|||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setHeightPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.heightPercent = value;
|
||||||
|
lp.height = (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.FILL_VERTICAL ? ViewGroup.LayoutParams.MATCH_PARENT : ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static Rect getMargin(android.view.View view) {
|
public static Rect getMargin(android.view.View view) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
if (params instanceof ViewGroup.MarginLayoutParams) {
|
if (params instanceof ViewGroup.MarginLayoutParams) {
|
||||||
@@ -76,6 +108,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return new Rect();
|
return new Rect();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMargin(android.view.View view, int left, int top, int right, int bottom) {
|
public static void setMargin(android.view.View view, int left, int top, int right, int bottom) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
@@ -103,6 +136,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMarginLeft(android.view.View view, int value) {
|
public static void setMarginLeft(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
@@ -116,6 +150,26 @@ public class ViewHelper {
|
|||||||
lp.leftMargin = value;
|
lp.leftMargin = value;
|
||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.leftMarginPercent = -1;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMarginLeftPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.leftMargin = 0;
|
||||||
|
lp.leftMarginPercent = value;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMarginTop(android.view.View view) {
|
public static int getMarginTop(android.view.View view) {
|
||||||
@@ -127,6 +181,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMarginTop(android.view.View view, int value) {
|
public static void setMarginTop(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
@@ -140,6 +195,26 @@ public class ViewHelper {
|
|||||||
lp.topMargin = value;
|
lp.topMargin = value;
|
||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.topMarginPercent = -1;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMarginTopPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.topMargin = 0;
|
||||||
|
lp.topMarginPercent = value;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMarginRight(android.view.View view) {
|
public static int getMarginRight(android.view.View view) {
|
||||||
@@ -151,6 +226,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMarginRight(android.view.View view, int value) {
|
public static void setMarginRight(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
@@ -164,6 +240,26 @@ public class ViewHelper {
|
|||||||
lp.rightMargin = value;
|
lp.rightMargin = value;
|
||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.rightMarginPercent = -1;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMarginRightPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.rightMargin = 0;
|
||||||
|
lp.rightMarginPercent = value;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMarginBottom(android.view.View view) {
|
public static int getMarginBottom(android.view.View view) {
|
||||||
@@ -175,6 +271,7 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setMarginBottom(android.view.View view, int value) {
|
public static void setMarginBottom(android.view.View view, int value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
@@ -188,9 +285,29 @@ public class ViewHelper {
|
|||||||
lp.bottomMargin = value;
|
lp.bottomMargin = value;
|
||||||
view.setLayoutParams(params);
|
view.setLayoutParams(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.bottomMarginPercent = -1;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHorizontalAlighment(android.view.View view) {
|
public static void setMarginBottomPercent(android.view.View view, int value) {
|
||||||
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
|
if (params == null) {
|
||||||
|
CommonLayoutParams lp = new CommonLayoutParams();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params instanceof CommonLayoutParams) {
|
||||||
|
CommonLayoutParams lp = (CommonLayoutParams) params;
|
||||||
|
lp.bottomMargin = 0;
|
||||||
|
lp.bottomMarginPercent = value;
|
||||||
|
view.setLayoutParams(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getHorizontalAlignment(android.view.View view) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
if (params instanceof FrameLayout.LayoutParams) {
|
if (params instanceof FrameLayout.LayoutParams) {
|
||||||
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) params;
|
||||||
@@ -211,7 +328,8 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return "stretch";
|
return "stretch";
|
||||||
}
|
}
|
||||||
public static void setHorizontalAlighment(android.view.View view, String value) {
|
|
||||||
|
public static void setHorizontalAlignment(android.view.View view, String value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
@@ -226,6 +344,7 @@ public class ViewHelper {
|
|||||||
lp.gravity = Gravity.LEFT | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
lp.gravity = Gravity.LEFT | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
||||||
break;
|
break;
|
||||||
case "center":
|
case "center":
|
||||||
|
case "middle":
|
||||||
lp.gravity = Gravity.CENTER_HORIZONTAL | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
lp.gravity = Gravity.CENTER_HORIZONTAL | (lp.gravity & Gravity.VERTICAL_GRAVITY_MASK);
|
||||||
break;
|
break;
|
||||||
case "right":
|
case "right":
|
||||||
@@ -260,7 +379,8 @@ public class ViewHelper {
|
|||||||
|
|
||||||
return "stretch";
|
return "stretch";
|
||||||
}
|
}
|
||||||
public static void setVerticalAlignment(android.view.View view, String value){
|
|
||||||
|
public static void setVerticalAlignment(android.view.View view, String value) {
|
||||||
ViewGroup.LayoutParams params = view.getLayoutParams();
|
ViewGroup.LayoutParams params = view.getLayoutParams();
|
||||||
// Initialize if empty.
|
// Initialize if empty.
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
@@ -275,10 +395,11 @@ public class ViewHelper {
|
|||||||
lp.gravity = Gravity.TOP | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
lp.gravity = Gravity.TOP | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
||||||
break;
|
break;
|
||||||
case "center":
|
case "center":
|
||||||
|
case "middle":
|
||||||
lp.gravity = Gravity.CENTER_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
lp.gravity = Gravity.CENTER_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
||||||
break;
|
break;
|
||||||
case "bottom":
|
case "bottom":
|
||||||
lp.gravity = Gravity.BOTTOM| (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
lp.gravity = Gravity.BOTTOM | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
||||||
break;
|
break;
|
||||||
case "stretch":
|
case "stretch":
|
||||||
lp.gravity = Gravity.FILL_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
lp.gravity = Gravity.FILL_VERTICAL | (lp.gravity & Gravity.HORIZONTAL_GRAVITY_MASK);
|
||||||
@@ -291,6 +412,7 @@ public class ViewHelper {
|
|||||||
public static Rect getPadding(android.view.View view) {
|
public static Rect getPadding(android.view.View view) {
|
||||||
return new Rect(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
return new Rect(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPadding(android.view.View view, int left, int top, int right, int bottom) {
|
public static void setPadding(android.view.View view, int left, int top, int right, int bottom) {
|
||||||
view.setPadding(left, top, right, bottom);
|
view.setPadding(left, top, right, bottom);
|
||||||
}
|
}
|
||||||
@@ -298,6 +420,7 @@ public class ViewHelper {
|
|||||||
public static int getPaddingLeft(android.view.View view) {
|
public static int getPaddingLeft(android.view.View view) {
|
||||||
return view.getPaddingLeft();
|
return view.getPaddingLeft();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPaddingLeft(android.view.View view, int value) {
|
public static void setPaddingLeft(android.view.View view, int value) {
|
||||||
view.setPadding(value, view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
view.setPadding(value, view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
|
||||||
}
|
}
|
||||||
@@ -305,6 +428,7 @@ public class ViewHelper {
|
|||||||
public static int getPaddingTop(android.view.View view) {
|
public static int getPaddingTop(android.view.View view) {
|
||||||
return view.getPaddingTop();
|
return view.getPaddingTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPaddingTop(android.view.View view, int value) {
|
public static void setPaddingTop(android.view.View view, int value) {
|
||||||
view.setPadding(view.getPaddingLeft(), value, view.getPaddingRight(), view.getPaddingBottom());
|
view.setPadding(view.getPaddingLeft(), value, view.getPaddingRight(), view.getPaddingBottom());
|
||||||
}
|
}
|
||||||
@@ -312,6 +436,7 @@ public class ViewHelper {
|
|||||||
public static int getPaddingRight(android.view.View view) {
|
public static int getPaddingRight(android.view.View view) {
|
||||||
return view.getPaddingRight();
|
return view.getPaddingRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPaddingRight(android.view.View view, int value) {
|
public static void setPaddingRight(android.view.View view, int value) {
|
||||||
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), value, view.getPaddingBottom());
|
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), value, view.getPaddingBottom());
|
||||||
}
|
}
|
||||||
@@ -319,6 +444,7 @@ public class ViewHelper {
|
|||||||
public static int getPaddingBottom(android.view.View view) {
|
public static int getPaddingBottom(android.view.View view) {
|
||||||
return view.getPaddingBottom();
|
return view.getPaddingBottom();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPaddingBottom(android.view.View view, int value) {
|
public static void setPaddingBottom(android.view.View view, int value) {
|
||||||
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), value);
|
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), value);
|
||||||
}
|
}
|
||||||
@@ -326,6 +452,7 @@ public class ViewHelper {
|
|||||||
public static float getRotate(android.view.View view) {
|
public static float getRotate(android.view.View view) {
|
||||||
return view.getRotation();
|
return view.getRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setRotate(android.view.View view, float value) {
|
public static void setRotate(android.view.View view, float value) {
|
||||||
view.setRotation(value);
|
view.setRotation(value);
|
||||||
}
|
}
|
||||||
@@ -333,6 +460,7 @@ public class ViewHelper {
|
|||||||
public static float getScaleX(android.view.View view) {
|
public static float getScaleX(android.view.View view) {
|
||||||
return view.getScaleX();
|
return view.getScaleX();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setScaleX(android.view.View view, float value) {
|
public static void setScaleX(android.view.View view, float value) {
|
||||||
view.setScaleX(value);
|
view.setScaleX(value);
|
||||||
}
|
}
|
||||||
@@ -340,6 +468,7 @@ public class ViewHelper {
|
|||||||
public static float getScaleY(android.view.View view) {
|
public static float getScaleY(android.view.View view) {
|
||||||
return view.getScaleY();
|
return view.getScaleY();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setScaleY(android.view.View view, float value) {
|
public static void setScaleY(android.view.View view, float value) {
|
||||||
view.setScaleY(value);
|
view.setScaleY(value);
|
||||||
}
|
}
|
||||||
@@ -347,6 +476,7 @@ public class ViewHelper {
|
|||||||
public static float getTranslateX(android.view.View view) {
|
public static float getTranslateX(android.view.View view) {
|
||||||
return view.getTranslationX();
|
return view.getTranslationX();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setTranslateX(android.view.View view, float value) {
|
public static void setTranslateX(android.view.View view, float value) {
|
||||||
view.setTranslationX(value);
|
view.setTranslationX(value);
|
||||||
}
|
}
|
||||||
@@ -354,6 +484,7 @@ public class ViewHelper {
|
|||||||
public static float getTranslateY(android.view.View view) {
|
public static float getTranslateY(android.view.View view) {
|
||||||
return view.getTranslationY();
|
return view.getTranslationY();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setTranslateY(android.view.View view, float value) {
|
public static void setTranslateY(android.view.View view, float value) {
|
||||||
view.setTranslationY(value);
|
view.setTranslationY(value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user