Android Open Source - sdl_tester_android Text View Ok Cancel Dialog

From Project

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.

Java Source Code

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);

  protected void findViews(View parent) {
    tv = (TextView) parent.findViewById(;
  private DialogInterface.OnClickListener okListener = new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {
  private DialogInterface.OnClickListener cancelListener = new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface dialog, int which) {


Java Source Code List