@ -0,0 +1,180 @@
|
|||||||
|
package com.example.test1.Activity;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Fragment;
|
||||||
|
import android.app.FragmentManager;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
|
import com.example.test1.Fragment.RightFragment;
|
||||||
|
import com.example.test1.R;
|
||||||
|
import com.example.test1.entity.BrandBean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class BandActivity extends AppCompatActivity {
|
||||||
|
private FragmentManager fragmentManager;
|
||||||
|
private FragmentTransaction fragmentTransaction;
|
||||||
|
private Fragment leftFragment;
|
||||||
|
private RightFragment rightFragment;
|
||||||
|
private TextView tv_LV,tv_Prada,tv_Hermers,tv_Miumiu;
|
||||||
|
private TextView btn;
|
||||||
|
private String[]names1={"LV爆款包包","LV经典包包","LV特色包包","LV家喻户晓款","LV人手一只款","LV值得收藏款","LV新款包包"};
|
||||||
|
private String[]sales1={"月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%"};
|
||||||
|
private String[]prices1={"$23","$41","$32","$23","$41","$32","$23"};
|
||||||
|
private int []imgs1={R.drawable.lv1,R.drawable.lv2,R.drawable.lv3,R.drawable.lv4,R.drawable.lv5,R.drawable.lv6,R.drawable.lv7,};
|
||||||
|
|
||||||
|
|
||||||
|
private String[]names2={"Hermes经典包包","Hermes新款包包"};
|
||||||
|
private String[]sales2={"月售520 好评度80%","月售520 好评度80%"};
|
||||||
|
private String[]prices2={"$23","$41"};
|
||||||
|
private int []imgs2={R.drawable.hermes1,R.drawable.hermes2};
|
||||||
|
|
||||||
|
private String[]names3={"miumiu特色包包"};
|
||||||
|
private String[]sales3={"月售520 好评度80%"};
|
||||||
|
private String[]prices3={"$23"};
|
||||||
|
private int []imgs3={R.drawable.miumiu1};
|
||||||
|
|
||||||
|
private String[]names4={"Prada特色包包","Prada经典包包","Prada新款包包","Prada贵妇包包"};
|
||||||
|
private String[]sales4={"月售520 好评度80%","月售520 好评度80%","月售520 好评度80%","月售520 好评度80%"};
|
||||||
|
private String[]prices4={"$23","$41","$32","$32"};
|
||||||
|
private int []imgs4={R.drawable.prada1,R.drawable.prada2,R.drawable.prada3,R.drawable.prada4};
|
||||||
|
|
||||||
|
private Map<String, List<BrandBean>>map;
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressLint("MissingInflatedId")
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.band_main);
|
||||||
|
btn=findViewById(R.id.tv_business);
|
||||||
|
btn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent=new Intent(BandActivity.this,IntroductionActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setData();
|
||||||
|
init();
|
||||||
|
clickEvent();
|
||||||
|
}
|
||||||
|
private void init(){
|
||||||
|
|
||||||
|
fragmentManager = getFragmentManager();
|
||||||
|
|
||||||
|
leftFragment=fragmentManager.findFragmentById(R.id.left);
|
||||||
|
tv_LV=findViewById(R.id.tv_LV);
|
||||||
|
|
||||||
|
tv_Prada=findViewById(R.id.tv_Prada);
|
||||||
|
|
||||||
|
tv_Miumiu=findViewById(R.id.tv_miumiu);
|
||||||
|
|
||||||
|
tv_Hermers=findViewById(R.id.tv_Hermers);
|
||||||
|
|
||||||
|
}
|
||||||
|
private void setData(){
|
||||||
|
map=new HashMap<>();
|
||||||
|
List<BrandBean>list1=new ArrayList<>();
|
||||||
|
List<BrandBean>list2=new ArrayList<>();
|
||||||
|
List<BrandBean>list3=new ArrayList<>();
|
||||||
|
List<BrandBean>list4=new ArrayList<>();
|
||||||
|
for(int i=0;i<names1.length;i++){
|
||||||
|
BrandBean bean=new BrandBean();
|
||||||
|
bean.setName(names1[i]);
|
||||||
|
bean.setPrice(prices1[i]);
|
||||||
|
bean.setImg(imgs1[i]);
|
||||||
|
bean.setSales(sales1[i]);
|
||||||
|
list1.add(bean);
|
||||||
|
}
|
||||||
|
map.put("1",list1);
|
||||||
|
|
||||||
|
for(int i=0;i<names2.length;i++){
|
||||||
|
BrandBean bean=new BrandBean();
|
||||||
|
bean.setName(names2[i]);
|
||||||
|
bean.setPrice(prices2[i]);
|
||||||
|
bean.setImg(imgs2[i]);
|
||||||
|
bean.setSales(sales2[i]);
|
||||||
|
list2.add(bean);
|
||||||
|
}
|
||||||
|
map.put("2",list2);
|
||||||
|
|
||||||
|
for(int i=0;i<names3.length;i++){
|
||||||
|
BrandBean bean=new BrandBean();
|
||||||
|
bean.setName(names3[i]);
|
||||||
|
bean.setPrice(prices3[i]);
|
||||||
|
bean.setImg(imgs3[i]);
|
||||||
|
bean.setSales(sales3[i]);
|
||||||
|
list3.add(bean);
|
||||||
|
}
|
||||||
|
map.put("3",list3);
|
||||||
|
|
||||||
|
for(int i=0;i<names4.length;i++){
|
||||||
|
BrandBean bean=new BrandBean();
|
||||||
|
bean.setName(names4[i]);
|
||||||
|
bean.setPrice(prices4[i]);
|
||||||
|
bean.setImg(imgs4[i]);
|
||||||
|
bean.setSales(sales4[i]);
|
||||||
|
list4.add(bean);
|
||||||
|
}
|
||||||
|
map.put("4",list4);
|
||||||
|
|
||||||
|
}
|
||||||
|
private void clickEvent(){
|
||||||
|
tv_LV.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
switchData (map.get("1"));
|
||||||
|
tv_LV.setBackgroundColor(Color.WHITE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tv_Prada.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
switchData (map.get("2"));
|
||||||
|
tv_Prada.setBackgroundColor(Color.WHITE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tv_Miumiu.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
switchData (map.get("3"));
|
||||||
|
tv_Miumiu.setBackgroundColor(Color.WHITE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tv_Hermers.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
switchData (map.get("4"));
|
||||||
|
tv_Hermers.setBackgroundColor(Color.WHITE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@SuppressLint("SuspiciousIndentation")
|
||||||
|
public void switchData(List<BrandBean> list){
|
||||||
|
|
||||||
|
fragmentManager=getFragmentManager();
|
||||||
|
|
||||||
|
fragmentTransaction=getSupportFragmentManager().beginTransaction();
|
||||||
|
|
||||||
|
rightFragment=new RightFragment().getInstance(list);
|
||||||
|
|
||||||
|
fragmentTransaction.replace(R.id.right,rightFragment);
|
||||||
|
|
||||||
|
fragmentTransaction.commit();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.example.test1.Activity;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.FragmentManager;
|
||||||
|
import android.app.FragmentTransaction;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.example.test1.Fragment.SetDetailFragment;
|
||||||
|
import com.example.test1.R;
|
||||||
|
import com.example.test1.adapter.Adapter;
|
||||||
|
import com.example.test1.entity.Product;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class CategoryActivity extends Activity {
|
||||||
|
public OnChangeListener onchangedListener;
|
||||||
|
private List<Product> productList;
|
||||||
|
private List<String> productCategory = new ArrayList<>();
|
||||||
|
private ListView titleList;
|
||||||
|
private Adapter adapter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.content_category);
|
||||||
|
initData();
|
||||||
|
init();
|
||||||
|
SetDetailFragment fragment = new SetDetailFragment();
|
||||||
|
FragmentManager fragmentManager = getFragmentManager();
|
||||||
|
FragmentTransaction transaction = fragmentManager.beginTransaction();
|
||||||
|
transaction.replace(R.id.category_detail, fragment);
|
||||||
|
transaction.commit();
|
||||||
|
titleList.setOnItemClickListener((parent, view, position, id) -> {
|
||||||
|
adapter.setSelectedPosition(position);
|
||||||
|
adapter.notifyDataSetInvalidated();
|
||||||
|
if (onchangedListener != null) {
|
||||||
|
onchangedListener.changeText(productList.get(position));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnChangeListener(OnChangeListener onChangeListener) {
|
||||||
|
this.onchangedListener = onChangeListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnChangeListener {
|
||||||
|
void changeText(Product product);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化数据
|
||||||
|
*/
|
||||||
|
private void initData() {
|
||||||
|
productList = new ArrayList<>();
|
||||||
|
productCategory.add("LV");
|
||||||
|
productCategory.add("Prada");
|
||||||
|
productCategory.add("Hermas");
|
||||||
|
Product product = new Product();
|
||||||
|
product.setImageUrlId(R.drawable.lv2);
|
||||||
|
product.setProductName("lv春季新款");
|
||||||
|
product.setProductPrice(new BigDecimal("18999"));
|
||||||
|
Product product1 = new Product();
|
||||||
|
product1.setImageUrlId(R.drawable.prada1);
|
||||||
|
product1.setProductName("Prada");
|
||||||
|
product1.setProductPrice(new BigDecimal("18999"));
|
||||||
|
Product product2 = new Product();
|
||||||
|
product2.setImageUrlId(R.drawable.hermes1);
|
||||||
|
product2.setProductName("Hermas");
|
||||||
|
product2.setProductPrice(new BigDecimal("18999"));
|
||||||
|
productList.add(product);
|
||||||
|
productList.add(product1);
|
||||||
|
productList.add(product2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化组件
|
||||||
|
*/
|
||||||
|
private void init() {
|
||||||
|
titleList = findViewById(R.id.category_title_list);
|
||||||
|
adapter = new Adapter(productCategory, CategoryActivity.this);
|
||||||
|
titleList.setAdapter(adapter);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.example.test1.Fragment;
|
||||||
|
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.example.test1.R;
|
||||||
|
|
||||||
|
public class LeftFragment extends Fragment {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
|
||||||
|
View view= inflater.inflate(R.layout.fragment_left, container, false);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
public void onPause(){
|
||||||
|
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.example.test1.Fragment;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ListView;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.example.test1.R;
|
||||||
|
import com.example.test1.adapter.RightAdapter;
|
||||||
|
import com.example.test1.entity.BrandBean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public class RightFragment extends Fragment {
|
||||||
|
|
||||||
|
private ListView lv_list;
|
||||||
|
/* public RightFragment(FragmentActivity activity, List<FoodBean> list) {
|
||||||
|
// Required empty public constructor
|
||||||
|
}*/
|
||||||
|
|
||||||
|
public RightFragment() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public RightFragment getInstance(List<BrandBean>list){
|
||||||
|
RightFragment rightFragment=new RightFragment();
|
||||||
|
|
||||||
|
|
||||||
|
Bundle bundle=new Bundle();
|
||||||
|
bundle.putSerializable("list",(Serializable) list);
|
||||||
|
rightFragment.setArguments(bundle);
|
||||||
|
return rightFragment;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
View view=inflater.inflate(R.layout.fragment_right, container, false);
|
||||||
|
|
||||||
|
lv_list=view.findViewById(R.id.lv_list);
|
||||||
|
if(getArguments()!=null){
|
||||||
|
|
||||||
|
List<BrandBean>list=(List<BrandBean>) getArguments().getSerializable("list");
|
||||||
|
RightAdapter adapter=new RightAdapter(getActivity(),list);
|
||||||
|
lv_list.setAdapter( adapter);
|
||||||
|
|
||||||
|
}
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
package com.example.test1.Fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Fragment;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.example.test1.Activity.CategoryActivity;
|
||||||
|
import com.example.test1.R;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class SetDetailFragment extends Fragment {
|
||||||
|
private View view;
|
||||||
|
private ImageView imageView;
|
||||||
|
private TextView nameText, priceText;
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
view = inflater.inflate(R.layout.category_detail_content,container, false);
|
||||||
|
if (view != null) {
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
CategoryActivity categoryActivity = (CategoryActivity) getActivity();
|
||||||
|
Objects.requireNonNull(categoryActivity).setOnChangeListener(product -> {
|
||||||
|
Log.i("sss", "onCreateView: " + product.getProductName());
|
||||||
|
imageView.setBackgroundResource(product.getImageUrlId());
|
||||||
|
nameText.setText(product.getProductName());
|
||||||
|
priceText.setText(product.getProductPrice().toString());
|
||||||
|
});
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容组件初始化
|
||||||
|
*/
|
||||||
|
private void init() {
|
||||||
|
imageView = view.findViewById(R.id.category_product_image);
|
||||||
|
nameText = view.findViewById(R.id.category_product_name);
|
||||||
|
priceText = view.findViewById(R.id.category_product_price);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.example.test1.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.example.test1.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Adapter extends BaseAdapter {
|
||||||
|
private List<String> productCategory;
|
||||||
|
private LayoutInflater layoutInflater;
|
||||||
|
private int selectionPosition = -1;
|
||||||
|
|
||||||
|
public Adapter(List<String> productCategory, Context context) {
|
||||||
|
this.productCategory = productCategory;
|
||||||
|
this.layoutInflater = LayoutInflater.from(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return productCategory.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return productCategory.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
ViewHolder viewHolder = null;
|
||||||
|
if (convertView == null) {
|
||||||
|
viewHolder = new ViewHolder();
|
||||||
|
convertView = layoutInflater.inflate(R.layout.category_list_item, null);
|
||||||
|
Log.i("adapts", "getView: " + convertView);
|
||||||
|
viewHolder.tv = convertView.findViewById(R.id.categor_titles);
|
||||||
|
convertView.setTag(viewHolder);
|
||||||
|
} else {
|
||||||
|
viewHolder = (ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
viewHolder.tv.setText(productCategory.get(position));
|
||||||
|
if (selectionPosition == position) {
|
||||||
|
viewHolder.tv.setBackgroundColor(Color.YELLOW);
|
||||||
|
} else {
|
||||||
|
viewHolder.tv.setBackgroundColor(Color.WHITE);
|
||||||
|
}
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedPosition(int position) {
|
||||||
|
this.selectionPosition = position;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ViewHolder {
|
||||||
|
TextView tv;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
package com.example.test1.adapter;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.example.test1.R;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class MyAdapter extends BaseAdapter {
|
||||||
|
private List<Map<String,Object>> list;
|
||||||
|
private LayoutInflater inflater;//反射器
|
||||||
|
|
||||||
|
public MyAdapter(Context context) {
|
||||||
|
this.inflater = LayoutInflater.from(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<Map<String, Object>> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int i) {
|
||||||
|
return list.get(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int i) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||||
|
// View view1 = inflater.inflate(R.layout.layout_item,null);
|
||||||
|
ViewHolder holder = null;
|
||||||
|
|
||||||
|
if(view == null){
|
||||||
|
view = inflater.inflate(R.layout.introduction_item,null);
|
||||||
|
holder = new ViewHolder();
|
||||||
|
holder.icon = view.findViewById(R.id.icon);
|
||||||
|
holder.title = view.findViewById(R.id.title);
|
||||||
|
holder.content = view.findViewById(R.id.content);
|
||||||
|
view.setTag(holder);
|
||||||
|
}else {
|
||||||
|
holder = (ViewHolder) view.getTag();
|
||||||
|
}
|
||||||
|
|
||||||
|
//获得行布局的各个控件
|
||||||
|
// ImageView icon = view.findViewById(R.id.icon);
|
||||||
|
// TextView title = view.findViewById(R.id.title);
|
||||||
|
// TextView content = view.findViewById(R.id.content);
|
||||||
|
|
||||||
|
//给各个控件赋值
|
||||||
|
holder.icon.setImageResource((Integer) list.get(i).get("icon"));
|
||||||
|
holder.title.setText((String) list.get(i).get("title"));
|
||||||
|
holder.content.setText((String) list.get(i).get("content"));
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ViewHolder{
|
||||||
|
ImageView icon;
|
||||||
|
TextView title;
|
||||||
|
TextView content;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.test1.entity;
|
package com.example.test1.adapter;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.example.test1.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.example.test1.R;
|
||||||
|
import com.example.test1.entity.BrandBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RightAdapter extends BaseAdapter {
|
||||||
|
private Context mContext;
|
||||||
|
private List<BrandBean>list;
|
||||||
|
public RightAdapter(Context context , List<BrandBean>list){
|
||||||
|
this.mContext=context;
|
||||||
|
this.list=list;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return list.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
ViewHolder holder=null;
|
||||||
|
if(convertView==null){
|
||||||
|
convertView=View.inflate(mContext, R.layout.sale_item,null);
|
||||||
|
holder= new ViewHolder();
|
||||||
|
holder.tv_name=convertView.findViewById(R.id.tv_name);
|
||||||
|
holder.tv_sale=convertView.findViewById(R.id.tv_sale);
|
||||||
|
holder.tv_price=convertView.findViewById(R.id.tv_price);
|
||||||
|
holder.iv_img=convertView.findViewById(R.id.iv_img);
|
||||||
|
convertView.setTag(holder);
|
||||||
|
}else {
|
||||||
|
holder=(ViewHolder) convertView.getTag();
|
||||||
|
}
|
||||||
|
BrandBean bean=list.get(position);
|
||||||
|
holder.tv_name.setText(bean.getName());
|
||||||
|
holder.tv_sale.setText(bean.getSales());
|
||||||
|
holder.tv_price.setText(bean.getPrice());
|
||||||
|
holder.iv_img.setBackgroundResource(bean.getImg());
|
||||||
|
return convertView;
|
||||||
|
}
|
||||||
|
class ViewHolder{
|
||||||
|
TextView tv_name,tv_sale,tv_price;
|
||||||
|
ImageView iv_img;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.example.test1.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class BrandBean implements Serializable {
|
||||||
|
private static final long serialVersionUID=2L;
|
||||||
|
private String name;
|
||||||
|
private String sales;
|
||||||
|
private String price;
|
||||||
|
private int img;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSales() {
|
||||||
|
return sales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSales(String sales) {
|
||||||
|
this.sales = sales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(String price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(int img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.example.test1.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class Product {
|
||||||
|
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getProductPrice() {
|
||||||
|
return productPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductPrice(BigDecimal productPrice) {
|
||||||
|
this.productPrice = productPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getImageUrlId() {
|
||||||
|
return imageUrlId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageUrlId(Integer imageUrlId) {
|
||||||
|
this.imageUrlId = imageUrlId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer imageUrlId;
|
||||||
|
private String productName;
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
}
|
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 520 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 442 KiB |
After Width: | Height: | Size: 295 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 256 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 710 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 696 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 774 B |
After Width: | Height: | Size: 337 B |
@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".Activity.IntroductionActivity">
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="800dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
tools:ignore="MissingConstraints">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_Logo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:layout_marginLeft="25dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="346dp"
|
||||||
|
android:layout_marginRight="346dp"
|
||||||
|
android:text="商家LOGO"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_introduction"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="158dp"
|
||||||
|
android:layout_marginLeft="108dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="263dp"
|
||||||
|
android:layout_marginRight="203dp"
|
||||||
|
android:text="商家简介"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_Buy"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="281dp"
|
||||||
|
android:layout_marginLeft="281dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="90dp"
|
||||||
|
android:layout_marginRight="90dp"
|
||||||
|
android:text="进店购买"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentTop="true"-->
|
||||||
|
<!-- android:layout_alignParentEnd="true"-->
|
||||||
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
|
<!-- android:layout_marginTop="13dp"-->
|
||||||
|
<!-- android:layout_marginEnd="28dp"-->
|
||||||
|
<!-- android:layout_marginRight="28dp"-->
|
||||||
|
<!-- android:text=""-->
|
||||||
|
<!-- android:textSize="20sp" />-->
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:id="@+id/list_main"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.051" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<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="match_parent"
|
||||||
|
tools:context=".Activity.BandActivity"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_business"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="25dp"
|
||||||
|
android:layout_marginLeft="25dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="346dp"
|
||||||
|
android:layout_marginRight="346dp"
|
||||||
|
android:text="商家"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_product"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginStart="108dp"
|
||||||
|
android:layout_marginLeft="108dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="263dp"
|
||||||
|
android:layout_marginRight="263dp"
|
||||||
|
android:text="产品"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/tv_discuss"-->
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentStart="true"-->
|
||||||
|
<!-- android:layout_alignParentLeft="true"-->
|
||||||
|
<!-- android:layout_alignParentTop="true"-->
|
||||||
|
<!-- android:layout_alignParentEnd="true"-->
|
||||||
|
|
||||||
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
|
<!-- android:layout_marginStart="202dp"-->
|
||||||
|
<!-- android:layout_marginLeft="202dp"-->
|
||||||
|
<!-- android:layout_marginTop="8dp"-->
|
||||||
|
<!-- android:layout_marginEnd="169dp"-->
|
||||||
|
<!-- android:layout_marginRight="169dp"-->
|
||||||
|
<!-- android:text="评价"-->
|
||||||
|
<!-- android:textSize="20sp" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
|
||||||
|
<!-- android:layout_width="wrap_content"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentTop="true"-->
|
||||||
|
<!-- android:layout_alignParentEnd="true"-->
|
||||||
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
|
<!-- android:layout_marginTop="8dp"-->
|
||||||
|
<!-- android:layout_marginEnd="28dp"-->
|
||||||
|
<!-- android:layout_marginRight="28dp"-->
|
||||||
|
<!-- android:text="好友拼单"-->
|
||||||
|
<!-- android:textSize="20sp" />-->
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
>
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/left"
|
||||||
|
android:name="com.example.test1.Fragment.LeftFragment"
|
||||||
|
android:layout_width="160dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
|
||||||
|
tools:layout="@layout/fragment_left" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/right"
|
||||||
|
android:name="com.example.test1.Fragment.RightFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3"
|
||||||
|
tools:layout="@layout/fragment_right" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<GridView
|
||||||
|
android:id="@+id/category_detail_list"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:numColumns="3"
|
||||||
|
android:verticalSpacing="10dp"
|
||||||
|
android:horizontalSpacing="10dp"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/category_product_image"
|
||||||
|
android:layout_width="90dp"
|
||||||
|
android:layout_height="90dp"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/category_product_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:textColor="#050505"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/category_product_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="#050505"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/categor_titles"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:text="标题" />
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#E8E8E8"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--标题-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="#B9B9FF"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/category_return"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:src="@drawable/zuo" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="品牌分类"
|
||||||
|
android:textColor="#FFF"
|
||||||
|
android:textSize="20sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!--分类标题和内容-->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<!--标题-->
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/category_title_list"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="80dp" />
|
||||||
|
<!--内容-->
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/category_detail"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="3" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".Fragment.LeftFragment"
|
||||||
|
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- TODO: Update blank fragment layout -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_LV"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="LV"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_Prada"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Prada"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_miumiu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="MiuMiu"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:layout_marginTop="150dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_Hermers"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Hermers"
|
||||||
|
android:textSize="25sp"
|
||||||
|
android:layout_marginTop="220dp"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
/>
|
||||||
|
</FrameLayout>
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".Fragment.RightFragment"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- TODO: Update blank fragment layout -->
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/lv_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:divider="@null"
|
||||||
|
/>
|
||||||
|
</FrameLayout>
|
@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:descendantFocusability="blocksDescendants">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:layout_width="100dp"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:src="@drawable/cat"
|
||||||
|
android:scaleType="centerCrop"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:text="品牌名称"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<!-- <Button-->
|
||||||
|
<!-- android:id="@+id/btn_Buy"-->
|
||||||
|
<!-- android:layout_width="120dp"-->
|
||||||
|
<!-- android:layout_height="wrap_content"-->
|
||||||
|
<!-- android:layout_alignParentRight="true"-->
|
||||||
|
<!-- android:onClick="onClick"-->
|
||||||
|
<!-- android:text="进店购买" />-->
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/content"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:text="品牌简介"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="200dip"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageview"
|
|
||||||
android:layout_width="50dip"
|
|
||||||
android:layout_height="50dip"/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textview"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:paddingTop="8dip"
|
|
||||||
android:textSize="20sp"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<Button
|
|
||||||
android:id="@+id/button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="5dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_img"
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="70dp"/>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
<TextView
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:padding="2dp"
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#868788"
|
||||||
|
android:id="@+id/tv_sale"
|
||||||
|
|
||||||
|
android:textSize="12sp"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
|
||||||
|
android:textSize="12sp"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|