1
0
Pārlūkot izejas kodu

动态调整页面内输入框位置

wcq 1 gadu atpakaļ
vecāks
revīzija
96ca9a318e

+ 7 - 4
app/src/main/java/com/emato/ich/fragment/SendKeyBoardFragment.java

@@ -97,10 +97,13 @@ public class SendKeyBoardFragment extends Fragment {
                 // 如果不是门店店员进来 则将注册二维码设置为隐藏
                 view.findViewById(R.id.qrCodeImage).setVisibility(View.GONE);
                 view.findViewById(R.id.sendingTitleImage).setVisibility(View.GONE);
-                view.findViewById(R.id.delivery_code).setX(140);
-                view.findViewById(R.id.editTextTextPersonName4).setX(140);
-                view.findViewById(R.id.editTextTextPersonName5).setX(140);
-                view.findViewById(R.id.button_confirm).setX(140);
+
+                view.findViewById(R.id.delivery_code).setTranslationX(-200);
+                view.findViewById(R.id.editTextTextPersonName4).setTranslationX(-200);
+                view.findViewById(R.id.editTextTextPersonName5).setTranslationX(-200);
+                view.findViewById(R.id.button_confirm).setTranslationX(-200);
+            }else{
+
             }
         } catch (Exception e) {
             Log.e(TAG, "onViewCreated: 配置登录手机号出错! ", e);