com.zhy.sample.R Java Examples
The following examples show how to use
com.zhy.sample.R.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListFragment.java From AndroidAutoLayout with Apache License 2.0 | 6 votes |
@Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if (convertView == null) { holder = new ViewHolder(); convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item, parent, false); convertView.setTag(holder); //对于listview,注意添加这一行,即可在item上使用高度 AutoUtils.autoSize(convertView); } else { holder = (ViewHolder) convertView.getTag(); } return convertView; }
Example #2
Source File: ListFragment.java From AndroidAutoLayout with Apache License 2.0 | 6 votes |
private void initView() { mContext = getActivity(); mlistview = (ListView) mView.findViewById(R.id.id_listview); mList = new ArrayList<String>(); for (int i = 0; i < 50; i++) { mList.add(i + ""); } mlistview.setAdapter(new MyAdapter()); // mlistview.setAdapter(new CommonAdapter<String>(getActivity(),R.layout.list_item,mList) // { // @Override // protected void onConvertViewCreated(View convertView) // { // AutoUtils.autoSize(convertView); // } // // @Override // public void convert(com.zhy.base.adapter.ViewHolder viewHolder, String s) // { // // } // }); }
Example #3
Source File: ListFragment.java From AutoLayout with Apache License 2.0 | 6 votes |
@Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if (convertView == null) { holder = new ViewHolder(); convertView = LayoutInflater.from(mContext).inflate(R.layout.list_item, parent, false); convertView.setTag(holder); //对于listview,注意添加这一行,即可在item上使用高度 AutoUtils.autoSize(convertView); } else { holder = (ViewHolder) convertView.getTag(); } return convertView; }
Example #4
Source File: MsgSendItemDelagate.java From baseAdapter with Apache License 2.0 | 5 votes |
@Override public void convert(ViewHolder holder, ChatMessage chatMessage, int position) { holder.setText(R.id.chat_send_content, chatMessage.getContent()); holder.setText(R.id.chat_send_name, chatMessage.getName()); holder.setImageResource(R.id.chat_send_icon, chatMessage.getIcon()); }
Example #5
Source File: ListFragment.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_list, container, false); initView(); return mView; }
Example #6
Source File: MsgComingItemDelagate.java From baseAdapter with Apache License 2.0 | 5 votes |
@Override public void convert(ViewHolder holder, ChatMessage chatMessage, int position) { holder.setText(R.id.chat_from_content, chatMessage.getContent()); holder.setText(R.id.chat_from_name, chatMessage.getName()); holder.setImageResource(R.id.chat_from_icon, chatMessage.getIcon()); }
Example #7
Source File: MsgSendItemDelagate.java From baseAdapter with Apache License 2.0 | 5 votes |
@Override public void convert(ViewHolder holder, ChatMessage chatMessage, int position) { holder.setText(R.id.chat_send_content, chatMessage.getContent()); holder.setText(R.id.chat_send_name, chatMessage.getName()); holder.setImageResource(R.id.chat_send_icon, chatMessage.getIcon()); }
Example #8
Source File: RecyclerViewFragment.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_recyclerview, container, false); initView(); return mView; }
Example #9
Source File: MsgComingItemDelagate.java From baseAdapter with Apache License 2.0 | 5 votes |
@Override public void convert(ViewHolder holder, ChatMessage chatMessage, int position) { holder.setText(R.id.chat_from_content, chatMessage.getContent()); holder.setText(R.id.chat_from_name, chatMessage.getName()); holder.setImageResource(R.id.chat_from_icon, chatMessage.getIcon()); }
Example #10
Source File: RecyclerViewFragment.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
private void initView() { mContext = getActivity(); mRecyclerView = (RecyclerView) mView.findViewById(R.id.id_recyclerview); mList = new ArrayList<String>(); for (int i = 0; i < 50; i++) { mList.add(i + ""); } mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.setAdapter(new MyAdapter(getActivity(),mList)); mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST)); }
Example #11
Source File: RecyclerViewGridFragment.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_recyclerview_grid, container, false); initView(); return mView; }
Example #12
Source File: RecyclerViewFragment.java From AutoLayout with Apache License 2.0 | 5 votes |
private void initView() { mContext = getActivity(); mRecyclerView = (RecyclerView) mView.findViewById(R.id.id_recyclerview); mList = new ArrayList<String>(); for (int i = 0; i < 50; i++) { mList.add(i + ""); } mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.setAdapter(new MyAdapter()); mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST)); }
Example #13
Source File: RecyclerViewFragment.java From AutoLayout with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_recyclerview, container, false); initView(); return mView; }
Example #14
Source File: RecyclerViewGridFragment.java From AndroidAutoLayout with Apache License 2.0 | 5 votes |
private void initView() { mContext = getActivity(); mRecyclerView = (RecyclerView) mView.findViewById(R.id.id_recyclerview); mList = new ArrayList<String>(); for (int i = 0; i < 50; i++) { mList.add(i + ""); } mRecyclerView.setLayoutManager(new GridLayoutManager(getActivity(), 2, GridLayoutManager.HORIZONTAL, false)); mRecyclerView.setAdapter(new MyAdapter()); }
Example #15
Source File: ListFragment.java From AutoLayout with Apache License 2.0 | 5 votes |
private void initView() { mContext = getActivity(); mlistview = (ListView) mView.findViewById(R.id.id_listview); mList = new ArrayList<String>(); for (int i = 0; i < 50; i++) { mList.add(i + ""); } mlistview.setAdapter(new MyAdapter()); }
Example #16
Source File: ListFragment.java From AutoLayout with Apache License 2.0 | 5 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { mView = inflater.inflate(R.layout.fragment_list, container, false); initView(); return mView; }
Example #17
Source File: RecyclerViewGridFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View convertView = LayoutInflater.from(mContext).inflate(R.layout.recyclerview_item_grid, parent, false); return new ViewHolder(convertView); }
Example #18
Source File: RecyclerViewFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
public MyAdapter(Context context, List<String> datas) { super(context, R.layout.recyclerview_item, datas); }
Example #19
Source File: SimpleFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.activity_main, container, false); }
Example #20
Source File: RegisterFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_register, container,false); }
Example #21
Source File: PayFragment.java From AutoLayout with Apache License 2.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_pay, container, false); }
Example #22
Source File: TestFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.activity_test, container, false); }
Example #23
Source File: PayFragment.java From AndroidAutoLayout with Apache License 2.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_pay, container, false); }
Example #24
Source File: MsgComingItemDelagate.java From baseAdapter with Apache License 2.0 | 4 votes |
@Override public int getItemViewLayoutId() { return R.layout.main_chat_from_msg; }
Example #25
Source File: MsgSendItemDelagate.java From baseAdapter with Apache License 2.0 | 4 votes |
@Override public int getItemViewLayoutId() { return R.layout.main_chat_send_msg; }
Example #26
Source File: MsgComingItemDelagate.java From baseAdapter with Apache License 2.0 | 4 votes |
@Override public int getItemViewLayoutId() { return R.layout.main_chat_from_msg; }
Example #27
Source File: MsgSendItemDelagate.java From baseAdapter with Apache License 2.0 | 4 votes |
@Override public int getItemViewLayoutId() { return R.layout.main_chat_send_msg; }
Example #28
Source File: RecyclerViewFragment.java From AutoLayout with Apache License 2.0 | 4 votes |
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View convertView = LayoutInflater.from(mContext).inflate(R.layout.recyclerview_item, parent, false); return new ViewHolder(convertView); }
Example #29
Source File: SimpleFragment.java From AutoLayout with Apache License 2.0 | 4 votes |
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.activity_main, container, false); }
Example #30
Source File: RegisterFragment.java From AutoLayout with Apache License 2.0 | 4 votes |
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_register, container,false); }