Skip to content

Commit

Permalink
Merge pull request #2 from pushkar-anand/patch-1.1.5
Browse files Browse the repository at this point in the history
patch-1.1.5
  • Loading branch information
pushkar-anand authored Nov 24, 2018
2 parents b0c0fd3 + 172c002 commit ab83948
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "me.pushkaranand.spendo"
minSdkVersion 21
targetSdkVersion 28
versionCode 6
versionName "1.1.4"
versionCode 7
versionName "1.1.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

kapt {
Expand Down
Binary file modified app/release/release/app.aab
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class HomeActivity : AppCompatActivity() {
val categories = data.getStringExtra(NewTransactionActivity.TRANSACTION_CATEGORIES)
val date = data.getStringExtra(NewTransactionActivity.TRANSACTION_DATE)
var notes: String? = null
if (data.hasCategory(NewTransactionActivity.TRANSACTION_NOTES)) {
if (data.hasExtra(NewTransactionActivity.TRANSACTION_NOTES)) {
notes = data.getStringExtra(NewTransactionActivity.TRANSACTION_NOTES)
}
amount = if (type == getString(R.string.debit_choice)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
Expand Down Expand Up @@ -91,6 +92,12 @@ class ViewTransactionActivity : AppCompatActivity() {
tmp += "$c\n"
}
categoriesTextView.text = tmp

if (it.notes != null) {
notesImg.visibility = View.VISIBLE
notesTextView.visibility = View.VISIBLE
notesTextView.text = it.notes
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/content_view_transaction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:padding="15dp"
android:contentDescription="@string/category_label"
app:layout_constraintBottom_toBottomOf="@+id/categoriesTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/categoriesTextView"
Expand All @@ -81,6 +82,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:padding="15dp"
android:contentDescription="@string/date_label"
app:layout_constraintBottom_toBottomOf="@+id/dateTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/dateTextView"
Expand Down Expand Up @@ -116,6 +118,9 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:padding="15dp"
android:contentDescription="@string/notes_label"
android:visibility="gone"
tools:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/notesTextView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/notesTextView"
Expand All @@ -131,6 +136,8 @@
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:textSize="18sp"
android:visibility="gone"
tools:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/notesImg"
app:layout_constraintTop_toBottomOf="@+id/dateTextView"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@


<!--ViewTransactionActivity -->
<string name="category_label">Category</string>
<string name="date_label">Date</string>
<string name="notes_label">Notes</string>
<string name="edit">Edit</string>
<string name="delete">Delete</string>
<string name="delete_dialog_title">Delete</string>
Expand Down

0 comments on commit ab83948

Please sign in to comment.