Compare commits

...

3 Commits

Author SHA1 Message Date
J-Jamet
57f71afb98 Fix font and upgrade version 2018-08-02 13:02:18 +02:00
J-Jamet
d8ec198f6f Fix null pointer 2018-08-02 11:58:15 +02:00
J-Jamet
34deea5d32 Merge tag '2.5.0.0beta16' into develop
2.5.0.0bet16
2018-08-02 11:19:58 +02:00
11 changed files with 43 additions and 29 deletions

View File

@@ -1,3 +1,6 @@
KeepassDX (2.5.0.0beta16)
* Fix font and search
KeepassDX (2.5.0.0beta16)
* New search in a single fragment
* Search suggestions

View File

@@ -8,8 +8,8 @@ android {
applicationId "com.kunzisoft.keepass"
minSdkVersion 14
targetSdkVersion 27
versionCode = 16
versionName = "2.5.0.0beta16"
versionCode = 17
versionName = "2.5.0.0beta17"
multiDexEnabled true
testApplicationId = "com.kunzisoft.keepass.tests"

View File

@@ -373,7 +373,8 @@ public class GroupActivity extends LockingActivity
@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putParcelable(GROUP_ID_KEY, mCurrentGroup.getId());
if (mCurrentGroup != null)
outState.putParcelable(GROUP_ID_KEY, mCurrentGroup.getId());
outState.putParcelable(OLD_GROUP_TO_UPDATE_KEY, oldGroupToUpdate);
if (nodeToCopy != null)
outState.putParcelable(NODE_TO_COPY_KEY, nodeToCopy);

View File

@@ -173,7 +173,8 @@ public class ListNodesFragment extends StylishFragment implements
public void rebuildList() {
// Add elements to the list
mAdapter.rebuildList(currentGroup);
if (currentGroup != null)
mAdapter.rebuildList(currentGroup);
assignListToNodeAdapter(listView);
}

View File

@@ -27,6 +27,7 @@ import android.support.v7.util.SortedList;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.util.SortedListAdapterCallback;
import android.util.Log;
import android.util.TypedValue;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.MenuInflater;
@@ -128,7 +129,7 @@ public class NodeAdapter extends RecyclerView.Adapter<BasicViewHolder> {
private void assignPreferences() {
float textSizeDefault = Util.getListTextDefaultSize(context);
this.textSize = PreferencesUtil.getListTextSize(context);
this.subtextSize = context.getResources().getDimension(R.dimen.list_small_size_default)
this.subtextSize = context.getResources().getInteger(R.integer.list_small_size_default)
* textSize / textSizeDefault;
// Retrieve the icon size
float iconDefaultSize = context.getResources().getDimension(R.dimen.list_icon_size_default);

View File

@@ -206,19 +206,21 @@ public class Database {
if (!query.isEmpty()) {
PwGroup searchResult = search(query, 6);
PwVersion version = getPwDatabase().getVersion();
for (int i=0; i < searchResult.numbersOfChildEntries(); i++) {
PwEntry entry = searchResult.getChildEntryAt(i);
if (!entry.isMetaStream()) { // TODO metastream
try {
switch (version) {
case V3:
cursor.addEntry((PwEntryV3) entry);
continue;
case V4:
cursor.addEntry((PwEntryV4) entry);
if (searchResult != null) {
for (int i = 0; i < searchResult.numbersOfChildEntries(); i++) {
PwEntry entry = searchResult.getChildEntryAt(i);
if (!entry.isMetaStream()) { // TODO metastream
try {
switch (version) {
case V3:
cursor.addEntry((PwEntryV3) entry);
continue;
case V4:
cursor.addEntry((PwEntryV4) entry);
}
} catch (Exception e) {
Log.e(TAG, "Can't add PwEntry to the cursor", e);
}
} catch (Exception e) {
Log.e(TAG, "This version of PwEntry can't be added to the cursor", e);
}
}
}

View File

@@ -70,10 +70,7 @@ public class PreferencesUtil {
String listSize = prefs.getString(ctx.getString(R.string.list_size_key), defaultSizeString);
if (!Arrays.asList(ctx.getResources().getStringArray(R.array.list_size_values)).contains(listSize))
listSize = defaultSizeString;
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP,
Float.parseFloat(listSize),
ctx.getResources().getDisplayMetrics());
return Float.parseFloat(listSize);
}
public static int getDefaultPasswordLength(Context ctx) {

View File

@@ -78,10 +78,7 @@ public class Util {
}
public static float getListTextDefaultSize(Context context) {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP,
(Float.parseFloat(context.getString(R.string.list_size_default))),
context.getResources().getDisplayMetrics());
return Float.parseFloat(context.getString(R.string.list_size_default));
}
public static void lockScreenOrientation(Activity activity) {

View File

@@ -160,12 +160,12 @@
</string-array>
<dimen name="list_icon_size_default" translatable="false">32dp</dimen>
<dimen name="list_small_size_default" translatable="false">9sp</dimen>
<string name="list_size_default" translatable="false">11</string>
<integer name="list_small_size_default" translatable="false">13</integer>
<string name="list_size_default" translatable="false">16</string>
<string-array name="list_size_values">
<item translatable="false">9</item>
<item translatable="false">@string/list_size_default</item>
<item translatable="false">14</item>
<item translatable="false">@string/list_size_default</item>
<item translatable="false">22</item>
</string-array>
<string name="list_style_name_light" translatable="false">KeepassDXStyle_Light</string>

View File

@@ -0,0 +1,6 @@
* New search in a single fragment
* Search suggestions
* Added the display of usernames
* Added translations
* Fix read-only mode
* Fix parcelable / toolbar / back / font

View File

@@ -0,0 +1,6 @@
* Nouvelle recherche dans un seul fragment
* Suggestions de recherche
* Ajout de l'affichage des noms d'utilisateurs
* Ajout de traductions
* Correction du mode lecture seule
* Correction de parcelable / barre de navigation / retour / police