RecyclerView recyclerView;
MyAdapter mAdapter;
List<ItemData> itemsData;
Global glb;
LinearLayoutManager llm;
private int valData() {
String tmpStr;
Cursor c;
int position=0;
enter code here
AutoCompleteTextView tTbl = (AutoCompleteTextView) findViewById(R.id.tblNam);
tmpStr = tTbl.getText().toString();
c = db.rawQuery("SELECT * FROM tblDts WHERE tblNam = '" + tmpStr + "'", null);
if (c.getCount() == 0) {
showMessage("Error", "Table Name Not Found");
c.close();
tTbl.requestFocus();
return 1;
}
c.close();
for (int i = 0; i < itemsData.size(); i++) {
tmpStr = itemsData.get(i).getTitle().toString();
c = db.rawQuery("SELECT * FROM itmDts WHERE itmNam = '" + tmpStr + "';", null);
if (c.getCount() == 0) {
c.close();
//llm.scrollToPositionWithOffset(i,0);
//recyclerView.smoothScrollToPosition(i);
//recyclerView.scrollToPosition(i);
i tried all the above scroll procedure, when i using getChildAt its return only view of the before scroll and not the new one
//View vw = llm.getChildAt(0);
tmpStr="";
when rise the findviewholderforadapterpostion in between current display views there has been it shows correctly but if i rise non display position it returns null RecyclerView.ViewHolder vh = recyclerView.findViewHolderForAdapterPosition(i); View vw = vh.itemView;
AutoCompleteTextView tTa=(AutoCompleteTextView)vw.findViewById(R.id.item_title);
tmpStr =tTa.getText().toString();
showMessage(llm.getChildCount()+"Error" + position, "Item Name Not Found" + tmpStr);
//recyclerView.setLayoutManager(lm);
return 1;
}
c.close();
}
return 0;
}
}
}