TextView append - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView append method.

This code example shows how to use the following methods: append
    String TEST_DOC_ID = "test_document_1";
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView view = new TextView(this);
        view.append("Running tests...\n\n");
        setContentView(view);
 
        try { 
            testDatabaseDoesNotExist(); 
            testCreateDatabase(); 
            testGetDatabaseInfo(); 
            testCreateDocument(); 
            testGetDocument(); 
            testGetAllDocuments(); 
            testUpdateDocument(); 
            testDeleteDocument(); 
            testDeleteDatabase(); 
            view.append("All tests passed!");

7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
	} 
 
	@Override 
	protected void onProgressUpdate(Integer... progress) {
 
		mTv.append("===============\n");
		mTv.append(mResults);
		mTv.append(progress[0] + "% done\n");
 
	} 
 
	/* Performs a benchmark according to @param benchmark */ 
	public String bench(int benchmark) {
 
		long time;
		long i;
		String ret = "";
 
		switch(benchmark){
		case APPEND:
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
		new AlertDialog.Builder(this).setMessage("DONE!").show();
	} 
 
	public void printMsg(String msg) {
//		new AlertDialog.Builder(this).setMessage(msg).show(); 
		tv.append(msg);
	} 
} 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: isEnabled, append
                        mTextView = (TextView) v; 
                    } 
                } 
            } 
            // check for time-based lockouts 
            if (mTextView != null && mTextView.isEnabled()) { 
                mTextView.append(String.valueOf(mDigit)); 
            } 
            doHapticKeyClick(); 
        } 
    }; 
 
    public NumPadKey(Context context) {
        this(context, null);
    } 
 
    public NumPadKey(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    } 
 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
    ScrollView scroller = null;
 
    /** Handles upcalls from C++ so that C++ code can display text on the TextView */ 
    class TextViewStreamer extends Streamer { 
      public void display(String text) {
        outputText.append(text);
      } 
    } 
 
    TextViewStreamer textViewStreamer = new TextViewStreamer();
 
    /** Called when the activity is first created. */ 
    @Override 
    public void onCreate(Bundle savedInstanceState)
    { 
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
 
        outputText = (TextView)findViewById(R.id.OutputText);
        outputText.setText("Press 'Run' to start...\n");
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
            messageView.setText("");
        } 
    } 
 
    public void addChatLine(String line) {
        mStatusView.append("\n" + line);
    } 
 
    @Override 
    protected void onPause() { 
        if (mNsdHelper != null) {
            mNsdHelper.stopDiscovery();
        } 
        super.onPause(); 
    } 
     
    @Override 
    protected void onResume() { 
        super.onResume(); 
        if (mNsdHelper != null) {
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
		height = metrics.heightPixels;
		dump("metrics.fields", width, height);
	} 
 
	private void dump(String m, int w, int h) {
		log.append(String.format("Via %s: Width %d, Height %d%n", m, w, h));
	} 
 
} 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setSpan, append, length
		fname = fname.substring(fname.lastIndexOf("/") + 1, fname.length());
		Drawable drawable = MainScreen.mContext.getResources().getDrawable(id);
		drawable.setBounds(0, 0, drawable.getIntrinsicWidth(),
				drawable.getIntrinsicHeight());
		ImageSpan span = new ImageSpan(drawable);
		SpannableString spanStr = new SpannableString(fname);
		spanStr.setSpan(span, 0, spanStr.length(),
				Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
		tv.append(spanStr);
	} 
 
	@Override 
	public View newView(Context context, Cursor cursor, ViewGroup parent) {
		View view = mInflater.inflate(R.layout.note_oneday_listview_item, null);
		NoteOneDayItem item = new NoteOneDayItem();
		item.tvDays = (TextView) view.findViewById(R.id.tv_oneday_days);
		item.tvTitle = (TextView) view.findViewById(R.id.tv_oneday_title);
		item.ivIsSigned = (ImageView) view
				.findViewById(R.id.iv_oneday_is_signed);
		item.tvTime = (TextView) view.findViewById(R.id.tv_oneday_time);
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
        } 
         
        @Override 
        protected void onPostExecute(byte[] signature) {
            long endTime = SystemClock.uptimeMillis();
            view.append(" done (" + (endTime-startTime) + "ms)");
            new VerifyTask(signature).execute();
        } 
    } 
     
    /** Verifies a signature */ 
    private class VerifyTask extends AsyncTask<Void, Void, Boolean> {
        TextView view;
        long startTime;
        byte[] signature;
         
        VerifyTask(byte[] signature) {
            this.signature = signature;
             
            String sigStr = Base64.encodeToString(signature, Base64.DEFAULT).substring(0, 20) + "...";
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: append
        } 
         
        @Override 
        protected void onPostExecute(byte[] encrypted) {
            long endTime = SystemClock.uptimeMillis();
            view.append(" done (" + (endTime-startTime) + "ms)");
            new DecryptTask(encrypted).execute();
        } 
    } 
     
    /** Decrypts a message and calls SigKeyGenTask */ 
    private class DecryptTask extends AsyncTask<Void, Void, byte[]> {
        TextView view;
        long startTime;
        byte[] encrypted;
         
        DecryptTask(byte[] encrypted) {
            this.encrypted = encrypted;
             
            String encStr = Base64.encodeToString(encrypted, Base64.DEFAULT).substring(0, 20) + "...";
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java

Related TextView append Questions & Answers:

append Method Overview
Convenience method: Append the specified text to the TextView's display buffer, upgrading it to BufferType.EDITABLE if it was not already editable.
See Code Examples for other Android TextView Methods: