Skip to content

Commit

Permalink
Fix crash on some devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
paolorotolo committed Apr 26, 2016
1 parent 57fa4c4 commit 0668ee7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,19 @@ public void onClick(View v) {
}
});

startButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onStartClicked();
}
});

Analytics analytics = application.getAnalytics();
analytics.reportScreen("Hello Activity");
Log.i("MainActivity", "Setting screen name: main");
}

public void onStartClicked(View v) {
public void onStartClicked() {
presenter.onNextClicked(ageTextView.getText().toString(),
genderSpinner.getSpinner().getSelectedItem().toString(),
Locale.getDefault().getDisplayLanguage(),
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_hello.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
android:background="?android:attr/selectableItemBackground"
android:drawableEnd="@drawable/ic_navigate_next_pink_24px"
android:drawableRight="@drawable/ic_navigate_next_pink_24px"
android:onClick="onStartClicked"
android:padding="8dp"
android:text="@string/helloactivity_button_start"
android:textColor="@color/glucosio_pink"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
<string name="preferences_experimental">These features are experimental and may not fully work and are for early testing by users. Remember that you can shake your phone to send us feedback.</string>
<string name="version" translatable="false">0.11.0 (Imli)</string>
<string name="preferences_version">Version</string>
<string name="preferences_coming_soon">Coming soon...</string>
<string name="preferences_terms">Terms of use</string>
<string name="glucose_reading_type">Type</string>
<string name="weight">Weight</string>
Expand Down

1 comment on commit 0668ee7

@emartynov
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why it was crashing? It is not obvious for me

Please sign in to comment.