Example usage for android.util PrintWriterPrinter PrintWriterPrinter

List of usage examples for android.util PrintWriterPrinter PrintWriterPrinter

Introduction

In this page you can find the example usage for android.util PrintWriterPrinter PrintWriterPrinter.

Prototype

public PrintWriterPrinter(PrintWriter pw) 

Source Link

Document

Create a new Printer that sends to a PrintWriter object.

Usage

From source file:com.mobiletin.inputmethod.indic.LatinIME.java

@Override
protected void dump(final FileDescriptor fd, final PrintWriter fout, final String[] args) {
    super.dump(fd, fout, args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatinIME state :");
    p.println("  VersionCode = " + ApplicationUtils.getVersionCode(this));
    p.println("  VersionName = " + ApplicationUtils.getVersionName(this));
    final Keyboard keyboard = mKeyboardSwitcher.getKeyboard();
    final int keyboardMode = keyboard != null ? keyboard.mId.mMode : -1;
    p.println("  Keyboard mode = " + keyboardMode);
    final SettingsValues settingsValues = mSettings.getCurrent();
    p.println(settingsValues.dump());//from  w  w w .  j av  a  2 s . c  om
    // TODO: Dump all settings values
}

From source file:org.distantshoresmedia.keyboard.LatinIME.java

@Override
protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
    super.dump(fd, fout, args);

    final Printer p = new PrintWriterPrinter(fout);
    p.println("LatinIME state :");
    p.println("  Keyboard mode = " + mKeyboardSwitcher.getKeyboardMode());
    p.println("  mComposing=" + mComposing.toString());
    p.println("  mPredictionOnForMode=" + mPredictionOnForMode);
    p.println("  mCorrectionMode=" + mCorrectionMode);
    p.println("  mPredicting=" + mPredicting);
    p.println("  mAutoCorrectOn=" + mAutoCorrectOn);
    p.println("  mAutoSpace=" + mAutoSpace);
    p.println("  mCompletionOn=" + mCompletionOn);
    p.println("  TextEntryState.state=" + TextEntryState.getState());
    p.println("  mSoundOn=" + mSoundOn);
    p.println("  mVibrateOn=" + mVibrateOn);
    p.println("  mPopupOn=" + mPopupOn);
}