Callback from Adapter

You need to tell the adapter which implementation of the OnShareClickedListener() to use. Right now in your adapter the field mCallback is never assigned to, either you need to have a setOnSharedClickedListener() method in your adapter which you then call from your mainActivity and set it with the main activity’s implementation or you need to … Read more

Values of counter changes after scrolling ExpendableListView

It is not a good idea to store quantity in ViewHolder. Hope below sample helps 🙂 MainActivity.java: public class MainActivity extends Activity { Button clearChecks, putOrder; ExpandableListView expandableListView; ExpandableListViewAdapter expandableListAdapter; int lastExpandedPosition = -1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); expandableListView = findViewById(R.id.expandedListView); clearChecks = findViewById(R.id.btnClearChecks); putOrder = findViewById(R.id.btnPutOrder); List<String> listTitle = genGroupList(); … Read more

iterator adapter to iterate just the values in a map?

Replacing the previous answer, in case anybody else finds this like I did. As of boost 1.43, there are some commonly used range adaptors provided. In this case, you want boost::adaptors::map_values. The relevant example: http://www.boost.org/doc/libs/1_46_0/libs/range/doc/html/range/reference/adaptors/reference/map_values.html#range.reference.adaptors.reference.map_values.map_values_example