Android Open Source - announce-my-agenda-app Unsupported Language Alert Fragment






From Project

Back to project page announce-my-agenda-app.

License

The source code is released under:

GNU General Public License

If you think the Android project announce-my-agenda-app listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/** "Announce My Agenda" Android App
    Copyright (C) 2014 Chad Albers//from  w w  w. j av a  2  s  . c  o  m

    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.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

package com.neomantic.calendar_out_loud;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;

public class UnsupportedLanguageAlertFragment extends DialogFragment {

  @Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
    return new AlertDialog.Builder(getActivity())
      .setTitle(R.string.alert_title_unsupported_language)
      .setMessage(R.string.alert_btn_unsupported_language_msg)
      .setPositiveButton(R.string.alert_btn_unsupported_language_ok,
          new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int which) {
              MainActivity m = ((MainActivity) getActivity());
              m.disableSpeechButton();
              m.disableListView();
            }
          })
      .create();
  }

  public static DialogFragment newInstance() {
    return new UnsupportedLanguageAlertFragment();
  }

}




Java Source Code List

com.neomantic.calendar_out_loud.AgendaLine.java
com.neomantic.calendar_out_loud.Agenda.java
com.neomantic.calendar_out_loud.MainActivity.java
com.neomantic.calendar_out_loud.Script.java
com.neomantic.calendar_out_loud.UnsupportedLanguageAlertFragment.java
com.neomantic.calendar_out_loud.ViewAppInfoActivity.java