@@ -0,0 +1,13 @@ | |||
package com.bonait.bnframework.event; | |||
/** | |||
* @author: liup | |||
* @description: 料仓设置 点击通道按钮事件 | |||
* @date: 2024/6/14 15:42. | |||
*/ | |||
public class SilosClickEvent { | |||
public String channel;//通道1 | |||
public SilosClickEvent(String channel){ | |||
this.channel = channel; | |||
} | |||
} |
@@ -0,0 +1,145 @@ | |||
package com.bonait.bnframework.modules.home.fragment; | |||
import android.os.Bundle; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.databinding.FragmentSilosSettingBinding; | |||
import com.bonait.bnframework.event.SilosClickEvent; | |||
import com.orhanobut.logger.Logger; | |||
import org.greenrobot.eventbus.EventBus; | |||
import butterknife.ButterKnife; | |||
/** | |||
* @author: liup | |||
* @description: 料仓图 | |||
* @date: 2024/6/14 14:57. | |||
*/ | |||
public class SilosSettingFragment extends BaseFragment { | |||
private FragmentSilosSettingBinding viewBinding; | |||
private int type = 1;//1左侧 2右侧 3顶部 4背部 | |||
public static SilosSettingFragment newInstance(int type){ | |||
SilosSettingFragment fragment = new SilosSettingFragment(); | |||
fragment.type = type; | |||
return fragment; | |||
}; | |||
@Override | |||
protected View onCreateView() { | |||
viewBinding = FragmentSilosSettingBinding.inflate(getLayoutInflater()); | |||
return viewBinding.getRoot(); | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
Logger.d("我的fragment创建"); | |||
initView(); | |||
} | |||
private void initView(){ | |||
switch (type){ | |||
case 1: | |||
viewBinding.includeDeviceLeft.getRoot().setVisibility(View.VISIBLE); | |||
initLeftView(); | |||
break; | |||
case 2: | |||
viewBinding.includeDeviceRight.getRoot().setVisibility(View.VISIBLE); | |||
initRightView(); | |||
break; | |||
case 3: | |||
viewBinding.includeDeviceTop.getRoot().setVisibility(View.VISIBLE); | |||
initTopView(); | |||
break; | |||
case 4: | |||
viewBinding.includeDeviceBack.getRoot().setVisibility(View.VISIBLE); | |||
initBackView(); | |||
break; | |||
} | |||
} | |||
private void initLeftView(){ | |||
viewBinding.includeDeviceLeft.channel1.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道1")); | |||
}); | |||
viewBinding.includeDeviceLeft.channel2.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道2")); | |||
}); | |||
} | |||
private void initRightView(){ | |||
viewBinding.includeDeviceRight.channel3.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道3")); | |||
}); | |||
viewBinding.includeDeviceRight.channel4.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道4")); | |||
}); | |||
viewBinding.includeDeviceRight.channel5.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道5")); | |||
}); | |||
} | |||
private void initTopView(){ | |||
viewBinding.includeDeviceTop.channel6.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道6")); | |||
}); | |||
viewBinding.includeDeviceTop.channel7.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道7")); | |||
}); | |||
viewBinding.includeDeviceTop.channel8.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道8")); | |||
}); | |||
viewBinding.includeDeviceTop.channel9.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道9")); | |||
}); | |||
viewBinding.includeDeviceTop.channel10.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道10")); | |||
}); | |||
viewBinding.includeDeviceTop.channel11.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道11")); | |||
}); | |||
} | |||
private void initBackView(){ | |||
viewBinding.includeDeviceBack.channel12.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道12")); | |||
}); | |||
viewBinding.includeDeviceBack.channel13.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道13")); | |||
}); | |||
viewBinding.includeDeviceBack.channel14.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道14")); | |||
}); | |||
viewBinding.includeDeviceBack.channel15.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道15")); | |||
}); | |||
viewBinding.includeDeviceBack.channel16.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道16")); | |||
}); | |||
viewBinding.includeDeviceBack.channel17.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道17")); | |||
}); | |||
viewBinding.includeDeviceBack.channel18.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道18")); | |||
}); | |||
viewBinding.includeDeviceBack.channel19.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道19")); | |||
}); | |||
viewBinding.includeDeviceBack.channel20.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道20")); | |||
}); | |||
viewBinding.includeDeviceBack.channel21.setOnClickListener(v->{ | |||
EventBus.getDefault().post(new SilosClickEvent("通道21")); | |||
}); | |||
} | |||
} |
@@ -12,12 +12,20 @@ import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.glide.GlideUtil; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||
import com.bonait.bnframework.common.linktab.LinkMode; | |||
import com.bonait.bnframework.common.message.MessageLooper; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.common.utils.ToastUtils; | |||
import com.bonait.bnframework.databinding.ActivitySilosNewBinding; | |||
import com.bonait.bnframework.event.ImageUrlSelectEvent; | |||
import com.bonait.bnframework.event.SilosClickEvent; | |||
import com.bonait.bnframework.modules.home.fragment.SilosSettingFragment; | |||
import com.bonait.bnframework.modules.home.fragment.mode.ImageButtonControl; | |||
import com.bonait.bnframework.modules.home.fragment.mode.Silos_item_fragment; | |||
import com.bonait.bnframework.modules.home.fragment.mode.add_silos_ck; | |||
@@ -29,6 +37,10 @@ import com.qmuiteam.qmui.widget.QMUITopBarLayout; | |||
import com.qmuiteam.qmui.widget.QMUIViewPager; | |||
import com.qmuiteam.qmui.widget.tab.QMUITabSegment; | |||
import org.greenrobot.eventbus.EventBus; | |||
import org.greenrobot.eventbus.Subscribe; | |||
import org.greenrobot.eventbus.ThreadMode; | |||
import java.util.ArrayList; | |||
import java.util.LinkedHashMap; | |||
import java.util.List; | |||
@@ -72,10 +84,15 @@ public class SilosNewActivity extends BaseActivity { | |||
private Context context; | |||
Activity activity; | |||
private ActivitySilosNewBinding viewBinding; | |||
@Override | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_silos_new); | |||
viewBinding = ActivitySilosNewBinding.inflate(getLayoutInflater()); | |||
setContentView(viewBinding.getRoot()); | |||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | |||
EventBus.getDefault().register(this); | |||
activity=this; | |||
ButterKnife.bind(this); | |||
context = getContext(); | |||
@@ -178,17 +195,32 @@ public class SilosNewActivity extends BaseActivity { | |||
QMUIFragmentPagerAdapter adapter = new QMUIFragmentPagerAdapter(getSupportFragmentManager()) { | |||
@Override | |||
public int getCount() { | |||
return DataBus.getInstance().SilosData.size(); | |||
return 4; | |||
// return DataBus.getInstance().SilosData.size(); | |||
} | |||
@Override | |||
public QMUIFragment createFragment(int position) { | |||
Silos_item_fragment fragment = new Silos_item_fragment(); | |||
fragment.SetData(position,activity); | |||
return fragment; | |||
SilosSettingFragment silosSettingFragment = SilosSettingFragment.newInstance(position+1); | |||
return silosSettingFragment; | |||
// Silos_item_fragment fragment = new Silos_item_fragment(); | |||
// fragment.SetData(position,activity); | |||
// return fragment; | |||
} | |||
@Override | |||
public CharSequence getPageTitle(int position) { | |||
return DataBus.getInstance().SilosData.get(position).type.toString(); | |||
switch (position){ | |||
case 0: | |||
return "设备左侧"; | |||
case 1: | |||
return "设备右侧"; | |||
case 2: | |||
return "设备顶部"; | |||
case 3: | |||
return "设备背部"; | |||
} | |||
return "设备"; | |||
// return DataBus.getInstance().SilosData.get(position).type.toString(); | |||
} | |||
}; | |||
viewpager_silos.setAdapter(adapter); | |||
@@ -228,6 +260,7 @@ public class SilosNewActivity extends BaseActivity { | |||
@Override | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
EventBus.getDefault().unregister(this); | |||
MessageManager.getInstance().unRegisterMessageReceiver(this); | |||
silos_jz.destroy(); | |||
add_yijian.destroy(); | |||
@@ -238,6 +271,12 @@ public class SilosNewActivity extends BaseActivity { | |||
context = null; | |||
} | |||
//接收图片选择事件 | |||
@Subscribe(threadMode = ThreadMode.MAIN) | |||
public void onChannelClickEvent(SilosClickEvent event){ | |||
//TODO | |||
} | |||
@Override | |||
protected boolean canDragBack() { | |||
return false; | |||
@@ -20,6 +20,7 @@ import com.bonait.bnframework.common.db.res.lcMode; | |||
import com.bonait.bnframework.common.linktab.LinkMode; | |||
import com.bonait.bnframework.common.message.MessageLooper; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
import com.bonait.bnframework.common.utils.DisplayManager; | |||
import com.bonait.bnframework.common.view.MyLayoutManager; | |||
import com.bonait.bnframework.modules.home.adapter.liaochang_adapter; | |||
import com.orhanobut.logger.Logger; | |||
@@ -0,0 +1,15 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |||
<item android:state_pressed="true"> | |||
<shape> | |||
<solid android:color="#FF9800"/> | |||
</shape> | |||
</item> | |||
<item> | |||
<shape> | |||
<solid android:color="#7f00A8E1"/> | |||
</shape> | |||
</item> | |||
</selector> |
@@ -4,6 +4,8 @@ | |||
xmlns:tools="http://schemas.android.com/tools" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
tools:layout_height="800dp" | |||
tools:layout_width="1208dp" | |||
android:orientation="vertical" | |||
android:background="@color/white" | |||
android:fitsSystemWindows="true"> | |||
@@ -29,7 +31,7 @@ | |||
<com.qmuiteam.qmui.widget.tab.QMUITabSegment | |||
android:id="@+id/tabs" | |||
android:layout_width="match_parent" | |||
android:layout_height="43dp" | |||
android:layout_height="50dp" | |||
android:background="@drawable/qmui_list_item_bg_with_border_bottom" | |||
android:textSize="16sp" | |||
app:qmui_tab_has_indicator="true" | |||
@@ -44,8 +46,8 @@ | |||
android:orientation="vertical"> | |||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||
android:id="@+id/viewpager_silos" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
android:layout_marginBottom="40dp"/> | |||
<RelativeLayout | |||
android:layout_alignParentBottom="true" | |||
@@ -19,6 +19,7 @@ | |||
<!-- --> | |||
<!-- </androidx.core.widget.NestedScrollView>--> | |||
<androidx.recyclerview.widget.RecyclerView | |||
android:id="@+id/recycler_view_lll" | |||
android:layout_width="match_parent" | |||
@@ -0,0 +1,35 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
xmlns:tools="http://schemas.android.com/tools"> | |||
<include | |||
android:id="@+id/include_device_left" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
layout="@layout/layout_device_left" | |||
android:visibility="gone" | |||
/> | |||
<include | |||
android:id="@+id/include_device_right" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
layout="@layout/layout_device_right" | |||
android:visibility="gone" | |||
/> | |||
<include | |||
android:id="@+id/include_device_top" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
layout="@layout/layout_device_top" | |||
android:visibility="gone" | |||
/> | |||
<include | |||
android:id="@+id/include_device_back" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
layout="@layout/layout_device_back" | |||
android:visibility="gone" | |||
/> | |||
</FrameLayout> |
@@ -0,0 +1,222 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
xmlns:app="http://schemas.android.com/apk/res-auto"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:src="@mipmap/silos_device_back" | |||
android:layout_marginStart="500dp" | |||
android:scaleType="fitCenter" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#7B7774" | |||
android:text="左侧液体仓" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel12" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道12" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="100dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel13" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道13" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel12" | |||
/> | |||
<TextView | |||
android:id="@+id/channel14" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道14" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel13" | |||
/> | |||
<TextView | |||
android:id="@+id/channel15" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道15" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel14" | |||
/> | |||
<TextView | |||
android:id="@+id/channel16" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道16" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="300dp" | |||
android:layout_marginTop="100dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel17" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道17" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="300dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel16" | |||
/> | |||
<TextView | |||
android:id="@+id/channel18" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道18" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="300dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel17" | |||
/> | |||
<TextView | |||
android:id="@+id/channel19" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道19" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="300dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel18" | |||
/> | |||
<TextView | |||
android:id="@+id/channel20" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道20" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginEnd="5dp" | |||
android:layout_marginTop="350dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel21" | |||
android:layout_width="220dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道21" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginEnd="5dp" | |||
android:layout_marginTop="20dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
app:layout_constraintTop_toBottomOf="@id/channel20" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="(液体仓)" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="230dp" | |||
android:layout_marginStart="600dp" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="(蠕动泵)" | |||
android:textColor="@color/white" | |||
android:textSize="36sp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="230dp" | |||
android:layout_marginStart="850dp" | |||
/> | |||
<TextView | |||
android:layout_width="60dp" | |||
android:layout_height="40dp" | |||
android:background="#92918F" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="290dp" | |||
android:layout_marginStart="850dp" | |||
/> | |||
</androidx.constraintlayout.widget.ConstraintLayout> |
@@ -0,0 +1,100 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
android:background="@color/white" | |||
xmlns:app="http://schemas.android.com/apk/res-auto"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:src="@mipmap/silos_device_left" | |||
android:scaleType="fitCenter" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#7B7774" | |||
android:text="设备左视图" | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="300dp" | |||
android:layout_height="5dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginBottom="100dp" | |||
android:layout_marginStart="125dp" | |||
app:layout_constraintLeft_toLeftOf="@id/channel1" | |||
app:layout_constraintBottom_toTopOf="@id/channel1" | |||
/> | |||
<TextView | |||
android:layout_width="5dp" | |||
android:layout_height="100dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginStart="125dp" | |||
app:layout_constraintLeft_toLeftOf="@id/channel1" | |||
app:layout_constraintBottom_toTopOf="@id/channel1" | |||
/> | |||
<TextView | |||
android:id="@+id/channel1" | |||
android:layout_width="250dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道1" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="40dp" | |||
android:layout_marginTop="400dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="240dp" | |||
android:layout_height="5dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginBottom="95dp" | |||
android:layout_marginEnd="120dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintBottom_toTopOf="@id/channel2" | |||
app:layout_constraintEnd_toEndOf="@id/channel2" | |||
/> | |||
<TextView | |||
android:layout_width="5dp" | |||
android:layout_height="100dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginTop="380dp" | |||
android:layout_marginEnd="270dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintBottom_toTopOf="@id/channel2" | |||
app:layout_constraintLeft_toLeftOf="@id/channel2" | |||
android:layout_marginLeft="125dp" | |||
/> | |||
<TextView | |||
android:id="@+id/channel2" | |||
android:layout_width="250dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道2" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginEnd="145dp" | |||
android:layout_marginTop="400dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
</androidx.constraintlayout.widget.ConstraintLayout> |
@@ -0,0 +1,136 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
android:background="@color/white" | |||
xmlns:app="http://schemas.android.com/apk/res-auto"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:src="@mipmap/silos_device_right" | |||
android:scaleType="fitCenter" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintEnd_toEndOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#7B7774" | |||
android:text="设备右视图" | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="20dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="250dp" | |||
android:layout_height="5dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginStart="125dp" | |||
app:layout_constraintLeft_toLeftOf="@id/channel3" | |||
android:layout_marginBottom="100dp" | |||
app:layout_constraintBottom_toTopOf="@id/channel3" | |||
/> | |||
<TextView | |||
android:layout_width="5dp" | |||
android:layout_height="100dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginStart="125dp" | |||
app:layout_constraintLeft_toLeftOf="@id/channel3" | |||
app:layout_constraintBottom_toTopOf="@id/channel3" | |||
/> | |||
<TextView | |||
android:id="@+id/channel3" | |||
android:layout_width="250dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道3" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="70dp" | |||
android:layout_marginTop="400dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="230dp" | |||
android:layout_height="5dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginBottom="60dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintRight_toLeftOf="@id/channel4" | |||
app:layout_constraintBottom_toBottomOf="@id/channel4" | |||
/> | |||
<TextView | |||
android:layout_width="5dp" | |||
android:layout_height="90dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginTop="55dp" | |||
android:layout_marginEnd="230dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintRight_toLeftOf="@id/channel4" | |||
app:layout_constraintTop_toTopOf="@id/channel4" | |||
/> | |||
<TextView | |||
android:id="@+id/channel4" | |||
android:layout_width="250dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道4" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginTop="140dp" | |||
android:layout_gravity="end" | |||
android:layout_marginStart="745dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="190dp" | |||
android:layout_height="5dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginBottom="60dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintRight_toLeftOf="@id/channel5" | |||
app:layout_constraintBottom_toBottomOf="@id/channel5" | |||
/> | |||
<TextView | |||
android:layout_width="5dp" | |||
android:layout_height="170dp" | |||
android:background="@color/blue_primary_dark" | |||
android:layout_marginEnd="190dp" | |||
android:layout_marginBottom="60dp" | |||
android:layout_gravity="end" | |||
app:layout_constraintRight_toLeftOf="@id/channel5" | |||
app:layout_constraintBottom_toBottomOf="@id/channel5" | |||
/> | |||
<TextView | |||
android:id="@+id/channel5" | |||
android:layout_width="250dp" | |||
android:layout_height="120dp" | |||
android:textSize="48sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道5" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginTop="420dp" | |||
android:layout_gravity="end" | |||
android:layout_marginStart="765dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
</androidx.constraintlayout.widget.ConstraintLayout> |
@@ -0,0 +1,116 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
android:layout_width="1050dp" | |||
android:layout_height="750dp" | |||
android:background="@color/white" | |||
xmlns:app="http://schemas.android.com/apk/res-auto"> | |||
<ImageView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:src="@mipmap/silos_device_top" | |||
android:scaleType="fitCenter" | |||
android:scaleX="1.8" | |||
android:scaleY="1.8" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:textSize="32sp" | |||
android:gravity="center" | |||
android:textColor="@color/white" | |||
android:text="设备俯视图\n可放置鸡精、味精、盐等粉料" | |||
android:layout_marginTop="35dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintRight_toRightOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel6" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道6" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="180dp" | |||
android:layout_marginTop="180dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel7" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道7" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="180dp" | |||
android:layout_marginTop="300dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel8" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道8" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="180dp" | |||
android:layout_marginTop="420dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel9" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道9" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="650dp" | |||
android:layout_marginTop="180dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel10" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道10" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="650dp" | |||
android:layout_marginTop="300dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
<TextView | |||
android:id="@+id/channel11" | |||
android:layout_width="220dp" | |||
android:layout_height="100dp" | |||
android:textSize="46sp" | |||
android:gravity="center" | |||
android:textColor="#FFEB3B" | |||
android:text="通道11" | |||
android:background="@drawable/bg_device_position_btn" | |||
android:layout_marginLeft="650dp" | |||
android:layout_marginTop="420dp" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" | |||
/> | |||
</androidx.constraintlayout.widget.ConstraintLayout> |