]> git.ktnx.net Git - mobile-ledger.git/commitdiff
replace onClick XML declaration with a runtime hook
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 21 Jan 2019 19:38:59 +0000 (19:38 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 21 Jan 2019 19:38:59 +0000 (19:38 +0000)
fails in API 22

app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java
app/src/main/res/layout/activity_main.xml

index 1afc155d39e8e7d0bc6cd4dd7038406352e59476..f8bb6ce37c39727a9a8e958d11a11e06129d517b 100644 (file)
@@ -166,6 +166,8 @@ public class MainActivity extends AppCompatActivity {
         });
 
         findViewById(R.id.btn_no_profiles_add).setOnClickListener(v -> startAddProfileActivity());
+
+        findViewById(R.id.btn_add_transaction).setOnClickListener(this::fabNewTransactionClicked);
     }
     @Override
     protected void onResume() {
index 7f01a1befa32de1569f24d92b56c626b8b8ddb34..6ddb67e4141e35d680b6bfc1854b593b09d888dd 100644 (file)
@@ -51,7 +51,6 @@
                     android:layout_height="wrap_content"
                     android:layout_gravity="bottom|end"
                     android:layout_margin="@dimen/fab_margin"
-                    android:onClick="fabNewTransactionClicked"
                     app:backgroundTint="@color/colorAccent"
                     app:layout_constraintBottom_toBottomOf="parent"
                     app:layout_constraintEnd_toEndOf="parent"