fedilab-Android-App/app/src/main/java/app/fedilab/android/fragments/SettingsNotificationsFragme...

517 lines
23 KiB
Java
Raw Normal View History

2019-05-18 11:10:30 +02:00
package app.fedilab.android.fragments;
2017-05-05 16:36:04 +02:00
/* Copyright 2017 Thomas Schneider
*
2019-05-18 11:10:30 +02:00
* This file is a part of Fedilab
2017-05-05 16:36:04 +02:00
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
2019-05-18 11:10:30 +02:00
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
2017-05-05 16:36:04 +02:00
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
2019-05-18 11:10:30 +02:00
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
2017-05-05 16:36:04 +02:00
* see <http://www.gnu.org/licenses>. */
2017-07-10 18:43:36 +02:00
import android.app.TimePickerDialog;
2017-05-05 16:36:04 +02:00
import android.content.Context;
2018-09-19 10:13:28 +02:00
import android.content.Intent;
2017-05-05 16:36:04 +02:00
import android.content.SharedPreferences;
2018-09-19 10:13:28 +02:00
import android.media.RingtoneManager;
import android.net.Uri;
2019-04-19 16:05:00 +02:00
import android.os.Build;
2017-05-05 16:36:04 +02:00
import android.os.Bundle;
2019-04-19 16:05:00 +02:00
import android.provider.Settings;
2019-06-11 19:38:26 +02:00
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.appcompat.widget.SwitchCompat;
2017-05-05 16:36:04 +02:00
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
2017-07-10 18:43:36 +02:00
import android.widget.Button;
2017-05-05 16:36:04 +02:00
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
2017-07-10 18:43:36 +02:00
import android.widget.TimePicker;
import android.widget.Toast;
2019-05-18 11:10:30 +02:00
import app.fedilab.android.helper.Helper;
2018-11-25 10:45:16 +01:00
import es.dmoral.toasty.Toasty;
2019-05-18 11:10:30 +02:00
import app.fedilab.android.R;
2017-05-05 16:36:04 +02:00
2018-09-19 10:13:28 +02:00
import static android.app.Activity.RESULT_OK;
2017-07-10 18:43:36 +02:00
2017-05-05 16:36:04 +02:00
/**
* Created by Thomas on 29/04/2017.
* Fragment for settings, yes I didn't use PreferenceFragment :)
*/
public class SettingsNotificationsFragment extends Fragment {
private Context context;
2017-08-13 11:30:28 +02:00
private int style;
2018-09-19 10:13:28 +02:00
private static final int ACTIVITY_CHOOSE_SOUND = 412;
int count = 0;
int count1 = 0;
2017-05-05 16:36:04 +02:00
@Override
2017-11-11 10:05:37 +01:00
public View onCreateView(@NonNull LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
2017-05-05 16:36:04 +02:00
View rootView = inflater.inflate(R.layout.fragment_settings_notifications, container, false);
context = getContext();
2017-11-11 10:05:37 +01:00
assert context != null;
2017-05-05 16:36:04 +02:00
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
2017-08-13 11:30:28 +02:00
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
if( theme == Helper.THEME_DARK){
style = R.style.DialogDark;
}else {
style = R.style.Dialog;
}
boolean notify = sharedpreferences.getBoolean(Helper.SET_NOTIFY, true);
2017-10-28 11:02:37 +02:00
final SwitchCompat switchCompatNotify = rootView.findViewById(R.id.set_notify);
switchCompatNotify.setChecked(notify);
2017-10-28 11:02:37 +02:00
final LinearLayout notification_settings = rootView.findViewById(R.id.notification_settings);
if( notify)
notification_settings.setVisibility(View.VISIBLE);
else
notification_settings.setVisibility(View.GONE);
switchCompatNotify.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Save the state here
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIFY, isChecked);
editor.apply();
if( isChecked)
notification_settings.setVisibility(View.VISIBLE);
else
notification_settings.setVisibility(View.GONE);
}
});
2017-11-11 10:05:37 +01:00
2017-05-05 16:36:04 +02:00
boolean notif_follow = sharedpreferences.getBoolean(Helper.SET_NOTIF_FOLLOW, true);
boolean notif_add = sharedpreferences.getBoolean(Helper.SET_NOTIF_ADD, true);
boolean notif_ask = sharedpreferences.getBoolean(Helper.SET_NOTIF_ASK, true);
boolean notif_mention = sharedpreferences.getBoolean(Helper.SET_NOTIF_MENTION, true);
boolean notif_share = sharedpreferences.getBoolean(Helper.SET_NOTIF_SHARE, true);
boolean notif_poll = sharedpreferences.getBoolean(Helper.SET_NOTIF_POLL, true);
2017-05-05 16:36:04 +02:00
boolean notif_wifi = sharedpreferences.getBoolean(Helper.SET_WIFI_ONLY, false);
boolean notif_silent = sharedpreferences.getBoolean(Helper.SET_NOTIF_SILENT, false);
2018-01-20 11:07:26 +01:00
boolean notif_hometimeline = sharedpreferences.getBoolean(Helper.SET_NOTIF_HOMETIMELINE, false);
2017-05-05 16:36:04 +02:00
2017-07-10 18:43:36 +02:00
final String time_from = sharedpreferences.getString(Helper.SET_TIME_FROM, "07:00");
final String time_to = sharedpreferences.getString(Helper.SET_TIME_TO, "22:00");
2017-10-28 11:02:37 +02:00
final CheckBox set_notif_follow = rootView.findViewById(R.id.set_notif_follow);
final CheckBox set_notif_follow_add = rootView.findViewById(R.id.set_notif_follow_add);
final CheckBox set_notif_follow_ask = rootView.findViewById(R.id.set_notif_follow_ask);
final CheckBox set_notif_follow_mention = rootView.findViewById(R.id.set_notif_follow_mention);
final CheckBox set_notif_follow_share = rootView.findViewById(R.id.set_notif_follow_share);
final CheckBox set_notif_follow_poll = rootView.findViewById(R.id.set_notif_follow_poll);
2017-10-28 11:02:37 +02:00
final CheckBox set_notif_hometimeline = rootView.findViewById(R.id.set_notif_hometimeline);
2017-10-28 11:02:37 +02:00
final SwitchCompat switchCompatWIFI = rootView.findViewById(R.id.set_wifi_only);
final SwitchCompat switchCompatSilent = rootView.findViewById(R.id.set_silence);
2017-05-05 16:36:04 +02:00
2017-10-28 11:02:37 +02:00
final Button settings_time_from = rootView.findViewById(R.id.settings_time_from);
final Button settings_time_to = rootView.findViewById(R.id.settings_time_to);
2017-07-10 18:43:36 +02:00
2019-04-19 16:05:00 +02:00
final LinearLayout channels_container = rootView.findViewById(R.id.channels_container);
final Button sound_boost = rootView.findViewById(R.id.sound_boost);
final Button sound_fav = rootView.findViewById(R.id.sound_fav);
final Button sound_follow = rootView.findViewById(R.id.sound_follow);
final Button sound_mention = rootView.findViewById(R.id.sound_mention);
final Button sound_poll = rootView.findViewById(R.id.sound_poll);
2019-04-19 16:05:00 +02:00
final Button sound_backup = rootView.findViewById(R.id.sound_backup);
final Button sound_media = rootView.findViewById(R.id.sound_media);
Button set_notif_sound = rootView.findViewById(R.id.set_notif_sound);
2017-07-10 18:43:36 +02:00
settings_time_from.setText(time_from);
settings_time_to.setText(time_to);
2019-04-19 16:05:00 +02:00
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
set_notif_sound.setVisibility(View.GONE);
channels_container.setVisibility(View.VISIBLE);
2017-07-10 18:43:36 +02:00
2019-04-19 16:05:00 +02:00
sound_boost.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_boost");
startActivity(intent);
}
});
sound_fav.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_fav");
startActivity(intent);
}
});
sound_follow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_follow");
startActivity(intent);
}
});
sound_mention.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_mention");
startActivity(intent);
}
});
sound_poll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_poll");
startActivity(intent);
}
});
2019-04-19 16:05:00 +02:00
sound_backup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_backup");
startActivity(intent);
}
});
sound_media.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, "channel_store");
startActivity(intent);
}
});
}else{
set_notif_sound.setVisibility(View.VISIBLE);
channels_container.setVisibility(View.GONE);
set_notif_sound.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, context.getString(R.string.select_sound));
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null);
startActivityForResult(intent, ACTIVITY_CHOOSE_SOUND);
}
});
}
2018-09-19 10:13:28 +02:00
boolean enable_time_slot = sharedpreferences.getBoolean(Helper.SET_ENABLE_TIME_SLOT, true);
final CheckBox set_enable_time_slot = rootView.findViewById(R.id.set_enable_time_slot);
set_enable_time_slot.setChecked(enable_time_slot);
set_enable_time_slot.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_ENABLE_TIME_SLOT, set_enable_time_slot.isChecked());
editor.apply();
}
});
2017-07-10 18:43:36 +02:00
settings_time_from.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String[] datetime = time_from.split(":");
2017-08-13 11:30:28 +02:00
TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(), style, new TimePickerDialog.OnTimeSetListener() {
2017-07-10 18:43:36 +02:00
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
SharedPreferences.Editor editor = sharedpreferences.edit();
String hours = (String.valueOf(hourOfDay).length() == 1) ? "0"+String.valueOf(hourOfDay):String.valueOf(hourOfDay);
String minutes = (String.valueOf(minute).length() == 1) ? "0"+String.valueOf(minute):String.valueOf(minute);
String newDate = hours + ":" + minutes;
2019-05-18 11:10:30 +02:00
if( Helper.compareDate(context, newDate, false) ) {
2017-07-10 18:43:36 +02:00
editor.putString(Helper.SET_TIME_FROM, newDate);
editor.apply();
settings_time_from.setText(newDate);
}else {
String ateRef = sharedpreferences.getString(Helper.SET_TIME_TO, "22:00");
2018-11-25 10:45:16 +01:00
Toasty.error(context, context.getString(R.string.settings_time_lower, ateRef), Toast.LENGTH_LONG).show();
2017-07-10 18:43:36 +02:00
}
}
2017-07-10 19:20:27 +02:00
}, Integer.valueOf(datetime[0]), Integer.valueOf(datetime[1]), true);
timePickerDialog.setTitle(context.getString(R.string.settings_hour_init));
timePickerDialog.show();
2017-07-10 18:43:36 +02:00
}
});
settings_time_to.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String[] datetime = time_to.split(":");
2017-08-13 11:30:28 +02:00
TimePickerDialog timePickerDialog = new TimePickerDialog(getActivity(),style, new TimePickerDialog.OnTimeSetListener() {
2017-07-10 18:43:36 +02:00
@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
SharedPreferences.Editor editor = sharedpreferences.edit();
2017-07-10 19:20:27 +02:00
String hours = (String.valueOf(hourOfDay).length() == 1) ? "0" + String.valueOf(hourOfDay) : String.valueOf(hourOfDay);
String minutes = (String.valueOf(minute).length() == 1) ? "0" + String.valueOf(minute) : String.valueOf(minute);
2017-07-10 18:43:36 +02:00
String newDate = hours + ":" + minutes;
2019-05-18 11:10:30 +02:00
if (Helper.compareDate(context, newDate, true)) {
2017-07-10 18:43:36 +02:00
editor.putString(Helper.SET_TIME_TO, newDate);
editor.apply();
settings_time_to.setText(newDate);
2017-07-10 19:20:27 +02:00
} else {
2017-07-10 18:43:36 +02:00
String ateRef = sharedpreferences.getString(Helper.SET_TIME_FROM, "07:00");
2018-11-25 10:45:16 +01:00
Toasty.error(context, context.getString(R.string.settings_time_greater, ateRef), Toast.LENGTH_LONG).show();
2017-07-10 18:43:36 +02:00
}
}
2017-07-10 19:20:27 +02:00
}, Integer.valueOf(datetime[0]), Integer.valueOf(datetime[1]), true);
timePickerDialog.setTitle(context.getString(R.string.settings_hour_end));
timePickerDialog.show();
2017-07-10 18:43:36 +02:00
}
});
final Spinner action_notification = rootView.findViewById(R.id.action_notification);
ArrayAdapter<CharSequence> adapterAction = ArrayAdapter.createFromResource(getContext(),
R.array.action_notification, android.R.layout.simple_spinner_item);
action_notification.setAdapter(adapterAction);
int positionNotificationAntion;
switch (sharedpreferences.getInt(Helper.SET_NOTIFICATION_ACTION, Helper.ACTION_ACTIVE)){
case Helper.ACTION_ACTIVE:
positionNotificationAntion = 0;
break;
case Helper.ACTION_SILENT:
positionNotificationAntion = 1;
break;
default:
positionNotificationAntion = 0;
}
action_notification.setSelection(positionNotificationAntion);
action_notification.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if( count1 > 0 ) {
SharedPreferences.Editor editor = sharedpreferences.edit();
switch (position) {
case 0:
editor.putInt(Helper.SET_NOTIFICATION_ACTION, Helper.ACTION_ACTIVE);
editor.apply();
break;
case 1:
editor.putInt(Helper.SET_NOTIFICATION_ACTION, Helper.ACTION_SILENT);
editor.apply();
break;
}
}
count1++;
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
2017-05-05 16:36:04 +02:00
set_notif_follow.setChecked(notif_follow);
set_notif_follow_add.setChecked(notif_add);
set_notif_follow_ask.setChecked(notif_ask);
set_notif_follow_mention.setChecked(notif_mention);
set_notif_follow_share.setChecked(notif_share);
set_notif_follow_poll.setChecked(notif_poll);
set_notif_hometimeline.setChecked(notif_hometimeline);
2017-05-05 16:36:04 +02:00
switchCompatWIFI.setChecked(notif_wifi);
switchCompatSilent.setChecked(notif_silent);
2017-05-05 16:36:04 +02:00
set_notif_hometimeline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_HOMETIMELINE, set_notif_hometimeline.isChecked());
editor.apply();
}
});
2017-05-05 16:36:04 +02:00
set_notif_follow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_FOLLOW, set_notif_follow.isChecked());
editor.apply();
}
});
set_notif_follow_add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_ADD, set_notif_follow_add.isChecked());
editor.apply();
}
});
set_notif_follow_ask.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_ASK, set_notif_follow_ask.isChecked());
editor.apply();
}
});
set_notif_follow_mention.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_MENTION, set_notif_follow_mention.isChecked());
editor.apply();
}
});
set_notif_follow_share.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_SHARE, set_notif_follow_share.isChecked());
editor.apply();
}
});
set_notif_follow_poll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_POLL, set_notif_follow_poll.isChecked());
editor.apply();
}
});
2017-05-05 16:36:04 +02:00
switchCompatWIFI.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Save the state here
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_WIFI_ONLY, isChecked);
editor.apply();
}
});
2017-10-28 11:02:37 +02:00
final Spinner led_colour_spinner = rootView.findViewById(R.id.led_colour_spinner);
final TextView ledLabel = rootView.findViewById(R.id.set_led_colour_label);
switchCompatSilent.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// Save the state here
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putBoolean(Helper.SET_NOTIF_SILENT, isChecked);
editor.apply();
if (isChecked) {
ledLabel.setEnabled(true);
led_colour_spinner.setEnabled(true);
} else {
ledLabel.setEnabled(false);
for (View lol : led_colour_spinner.getTouchables()) {
lol.setEnabled(false);
}
}
}
});
if (sharedpreferences.getBoolean(Helper.SET_NOTIF_SILENT, false)) {
ledLabel.setEnabled(true);
led_colour_spinner.setEnabled(true);
2017-11-11 10:05:37 +01:00
ArrayAdapter<CharSequence> adapterLEDColour = ArrayAdapter.createFromResource(getContext(), R.array.led_colours, android.R.layout.simple_spinner_item);
led_colour_spinner.setAdapter(adapterLEDColour);
int positionSpinnerLEDColour = (sharedpreferences.getInt(Helper.SET_LED_COLOUR, Helper.LED_COLOUR));
led_colour_spinner.setSelection(positionSpinnerLEDColour);
led_colour_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
if (count > 0) {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putInt(Helper.SET_LED_COLOUR, position);
editor.apply();
} else {
count++;
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
else {
ledLabel.setEnabled(false);
for (View lol : led_colour_spinner.getTouchables()) {
lol.setEnabled(false);
}
}
2017-05-05 16:36:04 +02:00
return rootView;
}
2018-09-19 10:13:28 +02:00
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
2017-05-05 16:36:04 +02:00
2019-04-19 16:05:00 +02:00
if (requestCode == ACTIVITY_CHOOSE_SOUND){
2018-09-19 10:13:28 +02:00
try{
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.SET_NOTIF_SOUND, uri.toString());
editor.apply();
2019-04-19 16:05:00 +02:00
2018-09-19 10:13:28 +02:00
}catch (Exception e){
2018-11-25 10:45:16 +01:00
Toasty.error(context, context.getString(R.string.toast_error),Toast.LENGTH_LONG).show();
2018-09-19 10:13:28 +02:00
}
}
}
2017-05-05 16:36:04 +02:00
@Override
public void onCreate(Bundle saveInstance) {
super.onCreate(saveInstance);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.context = context;
}
}