Android examples for Database:Cursor Column
get Cursor Column String
//package com.java2s; import android.database.Cursor; public class Main { public static String getCursorColumnString(Cursor cursor) { String[] columns = cursor.getColumnNames(); StringBuilder builder = new StringBuilder("["); for (int i = 0; i < columns.length - 1; i++) { builder.append(columns[i] + ","); }/*from w ww.j av a 2 s. c o m*/ builder.append(columns[columns.length - 1]).append("]"); return builder.toString(); } }