i'm using touchdb ektorp in android app access couchdb the json document i'm accessing has array of categories: categories: ['cat1', 'cat2'] in view query i'm trying access array classcastexception when trying convert result object list: public void map(map<string, object> document, tdviewmapemitblock emitter) { object dateadded = document.get("dateadded"); object expirydate = document.get("expirydate"); boolean expired = false; if(expirydate!=null){ expired = comparedate.isitemexpired(expirydate); } list<string> test = (list<string>)document.get("categories"); the .get() method works fine single json fields. ideas? document declared map<string, object> so when .get() - return object. there's no direct mapping (list<string>) exception saying need cast object rather list. you ch...
in android application want set border imageview when long pressed. want remove same(border) when user releases view. please anyone, me in this? @override public boolean ontouchevent(motionevent event) { switch (event.getaction()) { case motionevent.action_down: { mtouchdownx = (int) event.getx(); mtouchdowny = (int) event.gety(); break; } case motionevent.action_move: { int x = (int) event.getx(); int y = (int) event.gety(); if (mdraggeditem >= 0) { setdraggeditemposition(x, y); int index = getindexfromcoordinates(x, y); if (index == mdraggeditem || index < 0) break; if (index < mdraggeditem) { (int = index; < mdraggeditem; i++) { moveviewtoposition(i, i+1); } (int = mdraggeditem-1; >= index; i--) { ...
Comments
Post a Comment