Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LvAdapter extends BaseAdapter{
- LayoutInflater mInflater;
- private Context context;
- public LvAdapter(Context c){
- mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- context = c;
- }
- @Override
- public int getCount() {
- return cGlobal.listOfWork.size();
- }
- @Override
- public Object getItem(int arg0) {
- return arg0;
- }
- @Override
- public long getItemId(int arg0) {
- return arg0;
- }
- @Override
- public View getView(int position, View convertView, ViewGroup arg2) {
- final ViewHolder holder;
- convertView=null;
- if (convertView == null) {
- holder = new ViewHolder();
- convertView = mInflater.inflate(R.layout.activity_produced_quantities_rows, null); // this is your cell
- holder.quantity = (EditText) convertView.findViewById(R.id.txtQuantity);
- holder.quantity.setTag(position);
- convertView.setTag(holder);
- }
- else {
- holder = (ViewHolder) convertView.getTag();
- }
- return convertView;
- }
- }
- public class ViewHolder {
- EditText quantity;
- }
- public void isEmpty(){
- boolean isAnyEmpty=true;
- for (int i=0;i<quantityCheckList.size();i++){
- View view = lvQuestion.getAdapter().getView(i, null, null);
- EditText quantity = (EditText) view.findViewById(R.id.txtQuantity);
- quantity.requestFocus();
- quantity.setError("asdasda");
- isAnyEmpty=false;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement