Java tutorial
//package com.java2s; /* * This is the source code of Telegram for Android v. 1.4.x. * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Nikolai Kudashov, 2013-2014. */ import android.os.Build; import android.widget.EditText; import android.widget.TextView; import java.lang.reflect.Field; public class Main { public static void clearCursorDrawable(EditText editText) { if (editText == null || Build.VERSION.SDK_INT < 12) { return; } try { Field mCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes"); mCursorDrawableRes.setAccessible(true); mCursorDrawableRes.setInt(editText, 0); } catch (Exception e) { // FileLog.e("tmessages", e); } } }