Android Open Source - material-notes About Notice Dialog






From Project

Back to project page material-notes.

License

The source code is released under:

Apache License

If you think the Android project material-notes 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 com.materialnotes.widget;
/*from  w  w  w .  j a  v a 2 s. c o  m*/
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;

import com.materialnotes.R;

import roboguice.fragment.RoboDialogFragment;
import roboguice.inject.InjectView;

/**
 * Dialogo que muestra informacin acerca de aplicacin.
 *
 * @author Daniel Pedraza Arcega
 */
public class AboutNoticeDialog extends RoboDialogFragment {

    private static final String TAG = AboutNoticeDialog.class.getSimpleName();

    @InjectView(R.id.version_text) private TextView versionText;

    /**
     * Crea la vista de este dialogo.
     *
     * @param inflater un inflater.
     * @param container un container.
     * @param savedInstanceState un bundle.
     * @return la vista.
     */
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.dialog_about_notice, container, false);
    }

    /**
     * Inicializa la vista creada.
     *
     * @param view la vista creada.
     * @param savedInstanceState un bundle.
     */
    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
        try {
            String versionName = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0).versionName;
            versionText.setText(getString(R.string.version_format, versionName));
        } catch (PackageManager.NameNotFoundException ex) {
            Log.e(TAG, "Couldn't find version name", ex);
        }
    }
}




Java Source Code List

com.materialnotes.activity.EditNoteActivity.java
com.materialnotes.activity.MainActivity.java
com.materialnotes.activity.ViewNoteActivity.java
com.materialnotes.config.ConfigModule.java
com.materialnotes.data.Note.java
com.materialnotes.data.dao.NoteDAO.java
com.materialnotes.data.dao.impl.sqlite.NoteSQLiteDAO.java
com.materialnotes.data.source.sqlite.NotesDatabaseHelper.java
com.materialnotes.data.source.sqlite.SQLFileParser.java
com.materialnotes.util.Strings.java
com.materialnotes.view.ShowHideOnScroll.java
com.materialnotes.widget.AboutNoticeDialog.java
com.materialnotes.widget.NotesAdapter.java