Skip to content

Commit

Permalink
Improved feedback #28, small bugfixes and improvements, prepare for v…
Browse files Browse the repository at this point in the history
…ersion 4 (0.9.2)
  • Loading branch information
Bertware committed Jun 27, 2017
1 parent 3263a6f commit 21e932d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

/**
* A simple {@link Fragment} subclass.
Expand All @@ -39,6 +40,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
final EditText vFeedbackText = ((EditText) view.findViewById(R.id.input_text));

view.findViewById(R.id.button_send).setOnClickListener(new View.OnClickListener() {
@Override
Expand All @@ -58,6 +60,7 @@ public void onClick(View view) {
feedbackEmail.setType("text/email");
feedbackEmail.putExtra(Intent.EXTRA_EMAIL, new String[]{"feedback@hyperrail.be"});
feedbackEmail.putExtra(Intent.EXTRA_SUBJECT, "Feedback for hyperrail " + version);
feedbackEmail.putExtra(Intent.EXTRA_TEXT, vFeedbackText.getText());
startActivity(Intent.createChooser(feedbackEmail, "Send feedback mail:"));
}
});
Expand Down
5 changes: 5 additions & 0 deletions Hyperrail/src/main/res/layout/fragment_feedback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:orientation="vertical">

<TextView
Expand All @@ -15,6 +19,7 @@
android:text="@string/feedback_explanation"/>

<EditText
android:id="@+id/input_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
Expand Down
2 changes: 1 addition & 1 deletion Hyperrail/src/main/res/menu/drawer_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<item android:id="@+id/action_settings"
android:title="@string/title_activity_settings"
android:icon="@android:drawable/ic_menu_preferences"
android:icon="@drawable/ic_settings_white"
app:showAsAction="ifRoom|collapseActionView" />

<item android:id="@+id/action_feedback"
Expand Down

0 comments on commit 21e932d

Please sign in to comment.