Back to project page sdl_tester_android.
The source code is released under:
Copyright (c) 2014, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
If you think the Android project sdl_tester_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.livio.sdl.dialogs; /*from ww w .jav a 2s . co m*/ import android.content.Context; import android.content.DialogInterface; import android.view.View; import android.widget.TextView; import com.livio.sdl.R; /** * A simple dialog that contains a single, scrollable TextView. The textview * is initialized with a the title and message in the constructor. * * @author Mike Burke * */ public class TextViewOkCancelDialog extends BaseOkCancelDialog { protected TextView tv; public TextViewOkCancelDialog(Context context, String dialogTitle, String message){ super(context, dialogTitle, R.layout.textview); tv.setText(message); setPositiveButton(okListener); setNegativeButton(cancelListener); createDialog(); } @Override protected void findViews(View parent) { tv = (TextView) parent.findViewById(R.id.textview); } private DialogInterface.OnClickListener okListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { notifyListener(true); } }; private DialogInterface.OnClickListener cancelListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { notifyListener(false); } }; }