package com.secuso.privacyfriendlycodescanner.qrscanner.ui.activities; import android.annotation.SuppressLint; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ExpandableListView; import com.secuso.privacyfriendlycodescanner.qrscanner.R; import com.secuso.privacyfriendlycodescanner.qrscanner.ui.helpers.ExpandableListAdapter; import com.secuso.privacyfriendlycodescanner.qrscanner.ui.helpers.HelpDataDump; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; public class HelpActivity extends AppCompatActivity { @SuppressLint("RestrictedApi") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_help); getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true); ExpandableListAdapter expandableListAdapter; HelpDataDump helpDataDump = new HelpDataDump(this); ExpandableListView generalExpandableListView = (ExpandableListView) findViewById(R.id.generalExpandableListView); LinkedHashMap<String, List<String>> expandableListDetail = helpDataDump.getDataGeneral(); List<String> expandableListTitleGeneral = new ArrayList<String>(expandableListDetail.keySet()); expandableListAdapter = new ExpandableListAdapter(this, expandableListTitleGeneral, expandableListDetail); generalExpandableListView.setAdapter(expandableListAdapter); overridePendingTransition(0, 0); } protected int getNavigationDrawerID() { return R.id.nav_help; } }