@@ -86,7 +86,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
boolean isCloud=((SectionItem)section.getItemAt(itemIndex)).getIsCloud();//是否云端商品 | |||
if(isCloud) | |||
{ | |||
Sc_text.setText("下载"); | |||
Sc_text.setText(ConfigName.getInstance().app.getString(R.string.btn_download)); | |||
delete_text.setVisibility(View.GONE); | |||
sc_image.setVisibility(View.GONE); | |||
if(((SectionItem)section.getItemAt(itemIndex)).getIsdownload()) | |||
@@ -95,7 +95,7 @@ public class QDListSectionAdapter extends QMUIDefaultStickySectionAdapter { | |||
} | |||
}else | |||
{ | |||
Sc_text.setText("上传"); | |||
Sc_text.setText(ConfigName.getInstance().app.getString(R.string.btn_update)); | |||
delete_text.setVisibility(View.VISIBLE); | |||
sc_image.setVisibility(View.VISIBLE); | |||
Sc_text.setVisibility(View.VISIBLE); | |||
@@ -11,6 +11,7 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import com.apkfuns.logutils.LogUtils; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.util.GoodsDBUtil; | |||
import com.bonait.bnframework.common.image.MyBitmapUtils; | |||
@@ -39,7 +40,7 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
LogUtils.d(" holder.binding.name.getTextSize()="+holder.binding.name.getTextSize()); | |||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||
if(holder.binding.name.getTextSize()>32||holder.binding.name.getTextSize()<28){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.add.setVisibility(View.GONE); | |||
@@ -67,7 +68,7 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
@Override | |||
public void onClick(View view) { | |||
if(downLoadGoods(view,position)){ | |||
ToastUtils.info("下载成功"); | |||
ToastUtils.info(ConfigName.getInstance().app.getString(R.string.text_downloadsuc)); | |||
holder.binding.downLoad.setVisibility(View.GONE); | |||
} | |||
} | |||
@@ -78,7 +79,7 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||
@Override | |||
public void onClick(View view) { | |||
if (GoodsDBUtil.getByName(goods.name)==null) { | |||
ToastUtils.warning("请先下载该商品!"); | |||
ToastUtils.warning(ConfigName.getInstance().app.getString(R.string.text_downloadinfo)); | |||
} else { | |||
onItemClick(view,position); | |||
} | |||
@@ -40,7 +40,7 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||
@Override | |||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||
try { | |||
if(holder.binding.name.getTextSize()> 34 || holder.binding.name.getTextSize()< 30){ | |||
if(holder.binding.name.getTextSize()> 30 || holder.binding.name.getTextSize()< 28){ | |||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||
} | |||
holder.binding.add.setVisibility(View.GONE); | |||
@@ -15,7 +15,7 @@ | |||
android:layout_height="@dimen/dp_70" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:text="刷 新" | |||
android:text="@string/btn_refresh" | |||
android:background="@drawable/bg_round15_yellow_btn" | |||
android:layout_alignParentEnd="true" | |||
android:layout_marginEnd="@dimen/dp_20" | |||
@@ -28,7 +28,7 @@ | |||
android:layout_height="@dimen/dp_70" | |||
android:textSize="@dimen/sp_32" | |||
android:textColor="@color/white" | |||
android:text="下载所有商品" | |||
android:text="@string/btn_downloadall" | |||
android:background="@drawable/bg_round15_yellow_btn" | |||
android:layout_marginEnd="@dimen/dp_20" | |||
android:layout_marginStart="@dimen/dp_20" | |||
@@ -51,7 +51,7 @@ | |||
android:layout_alignParentEnd="true" | |||
android:ellipsize="middle" | |||
android:textSize="@dimen/sp_32" | |||
android:text="上传所有商品" | |||
android:text="@string/btn_updateall" | |||
android:textColor="#823E17" | |||
android:gravity="center" | |||
android:layout_alignParentBottom="true" | |||
@@ -72,7 +72,7 @@ | |||
android:layout_alignParentEnd="true" | |||
android:ellipsize="middle" | |||
android:textSize="@dimen/sp_32" | |||
android:text="删除所有商品" | |||
android:text="@string/btn_deleteall" | |||
android:textColor="#823E17" | |||
android:gravity="center" | |||
android:layout_alignParentBottom="true" | |||
@@ -95,10 +95,10 @@ | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_alignParentBottom="true" | |||
android:text="上传" | |||
android:text="@string/btn_update" | |||
android:textAlignment="center" | |||
android:textColor="#BEAA6A" | |||
android:textSize="12dp" /> | |||
android:textSize="10dp" /> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
@@ -126,10 +126,10 @@ | |||
android:layout_height="wrap_content" | |||
android:layout_alignParentRight="true" | |||
android:layout_alignParentBottom="true" | |||
android:text="删除" | |||
android:text="@string/btn_delete" | |||
android:textAlignment="center" | |||
android:textColor="#BEAA6A" | |||
android:textSize="12dp" /> | |||
android:textSize="10dp" /> | |||
</RelativeLayout> | |||
</RelativeLayout> | |||
<!-- <TextView--> | |||
@@ -57,7 +57,7 @@ | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="下载" | |||
android:text="@string/btn_download" | |||
android:layout_toRightOf="@id/img3" | |||
android:layout_centerVertical="true" | |||
android:textColor="@color/black" | |||
@@ -31,7 +31,7 @@ | |||
tools:text="三月瓜" | |||
android:textAlignment="center" | |||
android:textColor="@color/black" | |||
android:textSize="@dimen/sp_32" | |||
android:textSize="30dp" | |||
android:textStyle="bold" | |||
android:ellipsize="middle" | |||
android:lines="1" | |||
@@ -59,19 +59,19 @@ | |||
<ImageView | |||
android:id="@+id/img1" | |||
android:layout_width="35dp" | |||
android:layout_height="35dp" | |||
android:layout_width="25dp" | |||
android:layout_height="25dp" | |||
android:layout_centerVertical="true" | |||
android:src="@mipmap/ysc" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="上传" | |||
android:text="@string/btn_update" | |||
android:layout_toRightOf="@id/img1" | |||
android:layout_centerVertical="true" | |||
android:textColor="@color/black" | |||
android:textSize="@dimen/sp_24" /> | |||
android:textSize="16dp" /> | |||
</RelativeLayout> | |||
@@ -85,19 +85,19 @@ | |||
<ImageView | |||
android:id="@+id/img2" | |||
android:layout_width="35dp" | |||
android:layout_height="35dp" | |||
android:layout_width="25dp" | |||
android:layout_height="25dp" | |||
android:layout_centerVertical="true" | |||
android:src="@mipmap/ysc1" /> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="删除" | |||
android:text="@string/btn_delete" | |||
android:layout_toRightOf="@id/img2" | |||
android:layout_centerVertical="true" | |||
android:textColor="@color/black" | |||
android:textSize="@dimen/sp_24" /> | |||
android:textSize="16dp" /> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
@@ -25,7 +25,7 @@ | |||
android:layout_marginLeft="@dimen/dp_50" | |||
app:layout_constraintTop_toBottomOf="@id/title2" | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:text="选择图片:" | |||
android:text="@string/text_selectpic" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -50,7 +50,7 @@ | |||
android:layout_marginLeft="@dimen/dp_50" | |||
app:layout_constraintTop_toBottomOf="@id/desc2" | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:text="菜品名称:" | |||
android:text="@string/text_recipename" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -59,7 +59,7 @@ | |||
android:layout_width="@dimen/dp_400" | |||
android:layout_height="@dimen/dp_90" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入菜品名称" | |||
android:hint="@string/text_inputrecipe" | |||
android:inputType="text" | |||
android:lines="1" | |||
android:padding="@dimen/dp_3" | |||
@@ -82,7 +82,7 @@ | |||
android:layout_marginLeft="@dimen/dp_480" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="确认" | |||
android:text="@string/tip_save_confirm" | |||
/> | |||
<TextView | |||
@@ -94,7 +94,7 @@ | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="上一步" | |||
android:text="@string/text_prev" | |||
/> | |||
<ImageView | |||
@@ -12,9 +12,10 @@ | |||
android:layout_height="@dimen/dp_80" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:textStyle="bold" | |||
android:background="@drawable/bg_round25_top_yellow" | |||
style="@style/TextView_btn_dialog" | |||
android:text="编辑菜品" | |||
android:text="@string/text_edit" | |||
/> | |||
<TextView | |||
@@ -25,7 +26,7 @@ | |||
android:layout_marginLeft="@dimen/dp_50" | |||
app:layout_constraintTop_toBottomOf="@id/title1" | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:text="选择图片:" | |||
android:text="@string/text_selectpic" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -50,7 +51,7 @@ | |||
android:layout_marginLeft="@dimen/dp_50" | |||
app:layout_constraintTop_toBottomOf="@id/desc1" | |||
android:layout_marginTop="@dimen/dp_20" | |||
android:text="菜品名称:" | |||
android:text="@string/text_recipename" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -59,7 +60,7 @@ | |||
android:layout_width="@dimen/dp_400" | |||
android:layout_height="@dimen/dp_90" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入菜品名称" | |||
android:hint="@string/text_inputrecipe" | |||
android:inputType="text" | |||
android:lines="1" | |||
android:padding="@dimen/dp_3" | |||
@@ -82,7 +83,7 @@ | |||
android:layout_marginLeft="@dimen/dp_480" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="下一步" | |||
android:text="@string/btn_next" | |||
/> | |||
<TextView | |||
@@ -94,7 +95,7 @@ | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="取消" | |||
android:text="@string/btn_cancel" | |||
/> | |||
<ImageView | |||
@@ -12,9 +12,10 @@ | |||
android:layout_height="@dimen/dp_80" | |||
app:layout_constraintTop_toTopOf="parent" | |||
app:layout_constraintLeft_toLeftOf="parent" | |||
android:textStyle="bold" | |||
android:background="@drawable/bg_round25_top_yellow" | |||
style="@style/TextView_btn_dialog" | |||
android:text="选择属性" | |||
android:text="@string/text_selectab" | |||
/> | |||
<TextView | |||
@@ -25,7 +26,7 @@ | |||
android:layout_marginLeft="@dimen/dp_20" | |||
app:layout_constraintTop_toTopOf="parent" | |||
android:layout_marginTop="@dimen/dp_100" | |||
android:text="已有组合:" | |||
android:text="@string/text_commodityab" | |||
style="@style/TextView_desc" | |||
/> | |||
@@ -85,7 +86,7 @@ | |||
android:layout_marginTop="@dimen/dp_30" | |||
style="@style/TextView_btn_dialog" | |||
tools:background="@drawable/bg_round25_gray_btn" | |||
android:text="下一步" | |||
android:text="@string/btn_next" | |||
/> | |||
<TextView | |||
@@ -98,7 +99,7 @@ | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
style="@style/TextView_btn_dialog" | |||
android:text="上一步" | |||
android:text="@string/text_prev" | |||
/> | |||
<ImageView | |||
@@ -90,4 +90,23 @@ | |||
<string name="text_devicedisconnect">Device connection: DisConnected</string> | |||
<string name="btn_return">Return</string> | |||
<string name="text_top_cpgl">Recipe Management</string> | |||
<string name="btn_downloadall">Download All</string> | |||
<string name="btn_refresh">Refresh</string> | |||
<string name="btn_download">Download</string> | |||
<string name="text_downloadsuc">Download Successful</string> | |||
<string name="text_downloadinfo">Please download the product first!</string> | |||
<string name="btn_update">Update</string> | |||
<string name="btn_delete">Delete</string> | |||
<string name="btn_deleteall">Delete All</string> | |||
<string name="btn_updateall">Update All</string> | |||
<string name="text_edit">Edit Recipe</string> | |||
<string name="text_selectpic">Select Picture:</string> | |||
<string name="text_recipename">Recipe Name:</string> | |||
<string name="btn_cancel">Cancel</string> | |||
<string name="btn_next">Next</string> | |||
<string name="text_inputrecipe">Please enter the recipe name!</string> | |||
<string name="text_selectab">Select Attribute</string> | |||
<string name="text_commodityab">Commodity Attribute:</string> | |||
<string name="text_defaultab">Default Attribute:</string> | |||
<string name="text_prev">Prev</string> | |||
</resources> |
@@ -90,4 +90,23 @@ | |||
<string name="text_devicedisconnect">设备状态:未连接</string> | |||
<string name="btn_return">返 回</string> | |||
<string name="text_top_cpgl">菜品管理</string> | |||
<string name="btn_downloadall">下载所有商品</string> | |||
<string name="btn_refresh">刷 新</string> | |||
<string name="btn_download">下载</string> | |||
<string name="text_downloadsuc">下载成功!</string> | |||
<string name="text_downloadinfo">请先下载该商品</string> | |||
<string name="btn_update">上传</string> | |||
<string name="btn_delete">删除</string> | |||
<string name="btn_deleteall">删除所有商品</string> | |||
<string name="btn_updateall">上传所有商品</string> | |||
<string name="text_edit">编辑菜品</string> | |||
<string name="text_selectpic">选择图片:</string> | |||
<string name="text_recipename">菜品名称:</string> | |||
<string name="btn_cancel">取消</string> | |||
<string name="btn_next">下一步</string> | |||
<string name="text_inputrecipe">请输入菜品名称!</string> | |||
<string name="text_selectab">选择属性</string> | |||
<string name="text_commodityab">商品属性:</string> | |||
<string name="text_defaultab">默认属性:</string> | |||
<string name="text_prev">上一步</string> | |||
</resources> |