@@ -1,12 +1,14 @@ | |||||
package com.bonait.bnframework.ViewModel.ActivityViewModel; | package com.bonait.bnframework.ViewModel.ActivityViewModel; | ||||
import android.app.Activity; | import android.app.Activity; | ||||
import android.content.Intent; | |||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.view.KeyEvent; | import android.view.KeyEvent; | ||||
import android.view.View; | import android.view.View; | ||||
import android.widget.LinearLayout; | import android.widget.LinearLayout; | ||||
import android.widget.TextView; | import android.widget.TextView; | ||||
import androidx.annotation.Nullable; | |||||
import androidx.viewpager.widget.ViewPager; | import androidx.viewpager.widget.ViewPager; | ||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
@@ -34,6 +36,7 @@ import com.bonait.bnframework.common.utils.NetworkUtils; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.common.view.BottomNavigationBar; | import com.bonait.bnframework.common.view.BottomNavigationBar; | ||||
import com.bonait.bnframework.manager.ActivityLifecycleManager; | import com.bonait.bnframework.manager.ActivityLifecycleManager; | ||||
import com.bonait.bnframework.ui.activity.EditClassifyActivity; | |||||
import com.bonait.bnframework.ui.fragment.HomeFoodsFragment; | import com.bonait.bnframework.ui.fragment.HomeFoodsFragment; | ||||
import com.lzy.okgo.OkGo; | import com.lzy.okgo.OkGo; | ||||
import com.qmuiteam.qmui.widget.QMUIViewPager; | import com.qmuiteam.qmui.widget.QMUIViewPager; | ||||
@@ -45,7 +48,7 @@ import butterknife.ButterKnife; | |||||
import butterknife.OnClick; | import butterknife.OnClick; | ||||
public class BottomNavigationNewActivity extends BaseActivity { | public class BottomNavigationNewActivity extends BaseActivity { | ||||
private static final String TAG= "BottomNavigationNewActivity ==>"; | |||||
//region 变量 | //region 变量 | ||||
@BindView(R.id.navigation) | @BindView(R.id.navigation) | ||||
BottomNavigationBar bottomNavigationView; | BottomNavigationBar bottomNavigationView; | ||||
@@ -65,6 +68,7 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
//region 界面私立 | //region 界面私立 | ||||
public Activity activity; | public Activity activity; | ||||
private HomeFoodsFragment homeFoodsFragment; | |||||
@Override | @Override | ||||
protected void onCreate(Bundle savedInstanceState) { | protected void onCreate(Bundle savedInstanceState) { | ||||
@@ -123,8 +127,9 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
* viewPager里添加fragment | * viewPager里添加fragment | ||||
*/ | */ | ||||
private void initFragment() { | private void initFragment() { | ||||
homeFoodsFragment = new HomeFoodsFragment(); | |||||
FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager()); | FragmentAdapter fragmentAdapter = new FragmentAdapter(getSupportFragmentManager()); | ||||
fragmentAdapter.addFragment(new HomeFoodsFragment()); | |||||
fragmentAdapter.addFragment(homeFoodsFragment); | |||||
// fragmentAdapter.addFragment(new HomeFragmentPR()); | // fragmentAdapter.addFragment(new HomeFragmentPR()); | ||||
fragmentAdapter.addFragment(new Home4Fragment()); | fragmentAdapter.addFragment(new Home4Fragment()); | ||||
// fragmentAdapter.addFragment(new HomeFragmentSBKZ()); | // fragmentAdapter.addFragment(new HomeFragmentSBKZ()); | ||||
@@ -632,4 +637,23 @@ public class BottomNavigationNewActivity extends BaseActivity { | |||||
} | } | ||||
} | } | ||||
//endregion | //endregion | ||||
public static final int REQUEST_CLASSIFY_ACTIVITY = 1000; | |||||
@Override | |||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | |||||
super.onActivityResult(requestCode, resultCode, data); | |||||
LogUtils.d(TAG+" onActivityResult requestCode="+requestCode+" resultCode="+resultCode+" data="+data); | |||||
if (requestCode == REQUEST_CLASSIFY_ACTIVITY&& resultCode==RESULT_OK) { | |||||
if(homeFoodsFragment!=null){ | |||||
homeFoodsFragment.updateLocalData(); | |||||
} | |||||
} | |||||
} | |||||
public void jumpClassifyActivity(){ | |||||
Intent intent = new Intent(BottomNavigationNewActivity.this, EditClassifyActivity.class); | |||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |||||
startActivityForResult(intent,REQUEST_CLASSIFY_ACTIVITY); | |||||
} | |||||
} | } |
@@ -14,6 +14,7 @@ import androidx.appcompat.app.AppCompatActivity; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.ViewModel.ActivityViewModel.BottomNavigationNewActivity; | |||||
import com.bonait.bnframework.ViewModel.ActivityViewModel.DishTestActivity; | import com.bonait.bnframework.ViewModel.ActivityViewModel.DishTestActivity; | ||||
import com.bonait.bnframework.ViewModel.ActivityViewModel.LoginActivity; | import com.bonait.bnframework.ViewModel.ActivityViewModel.LoginActivity; | ||||
import com.bonait.bnframework.ViewModel.CustomView.XComDialog; | import com.bonait.bnframework.ViewModel.CustomView.XComDialog; | ||||
@@ -24,7 +25,6 @@ import com.bonait.bnframework.common.message.MessageManager; | |||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | import com.bonait.bnframework.common.utils.AlertDialogUtils; | ||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.manager.ActivityLifecycleManager; | import com.bonait.bnframework.manager.ActivityLifecycleManager; | ||||
import com.bonait.bnframework.ui.activity.EditClassifyActivity; | |||||
import com.bonait.bnframework.ui.activity.SetSeasoningActivity; | import com.bonait.bnframework.ui.activity.SetSeasoningActivity; | ||||
import com.orhanobut.logger.Logger; | import com.orhanobut.logger.Logger; | ||||
@@ -72,7 +72,7 @@ public class Home4Fragment extends BaseFragment { | |||||
switch (view.getId()) { | switch (view.getId()) { | ||||
case R.id.kaishipengren: | case R.id.kaishipengren: | ||||
// MessageManager.getInstance().sendMessage(MessageName.SelectZY, 0); | // MessageManager.getInstance().sendMessage(MessageName.SelectZY, 0); | ||||
OpenActivity(EditClassifyActivity.class); | |||||
((BottomNavigationNewActivity)getActivity()).jumpClassifyActivity(); | |||||
break; | break; | ||||
case R.id.shebeikongzhi: | case R.id.shebeikongzhi: | ||||
MessageManager.getInstance().sendMessage(MessageName.SelectZY, 2); | MessageManager.getInstance().sendMessage(MessageName.SelectZY, 2); | ||||
@@ -14,16 +14,14 @@ import com.bonait.bnframework.HBL.Interface.IRun; | |||||
import com.bonait.bnframework.HBL.Interface.IRunT; | import com.bonait.bnframework.HBL.Interface.IRunT; | ||||
import com.bonait.bnframework.HBL.Thread.IThread; | import com.bonait.bnframework.HBL.Thread.IThread; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | import com.bonait.bnframework.HBL.Thread.ThreadManager; | ||||
import com.bonait.bnframework.Service.AnalogConvert; | |||||
import com.bonait.bnframework.Service.ModbusHelper; | import com.bonait.bnframework.Service.ModbusHelper; | ||||
import com.bonait.bnframework.ViewModel.CustomView.MyStatus; | |||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.QueryDB; | import com.bonait.bnframework.common.db.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | import com.bonait.bnframework.common.db.mode.BPA_SILOS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SILOS_CALIBRATE; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.ViewModel.CustomView.MyStatus; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
@@ -1095,27 +1093,6 @@ public class ExecuteTheRecipe { | |||||
} | } | ||||
} | } | ||||
new Thread(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
try { | |||||
WritePLC("初始化", true, null); | |||||
Thread.sleep(500); | |||||
WritePLC("初始化", false, null); | |||||
ExecuteTheRecipe.WritePLC("温控开关", false, null);//开关闭合 | |||||
ExecuteTheRecipe.WritePLC("暂停开关", false, null);//开关闭合 | |||||
ExecuteTheRecipe.WritePLC("校准时间", 50, null);//默认校准时间5秒 | |||||
ExecuteTheRecipe.WritePLC("料仓1校准开关", false, null);//默认校准时间5秒 | |||||
ExecuteTheRecipe.WritePLC("料仓2校准开关", false, null);//默认校准时间5秒 | |||||
ExecuteTheRecipe.WritePLC("料仓3校准开关", false, null);//默认校准时间5秒 | |||||
} catch (InterruptedException e) { | |||||
ToastUtils.info("异常信息:" + e.getMessage()); | |||||
} | |||||
} | |||||
}).start(); | |||||
ThreadManager.get().StartLong("PLC设备数据监听", true, new IThread() { | ThreadManager.get().StartLong("PLC设备数据监听", true, new IThread() { | ||||
@Override | @Override | ||||
@@ -1140,7 +1117,7 @@ public class ExecuteTheRecipe { | |||||
LogUtils.d("异常信息:" + ex.getMessage()); | LogUtils.d("异常信息:" + ex.getMessage()); | ||||
ToastUtils.error("异常信息:" + ex.getMessage()); | ToastUtils.error("异常信息:" + ex.getMessage()); | ||||
} | } | ||||
Thread.sleep(100); | |||||
Thread.sleep(50); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -38,9 +38,9 @@ public class DisplayManager | |||||
/******************************参考的屏幕数据***************************/ | /******************************参考的屏幕数据***************************/ | ||||
/** 参照分辨率 */ | /** 参照分辨率 */ | ||||
private static int miReferencedMaxWidth = 1024; | |||||
private static int miReferencedMaxWidth = 800; | |||||
/** 参照分辨率 */ | /** 参照分辨率 */ | ||||
private static int miReferencedMaxHeight = 768; | |||||
private static int miReferencedMaxHeight = 1208; | |||||
/** 参照屏幕密度,基于160dpi */ | /** 参照屏幕密度,基于160dpi */ | ||||
private static float mfReferencedScreenDensity = 1.0f; | private static float mfReferencedScreenDensity = 1.0f; | ||||
@@ -354,11 +354,22 @@ public class EditClassifyActivity extends BaseActivity { | |||||
viewBinding.topbar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | viewBinding.topbar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
finish(); | |||||
finishActivity(); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@Override | |||||
protected void doOnBackPressed() { | |||||
super.doOnBackPressed(); | |||||
finishActivity(); | |||||
} | |||||
private void finishActivity(){ | |||||
setResult(RESULT_OK, null); | |||||
finish(); | |||||
} | |||||
@Override | @Override | ||||
protected String getClassName() { | protected String getClassName() { | ||||
return TAG; | return TAG; | ||||
@@ -30,7 +30,9 @@ public abstract class ClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY,Cla | |||||
@SuppressLint("SetTextI18n") | @SuppressLint("SetTextI18n") | ||||
@Override | @Override | ||||
public void onBindViewHolder(@NonNull ClassifyAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | public void onBindViewHolder(@NonNull ClassifyAdapter.ViewHolder holder, @SuppressLint("RecyclerView") int position) { | ||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
if(holder.binding.name.getTextSize()>34||holder.binding.name.getTextSize()<30){ | |||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
} | |||||
holder.binding.name.setText(mData.get(position).name+""); | holder.binding.name.setText(mData.get(position).name+""); | ||||
if(mCurrentPosition==position){ | if(mCurrentPosition==position){ | ||||
holder.binding.name.setTextColor(Color.parseColor("#ffffff")); | holder.binding.name.setTextColor(Color.parseColor("#ffffff")); | ||||
@@ -42,8 +44,8 @@ public abstract class ClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY,Cla | |||||
holder.binding.name.setOnClickListener(new View.OnClickListener() { | holder.binding.name.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
mCurrentPosition= position; | |||||
int lastPos = mCurrentPosition; | int lastPos = mCurrentPosition; | ||||
mCurrentPosition= position; | |||||
notifyItemChanged(lastPos); | notifyItemChanged(lastPos); | ||||
notifyItemChanged(mCurrentPosition); | notifyItemChanged(mCurrentPosition); | ||||
onItemClick(view,position); | onItemClick(view,position); | ||||
@@ -63,6 +65,7 @@ public abstract class ClassifyAdapter extends BaseAdapter<BPA_GOODS_CLASSIFY,Cla | |||||
public ViewHolder(ItemClassifyBinding view) { | public ViewHolder(ItemClassifyBinding view) { | ||||
super(view.getRoot()); | super(view.getRoot()); | ||||
binding = view; | binding = view; | ||||
// DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
} | } | ||||
} | } | ||||
@@ -33,7 +33,9 @@ public abstract class CloudGoodsAdapter extends BaseAdapter<BPA_GOODS,CloudGoods | |||||
@Override | @Override | ||||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | ||||
try { | try { | ||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){ | |||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
} | |||||
holder.binding.add.setVisibility(View.GONE); | holder.binding.add.setVisibility(View.GONE); | ||||
BPA_GOODS goods = mData.get(position); | BPA_GOODS goods = mData.get(position); | ||||
@@ -32,7 +32,9 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||||
@Override | @Override | ||||
public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | public void onBindViewHolder(@NonNull GoodsViewHolder holder, @SuppressLint("RecyclerView") int position) { | ||||
try { | try { | ||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
if(holder.binding.name.getTextSize()>28||holder.binding.name.getTextSize()<24){ | |||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
} | |||||
holder.binding.add.setVisibility(View.GONE); | holder.binding.add.setVisibility(View.GONE); | ||||
if(!ConfigName.getInstance().user.name.equals("一般用户")){ | if(!ConfigName.getInstance().user.name.equals("一般用户")){ | ||||
holder.binding.edit.setVisibility(View.VISIBLE); | holder.binding.edit.setVisibility(View.VISIBLE); | ||||
@@ -40,7 +42,7 @@ public abstract class LocalGoodsAdapter extends BaseAdapter<BPA_GOODS,LocalGoods | |||||
holder.binding.edit.setVisibility(View.GONE); | holder.binding.edit.setVisibility(View.GONE); | ||||
} | } | ||||
if(position == mData.size()-1&&!ConfigName.getInstance().user.name.equals("一般用户")){ | |||||
if(position == mData.size()&&!ConfigName.getInstance().user.name.equals("一般用户")){ | |||||
holder.binding.add.setVisibility(View.VISIBLE); | holder.binding.add.setVisibility(View.VISIBLE); | ||||
holder.binding.add.setOnClickListener(new View.OnClickListener() { | holder.binding.add.setOnClickListener(new View.OnClickListener() { | ||||
@Override | @Override | ||||
@@ -32,8 +32,8 @@ import com.bonait.bnframework.common.db.util.SubAttributeDBUtil; | |||||
import com.bonait.bnframework.common.db.util.SubAttributeGroupDBUtil; | import com.bonait.bnframework.common.db.util.SubAttributeGroupDBUtil; | ||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.databinding.FragmentCloudGoodsBinding; | |||||
import com.bonait.bnframework.databinding.FragmentLocalGoodsBinding; | import com.bonait.bnframework.databinding.FragmentLocalGoodsBinding; | ||||
import com.bonait.bnframework.ui.activity.EditClassifyActivity; | |||||
import com.bonait.bnframework.ui.adapter.ClassifyAdapter; | import com.bonait.bnframework.ui.adapter.ClassifyAdapter; | ||||
import com.bonait.bnframework.ui.adapter.CloudGoodsAdapter; | import com.bonait.bnframework.ui.adapter.CloudGoodsAdapter; | ||||
@@ -46,8 +46,7 @@ import java.util.List; | |||||
* @date: 2024/5/9 9:48. | * @date: 2024/5/9 9:48. | ||||
*/ | */ | ||||
public class CloudGoodsFragment extends BaseFragment { | public class CloudGoodsFragment extends BaseFragment { | ||||
private FragmentLocalGoodsBinding viewBinding; | |||||
private Context context; | |||||
private FragmentCloudGoodsBinding viewBinding; | |||||
private CloudGoodsAdapter goodsAdapter; | private CloudGoodsAdapter goodsAdapter; | ||||
private ClassifyAdapter classifyAdapter; | private ClassifyAdapter classifyAdapter; | ||||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | ||||
@@ -69,24 +68,25 @@ public class CloudGoodsFragment extends BaseFragment { | |||||
@Override | @Override | ||||
protected View onCreateView() { | protected View onCreateView() { | ||||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_cloud_goods, null); | View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_cloud_goods, null); | ||||
viewBinding = FragmentLocalGoodsBinding.bind(root); | |||||
viewBinding = FragmentCloudGoodsBinding.bind(root); | |||||
return root; | return root; | ||||
} | } | ||||
@Override | @Override | ||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||||
super.onViewCreated(view, savedInstanceState); | super.onViewCreated(view, savedInstanceState); | ||||
context = getContext(); | |||||
initView(); | initView(); | ||||
updateData(); | updateData(); | ||||
} | } | ||||
@Override | |||||
protected int backViewInitOffset() { | |||||
return 0; | |||||
} | |||||
@SuppressLint("NotifyDataSetChanged") | @SuppressLint("NotifyDataSetChanged") | ||||
private void initView(){ | private void initView(){ | ||||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | DisplayManager.scaleViewGroup(viewBinding.getRoot()); | ||||
viewBinding.addClassify.setOnClickListener(view -> { | |||||
OpenActivity(EditClassifyActivity.class); | |||||
}); | |||||
goodsAdapter = new CloudGoodsAdapter(){ | goodsAdapter = new CloudGoodsAdapter(){ | ||||
@@ -148,7 +148,7 @@ public class CloudGoodsFragment extends BaseFragment { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
goodsAdapter.notifyDataSetChanged(); | |||||
goodsAdapter.setNewData(goodsList); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -107,6 +107,18 @@ public class HomeFoodsFragment extends BaseFragment { | |||||
} | } | ||||
/** | |||||
* 刷新本地商品 | |||||
*/ | |||||
public void updateLocalData(){ | |||||
LogUtils.d("updateLocalData"); | |||||
if(fragment!=null){ | |||||
if(fragment instanceof LocalGoodsFragment){ | |||||
((LocalGoodsFragment) fragment).updateData(); | |||||
} | |||||
} | |||||
} | |||||
private void requestData(){ | private void requestData(){ | ||||
if (NetworkUtils.checkNetworkAvailable(context)) { | if (NetworkUtils.checkNetworkAvailable(context)) { | ||||
if(ConfigName.getInstance().cloudGoodsList.isEmpty()){ | if(ConfigName.getInstance().cloudGoodsList.isEmpty()){ | ||||
@@ -15,7 +15,9 @@ import androidx.appcompat.app.AppCompatActivity; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.ViewModel.ActivityViewModel.BottomNavigationNewActivity; | |||||
import com.bonait.bnframework.common.base.BaseFragment; | import com.bonait.bnframework.common.base.BaseFragment; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_CLASSIFY; | ||||
import com.bonait.bnframework.common.db.util.GoodsClassifyDBUtil; | import com.bonait.bnframework.common.db.util.GoodsClassifyDBUtil; | ||||
@@ -27,7 +29,6 @@ import com.bonait.bnframework.common.utils.DisplayManager; | |||||
import com.bonait.bnframework.common.utils.ToastUtils; | import com.bonait.bnframework.common.utils.ToastUtils; | ||||
import com.bonait.bnframework.databinding.DialogDeleteClassifyBinding; | import com.bonait.bnframework.databinding.DialogDeleteClassifyBinding; | ||||
import com.bonait.bnframework.databinding.FragmentLocalGoodsBinding; | import com.bonait.bnframework.databinding.FragmentLocalGoodsBinding; | ||||
import com.bonait.bnframework.ui.activity.EditClassifyActivity; | |||||
import com.bonait.bnframework.ui.adapter.ClassifyAdapter; | import com.bonait.bnframework.ui.adapter.ClassifyAdapter; | ||||
import com.bonait.bnframework.ui.adapter.LocalGoodsAdapter; | import com.bonait.bnframework.ui.adapter.LocalGoodsAdapter; | ||||
@@ -61,6 +62,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
} | } | ||||
}; | }; | ||||
@Override | @Override | ||||
protected View onCreateView() { | protected View onCreateView() { | ||||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_local_goods, null); | View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_local_goods, null); | ||||
@@ -79,8 +81,10 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
@SuppressLint("NotifyDataSetChanged") | @SuppressLint("NotifyDataSetChanged") | ||||
private void initView(){ | private void initView(){ | ||||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | DisplayManager.scaleViewGroup(viewBinding.getRoot()); | ||||
viewBinding.addClassify.setVisibility(!ConfigName.getInstance().user.name.equals("一般用户")?View.VISIBLE:View.GONE); | |||||
viewBinding.addClassify.setOnClickListener(view -> { | viewBinding.addClassify.setOnClickListener(view -> { | ||||
OpenActivity(EditClassifyActivity.class); | |||||
((BottomNavigationNewActivity)getActivity()).jumpClassifyActivity(); | |||||
}); | }); | ||||
goodsAdapter = new LocalGoodsAdapter(){ | goodsAdapter = new LocalGoodsAdapter(){ | ||||
@@ -119,6 +123,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
@Override | @Override | ||||
protected void addGoods() { | protected void addGoods() { | ||||
} | } | ||||
}; | }; | ||||
viewBinding.recyclerGoods.setAdapter(goodsAdapter); | viewBinding.recyclerGoods.setAdapter(goodsAdapter); | ||||
@@ -139,6 +144,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
*/ | */ | ||||
@SuppressLint("NotifyDataSetChanged") | @SuppressLint("NotifyDataSetChanged") | ||||
public void updateData() { | public void updateData() { | ||||
LogUtils.d("updateData"); | |||||
goodsList.clear(); | goodsList.clear(); | ||||
classifyList.clear(); | classifyList.clear(); | ||||
@@ -147,8 +153,10 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
goodsList.addAll(GoodsDBUtil.getByClassifyId(classifyList.get(0).id)); | goodsList.addAll(GoodsDBUtil.getByClassifyId(classifyList.get(0).id)); | ||||
} | } | ||||
goodsAdapter.setNewData(goodsList); | |||||
classifyAdapter.setCurrentPosition(0); | |||||
classifyAdapter.setNewData(classifyList); | classifyAdapter.setNewData(classifyList); | ||||
goodsAdapter.notifyDataSetChanged(); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -161,6 +169,7 @@ public class LocalGoodsFragment extends BaseFragment { | |||||
public void onResume() { | public void onResume() { | ||||
super.onResume(); | super.onResume(); | ||||
LogUtils.d("LocalGoodsFragment onResume"); | LogUtils.d("LocalGoodsFragment onResume"); | ||||
} | } | ||||
@Override | @Override | ||||
@@ -0,0 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<set | |||||
xmlns:android="http://schemas.android.com/apk/res/android"> | |||||
<!--<translate android:duration="300" android:fromXDelta="-50.0%p" android:toXDelta="0.0" />--> | |||||
<translate android:duration="300" android:fromXDelta="0.0" android:toXDelta="0.0" /> | |||||
</set> |
@@ -0,0 +1,6 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<set | |||||
xmlns:android="http://schemas.android.com/apk/res/android"> | |||||
<!--<translate android:duration="300" android:fromXDelta="0.0" android:toXDelta="-50.0%p" />--> | |||||
<translate android:duration="300" android:fromXDelta="0.0" android:toXDelta="0.0" /> | |||||
</set> |
@@ -0,0 +1,20 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<set | |||||
xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:shareInterpolator="true"> | |||||
<translate android:duration="300" android:fromXDelta="100.0%p" android:toXDelta="0.0" /> | |||||
<!--<alpha android:fromAlpha="0.0"--> | |||||
<!--android:toAlpha="1.0"--> | |||||
<!--android:fillAfter="true"--> | |||||
<!--android:fillBefore="false"--> | |||||
<!--android:duration="300"/>--> | |||||
<!--<scale android:fromXScale="0.5"--> | |||||
<!--android:fromYScale="0.5"--> | |||||
<!--android:toXScale="1.0"--> | |||||
<!--android:toYScale="1.0"--> | |||||
<!--android:pivotX="65%"--> | |||||
<!--android:pivotY="50%"--> | |||||
<!--android:fillAfter="true"--> | |||||
<!--android:fillBefore="false"--> | |||||
<!--android:duration="300"/>--> | |||||
</set> |
@@ -0,0 +1,20 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<set | |||||
xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:shareInterpolator="true"> | |||||
<translate android:duration="300" android:fromXDelta="0.0" android:toXDelta="100.0%p" /> | |||||
<!--<alpha android:fromAlpha="1.0"--> | |||||
<!--android:toAlpha="0.0"--> | |||||
<!--android:fillAfter="true"--> | |||||
<!--android:fillBefore="false"--> | |||||
<!--android:duration="300"/>--> | |||||
<!--<scale android:fromXScale="1.0"--> | |||||
<!--android:fromYScale="1.0"--> | |||||
<!--android:toYScale="0.5"--> | |||||
<!--android:toXScale="0.5"--> | |||||
<!--android:pivotX="65%"--> | |||||
<!--android:pivotY="50%"--> | |||||
<!--android:fillAfter="true"--> | |||||
<!--android:fillBefore="false"--> | |||||
<!--android:duration="300"/>--> | |||||
</set> |
@@ -48,9 +48,9 @@ | |||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
android:text="确认" | android:text="确认" | ||||
android:background="@drawable/bg_round25_yellow_btn" | android:background="@drawable/bg_round25_yellow_btn" | ||||
android:layout_gravity="bottom|right" | |||||
android:layout_gravity="bottom" | |||||
android:layout_marginBottom="@dimen/dp_20" | android:layout_marginBottom="@dimen/dp_20" | ||||
android:layout_marginRight="@dimen/dp_40" | |||||
android:layout_marginLeft="@dimen/dp_500" | |||||
/> | /> | ||||
</FrameLayout> | </FrameLayout> | ||||
@@ -1,43 +1,48 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
xmlns:app="http://schemas.android.com/apk/res-auto"> | xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:orientation="vertical" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
</androidx.recyclerview.widget.RecyclerView> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:orientation="vertical" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
<TextView | |||||
android:id="@+id/line1" | |||||
android:layout_width="@dimen/dp_1" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginLeft="@dimen/dp_140" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/line1" | |||||
android:layout_width="@dimen/dp_1" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginLeft="@dimen/dp_140" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/line2" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="@dimen/dp_3" | |||||
android:background="@color/color3" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/line2" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="@dimen/dp_3" | |||||
android:background="@color/color3" | |||||
/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginLeft="@dimen/dp_141" | |||||
android:id="@+id/recycler_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
android:orientation="vertical" | |||||
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager" | |||||
app:spanCount="3" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
</RelativeLayout> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginLeft="@dimen/dp_161" | |||||
android:id="@+id/recycler_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
android:orientation="vertical" | |||||
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager" | |||||
app:spanCount="3" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
</RelativeLayout> | |||||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -6,9 +6,10 @@ | |||||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | <com.qmuiteam.qmui.widget.QMUITopBarLayout | ||||
android:id="@+id/topbar" | android:id="@+id/topbar" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" /> | |||||
android:layout_height="?attr/qmui_topbar_height" /> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/content" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_marginTop="?attr/qmui_topbar_height" | android:layout_marginTop="?attr/qmui_topbar_height" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
@@ -18,24 +19,28 @@ | |||||
android:layout_height="@dimen/dp_70"> | android:layout_height="@dimen/dp_70"> | ||||
<TextView | <TextView | ||||
android:id="@+id/localFoods" | android:id="@+id/localFoods" | ||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_width="wrap_content" | |||||
android:paddingLeft="@dimen/dp_10" | |||||
android:paddingRight="@dimen/dp_10" | |||||
android:layout_height="@dimen/dp_70" | android:layout_height="@dimen/dp_70" | ||||
android:text="本地菜谱" | android:text="本地菜谱" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textColor="#BEAA6A" | android:textColor="#BEAA6A" | ||||
android:textSize="@dimen/sp_32" | |||||
android:textSize="@dimen/sp_36" | |||||
android:textStyle="bold" /> | android:textStyle="bold" /> | ||||
<TextView | <TextView | ||||
android:id="@+id/cloudFoods" | android:id="@+id/cloudFoods" | ||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_width="wrap_content" | |||||
android:paddingLeft="@dimen/dp_10" | |||||
android:paddingRight="@dimen/dp_10" | |||||
android:layout_height="@dimen/dp_70" | android:layout_height="@dimen/dp_70" | ||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:text="云端菜谱" | android:text="云端菜谱" | ||||
android:textColor="#797373" | android:textColor="#797373" | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textSize="@dimen/sp_32" | |||||
android:textSize="@dimen/sp_36" | |||||
android:textStyle="bold" /> | android:textStyle="bold" /> | ||||
<!--暂时去掉--> | <!--暂时去掉--> | ||||
@@ -1,57 +1,67 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
xmlns:app="http://schemas.android.com/apk/res-auto"> | xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
<TextView | |||||
android:id="@+id/add_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:visibility="gone" | |||||
tools:visibility="visible" | |||||
android:layout_below="@+id/line2" | |||||
android:layout_height="@dimen/dp_70" | |||||
android:maxLines="1" | |||||
android:ellipsize="middle" | |||||
android:textSize="@dimen/sp_28" | |||||
android:text="添加分类" | |||||
android:textColor="#823E17" | |||||
android:gravity="center" | |||||
android:background="#EFE9D2"/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_below="@+id/add_classify" | |||||
android:orientation="vertical" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
</androidx.recyclerview.widget.RecyclerView> | |||||
<TextView | |||||
android:id="@+id/add_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:visibility="gone" | |||||
tools:visibility="visible" | |||||
android:layout_below="@+id/line2" | |||||
android:layout_height="@dimen/dp_90" | |||||
android:maxLines="1" | |||||
android:paddingTop="@dimen/dp_25" | |||||
android:paddingBottom="@dimen/dp_25" | |||||
android:layout_marginBottom="2dp" | |||||
android:ellipsize="middle" | |||||
android:textSize="@dimen/sp_32" | |||||
android:text="添加分类" | |||||
android:textColor="#823E17" | |||||
android:gravity="center" | |||||
android:background="#EFE9D2"/> | |||||
<TextView | |||||
android:id="@+id/line1" | |||||
android:layout_width="@dimen/dp_1" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginLeft="@dimen/dp_140" | |||||
/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:id="@+id/recycler_classify" | |||||
android:layout_width="@dimen/dp_140" | |||||
android:layout_below="@+id/add_classify" | |||||
android:orientation="vertical" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
<TextView | |||||
android:id="@+id/line2" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="@dimen/dp_3" | |||||
android:background="@color/color3" | |||||
/> | |||||
<TextView | |||||
android:id="@+id/line1" | |||||
android:layout_width="@dimen/dp_1" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/color3" | |||||
android:layout_marginLeft="@dimen/dp_140" | |||||
/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginLeft="@dimen/dp_141" | |||||
android:id="@+id/recycler_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
android:orientation="vertical" | |||||
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager" | |||||
app:spanCount="3" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
</RelativeLayout> | |||||
<TextView | |||||
android:id="@+id/line2" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="@dimen/dp_3" | |||||
android:background="@color/color3" | |||||
/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginLeft="@dimen/dp_21" | |||||
android:id="@+id/recycler_goods" | |||||
android:layout_width="match_parent" | |||||
android:layout_marginBottom="@dimen/dp_95" | |||||
android:layout_toRightOf="@id/recycler_classify" | |||||
android:orientation="vertical" | |||||
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager" | |||||
app:spanCount="3" | |||||
android:layout_height="match_parent"> | |||||
</androidx.recyclerview.widget.RecyclerView> | |||||
</RelativeLayout> | |||||
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout> |
@@ -1,23 +1,21 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="@dimen/dp_70" | |||||
android:layout_height="wrap_content" | |||||
tools:background="@color/blue" | tools:background="@color/blue" | ||||
android:paddingBottom="@dimen/dp_2" | |||||
xmlns:tools="http://schemas.android.com/tools"> | xmlns:tools="http://schemas.android.com/tools"> | ||||
<TextView | <TextView | ||||
android:id="@+id/name" | android:id="@+id/name" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:maxLines="4" | android:maxLines="4" | ||||
android:ellipsize="middle" | android:ellipsize="middle" | ||||
android:textSize="@dimen/sp_28" | |||||
android:textSize="@dimen/sp_32" | |||||
android:textColor="#823E17" | android:textColor="#823E17" | ||||
android:paddingLeft="@dimen/dp_10" | |||||
android:paddingRight="@dimen/dp_10" | |||||
android:paddingTop="@dimen/dp_15" | |||||
android:paddingBottom="@dimen/dp_15" | |||||
android:paddingTop="@dimen/dp_25" | |||||
android:paddingBottom="@dimen/dp_25" | |||||
android:layout_marginBottom="2dp" | |||||
tools:text="川菜系列" | tools:text="川菜系列" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:background="#EFE9D2" | android:background="#EFE9D2" | ||||
@@ -29,7 +29,7 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:maxLines="1" | android:maxLines="1" | ||||
android:text="三月瓜" | |||||
tools:text="三月瓜" | |||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="@dimen/sp_26" | android:textSize="@dimen/sp_26" | ||||
@@ -45,18 +45,18 @@ | |||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:background="#ddFFFFFF" | android:background="#ddFFFFFF" | ||||
android:layout_height="@dimen/dp_40"> | |||||
android:layout_height="@dimen/dp_60"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/downLoad" | android:id="@+id/downLoad" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
android:layout_height="@dimen/dp_40"> | |||||
android:gravity="center" | |||||
android:layout_height="match_parent"> | |||||
<ImageView | <ImageView | ||||
android:id="@+id/img3" | android:id="@+id/img3" | ||||
android:layout_width="25dp" | |||||
android:layout_height="25dp" | |||||
android:layout_marginLeft="60dp" | |||||
android:layout_width="35dp" | |||||
android:layout_height="35dp" | |||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:src="@mipmap/yxz" /> | android:src="@mipmap/yxz" /> | ||||
@@ -67,7 +67,7 @@ | |||||
android:layout_toRightOf="@id/img3" | android:layout_toRightOf="@id/img3" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="@dimen/sp_18" /> | |||||
android:textSize="@dimen/sp_24" /> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -29,7 +29,7 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:maxLines="1" | android:maxLines="1" | ||||
android:text="三月瓜" | |||||
tools:text="三月瓜" | |||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="@dimen/sp_26" | android:textSize="@dimen/sp_26" | ||||
@@ -45,20 +45,20 @@ | |||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintBottom_toBottomOf="parent" | app:layout_constraintBottom_toBottomOf="parent" | ||||
android:background="#ddFFFFFF" | android:background="#ddFFFFFF" | ||||
android:layout_height="@dimen/dp_40"> | |||||
android:layout_height="@dimen/dp_60"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/upload" | android:id="@+id/upload" | ||||
android:layout_width="0dp" | android:layout_width="0dp" | ||||
android:layout_height="@dimen/dp_40" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:gravity="center" | |||||
android:layout_centerHorizontal="true"> | android:layout_centerHorizontal="true"> | ||||
<ImageView | <ImageView | ||||
android:id="@+id/img1" | android:id="@+id/img1" | ||||
android:layout_width="25dp" | |||||
android:layout_height="25dp" | |||||
android:layout_marginLeft="15dp" | |||||
android:layout_width="35dp" | |||||
android:layout_height="35dp" | |||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:src="@mipmap/ysc" /> | android:src="@mipmap/ysc" /> | ||||
@@ -69,21 +69,26 @@ | |||||
android:layout_toRightOf="@id/img1" | android:layout_toRightOf="@id/img1" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="@dimen/sp_18" /> | |||||
android:textSize="@dimen/sp_24" /> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
<TextView | |||||
android:layout_width="3dp" | |||||
android:layout_height="match_parent" | |||||
android:background="@color/white" | |||||
/> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/delete" | android:id="@+id/delete" | ||||
android:layout_width="0dp" | android:layout_width="0dp" | ||||
android:layout_height="@dimen/dp_40" | |||||
android:layout_height="match_parent" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:gravity="center" | |||||
android:layout_centerHorizontal="true"> | android:layout_centerHorizontal="true"> | ||||
<ImageView | <ImageView | ||||
android:id="@+id/img2" | android:id="@+id/img2" | ||||
android:layout_width="25dp" | |||||
android:layout_height="25dp" | |||||
android:layout_marginLeft="15dp" | |||||
android:layout_width="35dp" | |||||
android:layout_height="35dp" | |||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:src="@mipmap/ysc1" /> | android:src="@mipmap/ysc1" /> | ||||
@@ -94,7 +99,7 @@ | |||||
android:layout_toRightOf="@id/img2" | android:layout_toRightOf="@id/img2" | ||||
android:layout_centerVertical="true" | android:layout_centerVertical="true" | ||||
android:textColor="@color/black" | android:textColor="@color/black" | ||||
android:textSize="@dimen/sp_18" /> | |||||
android:textSize="@dimen/sp_24" /> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -46,7 +46,16 @@ | |||||
<item name="qmui_dialog_max_width">@dimen/dp_400</item> | <item name="qmui_dialog_max_width">@dimen/dp_400</item> | ||||
<item name="qmui_dialog_min_width">@dimen/dp_600</item> | <item name="qmui_dialog_min_width">@dimen/dp_600</item> | ||||
<item name="qmui_dialog_edit_content_style">@style/DialogTheme2ContentStyle</item> | <item name="qmui_dialog_edit_content_style">@style/DialogTheme2ContentStyle</item> | ||||
<item name="android:windowAnimationStyle">@style/activityanim</item> | |||||
</style> | |||||
<style name="activityanim" parent="@android:style/Animation"> | |||||
<item name="android:activityOpenEnterAnimation">@anim/slide_right_in</item> | |||||
<item name="android:activityOpenExitAnimation">@anim/slide_left_out</item> | |||||
<item name="android:activityCloseEnterAnimation">@anim/slide_left_in</item> | |||||
<item name="android:activityCloseExitAnimation">@anim/slide_right_out</item> | |||||
</style> | </style> | ||||
<style name="ProgressBar" parent="@android:style/Widget.ProgressBar.Horizontal"> | <style name="ProgressBar" parent="@android:style/Widget.ProgressBar.Horizontal"> | ||||