Android Open Source - BLEMeshChat Util

From Project

Back to project page BLEMeshChat.


The source code is released under:

GNU General Public License

If you think the Android project BLEMeshChat 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 pro.dbro.ble.ui.activities;
/*from w  w w .ja v a  2 s  .  co  m*/
import android.content.Context;
import android.content.DialogInterface;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import pro.dbro.ble.ChatApp;
import pro.dbro.ble.R;

 * Created by davidbrodsky on 10/13/14.
public class Util {

    public static void showWelcomeDialog(@NonNull final ChatApp app, @NonNull final Context context, DialogInterface.OnDismissListener dismissListener) {
        View dialogView = ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
                            .inflate(R.layout.dialog_welcome, null);
        final EditText aliasEntry = ((EditText) dialogView.findViewById(;

        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        final AlertDialog dialog = builder.setTitle(context.getString(R.string.dialog_welcome_greeting))
                .setPositiveButton(context.getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialogInterface, int i) {
        aliasEntry.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
                return false;

Java Source Code List