|
@@ -4,6 +4,9 @@ import android.app.Activity;
|
|
|
import android.content.Context;
|
|
|
import android.content.res.Configuration;
|
|
|
import android.content.res.TypedArray;
|
|
|
+import android.graphics.Canvas;
|
|
|
+import android.graphics.Color;
|
|
|
+import android.graphics.Paint;
|
|
|
import android.graphics.Rect;
|
|
|
import android.os.Build;
|
|
|
import android.util.AttributeSet;
|
|
@@ -212,7 +215,22 @@ public class DialogXBaseRelativeLayout extends RelativeLayout {
|
|
|
if (bkgView != null && bkgView.getLayoutParams() instanceof LayoutParams) {
|
|
|
LayoutParams bkgLp = (LayoutParams) bkgView.getLayoutParams();
|
|
|
if (bkgLp.getRules()[ALIGN_PARENT_BOTTOM] == RelativeLayout.TRUE && isAutoUnsafePlacePadding()) {
|
|
|
- bkgView.setPadding(0, 0, 0, bottom);
|
|
|
+ if (!DialogX.noTranslation_for_a_man_custom) {
|
|
|
+ bkgView.setPadding(0, 0, 0, bottom);
|
|
|
+ } else {
|
|
|
+ View boxBkg = findViewById(R.id.box_bkg);
|
|
|
+ BottomDialogScrollView scrollView = findViewById(R.id.scrollView);
|
|
|
+ if (!scrollView.isCanScroll()){
|
|
|
+ if (boxBkg.getPaddingBottom() == 0) {
|
|
|
+ boxBkg.setPadding(0, 0, 0, bottom);
|
|
|
+ } else {
|
|
|
+ bkgView.setPadding(0, 0, 0, bottom);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ boxBkg.setPadding(0, 0, 0, 0);
|
|
|
+ bkgView.setPadding(0, 0, 0, bottom);
|
|
|
+ }
|
|
|
+ }
|
|
|
setPadding(left, top, right, 0);
|
|
|
return;
|
|
|
}
|