Android Open Source - MateLightAndroid About Fragment






From Project

Back to project page MateLightAndroid.

License

The source code is released under:

Apache License

If you think the Android project MateLightAndroid 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

package de.cketti.matelight;
// w  w w  .jav a2  s  .  com
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;


public class AboutFragment extends DialogFragment {

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        View view = getActivity().getLayoutInflater().inflate(R.layout.fragment_about, null);

        TextView about = (TextView) view.findViewById(R.id.about_text);
        about.setText(Html.fromHtml(getString(R.string.about_text)));
        about.setMovementMethod(LinkMovementMethod.getInstance());

        return new AlertDialog.Builder(getActivity())
                .setTitle(getActivity().getString(R.string.about_dialog_title))
                .setPositiveButton(R.string.about_dialog_ok, null)
                .setView(view)
                .create();
    }
}




Java Source Code List

de.cketti.matelight.AboutFragment.java
de.cketti.matelight.MainActivity.java
de.cketti.matelight.MateLightFragment.java
de.cketti.matelight.MateLight.java