Minor fixs
- Fix crash when fields in the Record activity are field with unexpected infos - Fix soft buttons being overlapped by some activities - Fix NaN bug displayed in the drawer when hiding balance while having 0$ - Fix activities action bar not being displayed properly
This commit is contained in:
parent
75da1ee9e8
commit
cff73dac49
@ -6,8 +6,8 @@ android {
|
||||
applicationId "com.herbron.moodl"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 27
|
||||
versionCode 4
|
||||
versionName "0.0.4"
|
||||
versionCode 5
|
||||
versionName "0.0.5"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
@ -59,8 +59,6 @@ public class HomeActivity extends AppCompatActivity implements BalanceUpdateInte
|
||||
|
||||
/**Interface setup**/
|
||||
Window w = getWindow();
|
||||
w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
w.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
|
||||
|
||||
setContentView(R.layout.activity_currency_summary);
|
||||
|
||||
|
@ -419,13 +419,29 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface {
|
||||
|
||||
if(preferencesManager.isBalanceHidden())
|
||||
{
|
||||
updateHideBalanceTitle(totalFluctuationPercentage);
|
||||
balanceUpdateInterface.onBalanceUpdated(totalFluctuationPercentage);
|
||||
if(Double.isNaN(totalFluctuationPercentage))
|
||||
{
|
||||
updateHideBalanceTitle(0);
|
||||
balanceUpdateInterface.onBalanceUpdated(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateHideBalanceTitle(totalFluctuationPercentage);
|
||||
balanceUpdateInterface.onBalanceUpdated(totalFluctuationPercentage);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
updateBalanceDisplayedTitle(totalFluctuationPercentage);
|
||||
balanceUpdateInterface.onBalanceUpdated(totalValue);
|
||||
if(Double.isNaN(totalFluctuation))
|
||||
{
|
||||
updateBalanceDisplayedTitle(0);
|
||||
balanceUpdateInterface.onBalanceUpdated(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateBalanceDisplayedTitle(totalValue);
|
||||
balanceUpdateInterface.onBalanceUpdated(totalValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ import com.herbron.moodl.DataManagers.DatabaseManager;
|
||||
import com.herbron.moodl.DataManagers.PreferencesManager;
|
||||
import com.herbron.moodl.R;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
@ -96,7 +97,17 @@ public class RecordTransactionActivity extends AppCompatActivity {
|
||||
|
||||
private boolean checkPriceText()
|
||||
{
|
||||
if(purchasedPriceEditText.getText().toString().equals(""))
|
||||
String purchasedPriceText = purchasedPriceEditText.getText().toString();
|
||||
|
||||
try {
|
||||
Double.parseDouble(purchasedPriceText);
|
||||
} catch (NumberFormatException e) {
|
||||
purchasedPriceEditText.setError(getResources().getString(R.string.field_nan));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(purchasedPriceText.equals(""))
|
||||
{
|
||||
purchasedPriceEditText.setError(getResources().getString(R.string.field_empty));
|
||||
|
||||
@ -108,7 +119,17 @@ public class RecordTransactionActivity extends AppCompatActivity {
|
||||
|
||||
private boolean checkAmountText()
|
||||
{
|
||||
if(amountTxtView.getText().toString().equals(""))
|
||||
String amountText = amountTxtView.getText().toString();
|
||||
|
||||
try {
|
||||
Double.parseDouble(amountText);
|
||||
} catch (NumberFormatException e) {
|
||||
amountTxtView.setError(getResources().getString(R.string.field_nan));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(amountText.equals(""))
|
||||
{
|
||||
amountTxtView.setError(getResources().getString(R.string.field_empty));
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.herbron.moodl.Activities.HomeActivity">
|
||||
|
||||
<FrameLayout
|
||||
|
@ -2,13 +2,11 @@
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/fragment_padding"
|
||||
android:background="@drawable/gradient_background">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
|
@ -2,13 +2,11 @@
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/fragment_padding"
|
||||
android:background="@drawable/gradient_background">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
|
@ -5,7 +5,6 @@
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.herbron.moodl.Activities.HomeActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
@ -13,7 +12,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/app_bar_height"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
android:paddingTop="@dimen/fragment_padding"
|
||||
android:background="@drawable/gradient_background">
|
||||
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
|
@ -2,13 +2,11 @@
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/fragment_padding"
|
||||
android:background="@drawable/gradient_background">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
|
@ -86,4 +86,6 @@
|
||||
<string name="fingerprint_dialog_title">Vérifier votre empreinte digitale pour continuer</string>
|
||||
<string name="action_settings">Paramètres</string>
|
||||
<string name="action_edit_mode">Edition</string>
|
||||
<string name="field_empty">Ce champ en peut pas être vide</string>
|
||||
<string name="field_nan">Ce champ doit être un nombre</string>
|
||||
</resources>
|
@ -187,5 +187,6 @@
|
||||
<string name="action_edit_mode">Edition</string>
|
||||
|
||||
<string name="field_empty">This field cannot be blank</string>
|
||||
<string name="field_nan">This field must be a number</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user