Commit 67072339 by Wyh

修改PRJ

parent 98226f8e
......@@ -57,8 +57,8 @@ public class KitChenPrjFoodView extends LinearLayout {
private void init() {
setOrientation(LinearLayout.VERTICAL);
for (PrjBean.DataBean.Bean item : data) {
View view = View.inflate(getContext(), R.layout.print_kitchen_item_parent, null);
LinearLayout layout = view.findViewById(R.id.layout_print_kitchen_parent);
// View view = View.inflate(getContext(), R.layout.print_kitchen_item_parent, null);
// LinearLayout layout = view.findViewById(R.id.layout_print_kitchen_parent);
for (String type : languageTypes) {
String languageType = type;
if (languageType.contains(".")) {
......@@ -67,21 +67,21 @@ public class KitChenPrjFoodView extends LinearLayout {
if (languageType.equals(PrinterDeviceBean.LANGUAGE_TWO)) {
//語言二
if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName2())) {
layout.addView(getOtherLanguageView(item.getItemType(), item.getProductName2(), item.getNumber()));
addView(getOtherLanguageView(item.getItemType(), item.getProductName2(), item.getNumber()));
}
} else if (languageType.equals(PrinterDeviceBean.LANGUAGE_THREE)) {
//語言三
if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName3())) {
layout.addView(getOtherLanguageView(item.getItemType(), item.getProductName3(), item.getNumber()));
addView(getOtherLanguageView(item.getItemType(), item.getProductName3(), item.getNumber()));
}
} else {
//語言一或其他
if (TextUtil.isNotEmptyOrNullOrUndefined(item.getProductName())) {
layout.addView(getOtherLanguageView(item.getItemType(), item.getProductName(), item.getNumber()));
addView(getOtherLanguageView(item.getItemType(), item.getProductName(), item.getNumber()));
}
}
}
addView(view);
// addView(view);
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/layout_item_select_category"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_55"
android:gravity="center_vertical"
......@@ -27,4 +30,13 @@
android:layout_height="@dimen/dp_24"
android:button="@drawable/selector_radio_circle_bg" />
</LinearLayout>
</FrameLayout>
\ No newline at end of file
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_select_category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment