E-Mail Intent eingefügt
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.sebse.fuplanner.fragments.moddetails;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.util.Pair;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -205,10 +207,15 @@ class ModDetailOverviewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
||||
Lecturer lecturer = mValue.lecturer.get(index);
|
||||
m.mTitle.setText(lecturer.getName());
|
||||
m.mSubLeft.setText(lecturer.getMail());
|
||||
//i.mSubRight.setText(UtilsDate.getModifiedDateTime(i.mView.getContext(), announce.getCreatedOn()));
|
||||
/*i.mView.setOnClickListener(view -> {
|
||||
if (mListener != null) mListener.gotoFragmentPart(section, index);
|
||||
});*/
|
||||
m.mIcon.setOnClickListener(view -> {
|
||||
String defaultText = m.mView.getResources().getString(R.string.mail_default_text,
|
||||
lecturer.getName());
|
||||
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
emailIntent.setData(Uri.parse("mailto:"+lecturer.getMail()));
|
||||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, mValue.title);
|
||||
emailIntent.putExtra(Intent.EXTRA_TEXT, defaultText);
|
||||
m.mView.getContext().startActivity(Intent.createChooser(emailIntent, mValue.title));
|
||||
});
|
||||
break;
|
||||
}
|
||||
case TYPE_SHOW_MORE:
|
||||
|
||||
@@ -80,4 +80,5 @@
|
||||
<string name="summer_semester">Sommersemester %1$d</string>
|
||||
<string name="lecturers">Dozenten</string>
|
||||
<string name="mail_icon">Mail Icon</string>
|
||||
<string name="mail_default_text">Hallo %1$s, \n\nMit freundlichen Grüßen\n\nGesendet von der FUPlanner Android App</string>
|
||||
</resources>
|
||||
@@ -88,4 +88,5 @@
|
||||
<string name="summer_semester">Summer Semester %1$d</string>
|
||||
<string name="lecturers">Lecturers</string>
|
||||
<string name="mail_icon">Mail Icon</string>
|
||||
<string name="mail_default_text">Dear %1$s, \n\nYours sincerely\n\nSend by FUPlanner Android App</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user