@@ -74,7 +74,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener, MyCl | |||||
/** | /** | ||||
* 当前温度 | * 当前温度 | ||||
*/ | */ | ||||
TextView wendu1, wendu2,pf_ms; | |||||
TextView wendu1, wendu2,pf_ms,plc_status; | |||||
/** | /** | ||||
* 界面实例 | * 界面实例 | ||||
*/ | */ | ||||
@@ -106,6 +106,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener, MyCl | |||||
wendu1 = view.findViewById(R.id.wendu1); | wendu1 = view.findViewById(R.id.wendu1); | ||||
wendu2 = view.findViewById(R.id.wendu2); | wendu2 = view.findViewById(R.id.wendu2); | ||||
pf_ms = view.findViewById(R.id.pf_ms); | pf_ms = view.findViewById(R.id.pf_ms); | ||||
plc_status = view.findViewById(R.id.plc_status); | |||||
if( ConfigName.getInstance().IsUserDownOrder) | if( ConfigName.getInstance().IsUserDownOrder) | ||||
{ | { | ||||
makesp.setVisibility(View.VISIBLE); | makesp.setVisibility(View.VISIBLE); | ||||
@@ -309,6 +310,9 @@ public class HomeFragment extends Fragment implements View.OnClickListener, MyCl | |||||
public void run() { | public void run() { | ||||
wendu1.setText(String.valueOf(DeviceData.Get().getBWX_FructoseTemperature()) + "°C"); | wendu1.setText(String.valueOf(DeviceData.Get().getBWX_FructoseTemperature()) + "°C"); | ||||
wendu2.setText(String.valueOf(DeviceData.Get().getJRX_FructoseTemperature()) + "°C"); | wendu2.setText(String.valueOf(DeviceData.Get().getJRX_FructoseTemperature()) + "°C"); | ||||
plc_status.setText(DataBus.getInstance().PlcIsConnect?"正常":"异常"); | |||||
plc_status.setTextColor(DataBus.getInstance().PlcIsConnect?getResources().getColor(R.color.foreground):getResources().getColor(R.color.warm_red)); | |||||
} | } | ||||
}); | }); | ||||
Thread.sleep(100); | Thread.sleep(100); | ||||
@@ -168,6 +168,7 @@ public class add_pf_activity extends AppCompatActivity implements View.OnClickLi | |||||
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); | adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); | ||||
wuliaolist_spinner.setAdapter(adapter); | wuliaolist_spinner.setAdapter(adapter); | ||||
List<BPA_SUGAR> resSugars = QueryDB.GetSugarALL(); | List<BPA_SUGAR> resSugars = QueryDB.GetSugarALL(); | ||||
for (BPA_SUGAR sugar:resSugars){ | for (BPA_SUGAR sugar:resSugars){ | ||||
sugar_map.put(sugar.sugarName,sugar.id); | sugar_map.put(sugar.sugarName,sugar.id); | ||||
@@ -174,6 +174,20 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_alignParentBottom="true"> | android:layout_alignParentBottom="true"> | ||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/white" | |||||
android:text="设备:" | |||||
android:layout_margin="5dp"/> | |||||
<TextView | |||||
android:id="@+id/plc_status" | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:textColor="@color/lable_color" | |||||
android:textSize="@dimen/TitleSize" | |||||
android:text="正常" | |||||
android:layout_margin="5dp"/> | |||||
<TextView | <TextView | ||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
@@ -2,7 +2,7 @@ | |||||
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" | <CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:id="@+id/checkedTextViewCustom_1" | android:id="@+id/checkedTextViewCustom_1" | ||||
style="?android:attr/spinnerDropDownItemStyle" | style="?android:attr/spinnerDropDownItemStyle" | ||||
android:layout_width="wrap_content" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="35dp" | android:layout_height="35dp" | ||||
android:background="#EF132D54" | android:background="#EF132D54" | ||||
android:ellipsize="marquee" | android:ellipsize="marquee" | ||||