I have a school project on shoe sticker and trying to figure out on how to do it based on the codes on github
The problem I’m facing with is, it is not able to display currentNearableInfo when the sticker is picked up( motion detected) it is only able to display when I manually clicked on the sticker icon. Is it possible that you provide me some guidance to where I have made my mistake or point out where should I make changes.
Cheers
Min
private AdapterView.OnItemClickListener createOnItemClickListener() {
return new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (getIntent().getStringExtra(EXTRAS_TARGET_ACTIVITY) != null) {
// if(currentNearable.isMoving) {
try {
Class<?> clazz = Class.forName(getIntent().getStringExtra(EXTRAS_TARGET_ACTIVITY));
Intent intent = new Intent(ListNearablesActivity.this, clazz);
intent.putExtra(EXTRAS_NEARABLE, adapter.getItem(position));
startActivity(intent);
} catch (ClassNotFoundException e) {
Log.e(TAG, “Finding class by name failed”, e);
}
}
}
// }
};
}