Hopefully fix a bug where keys from a previously opened database would still be visible

This commit is contained in:
Alexander Bakker 2017-12-08 19:09:35 +01:00
parent 515e3a24eb
commit 71eb487f85
2 changed files with 3 additions and 2 deletions

2
.idea/misc.xml generated
View file

@ -24,7 +24,7 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View file

@ -48,7 +48,7 @@ public class MainActivity extends AppCompatActivity {
private static final int CODE_IMPORT = 4; private static final int CODE_IMPORT = 4;
private KeyProfileAdapter _keyProfileAdapter; private KeyProfileAdapter _keyProfileAdapter;
private ArrayList<KeyProfile> _keyProfiles = new ArrayList<>(); private ArrayList<KeyProfile> _keyProfiles;
private DatabaseManager _db; private DatabaseManager _db;
private boolean _nightMode = false; private boolean _nightMode = false;
@ -112,6 +112,7 @@ public class MainActivity extends AppCompatActivity {
LinearLayoutManager mLayoutManager = new LinearLayoutManager(this); LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
rvKeyProfiles.setLayoutManager(mLayoutManager); rvKeyProfiles.setLayoutManager(mLayoutManager);
_keyProfiles = new ArrayList<>();
_keyProfileAdapter = new KeyProfileAdapter(_keyProfiles); _keyProfileAdapter = new KeyProfileAdapter(_keyProfiles);
_keyProfileAdapter.setOnItemClickListener((position, v) -> createBottomSheet(position).show()); _keyProfileAdapter.setOnItemClickListener((position, v) -> createBottomSheet(position).show());