memorize selected entry

This commit is contained in:
REAndroid 2023-01-17 05:05:16 -05:00
parent 7cf6a5a694
commit a1230bd31c

View File

@ -34,6 +34,7 @@ public class ResFile {
private boolean mBinXmlChecked; private boolean mBinXmlChecked;
private String mFileExtension; private String mFileExtension;
private boolean mFileExtensionChecked; private boolean mFileExtensionChecked;
private EntryBlock mSelectedEntryBlock;
public ResFile(InputSource inputSource, List<EntryBlock> entryBlockList){ public ResFile(InputSource inputSource, List<EntryBlock> entryBlockList){
this.inputSource=inputSource; this.inputSource=inputSource;
this.entryBlockList=entryBlockList; this.entryBlockList=entryBlockList;
@ -65,6 +66,12 @@ public class ResFile {
return root+typeName+"/"+name; return root+typeName+"/"+name;
} }
public EntryBlock pickOne(){ public EntryBlock pickOne(){
if(mSelectedEntryBlock==null){
mSelectedEntryBlock=selectOne();
}
return mSelectedEntryBlock;
}
private EntryBlock selectOne(){
List<EntryBlock> entryList = entryBlockList; List<EntryBlock> entryList = entryBlockList;
if(entryList.size()==0){ if(entryList.size()==0){
return null; return null;