What do you want to save?
Add Code snippet
New code examples
-
Java 2021-11-11 11:32:19
change focus of edittext android when click outside
@Override public boolean dispatchTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { View v = getCurrentFocus(); if ( v instanceof EditText) { Rect outRect = new Rect(); v.getGlob... Add solution -
Java 2021-11-10 14:21:09
android kill other app programmatically by package
ActivityManager am = (ActivityManager) getSystemService(Activity.ACTIVITY_SERVICE); am.killBackgroundProcesses(packageName); Permission: <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> Add solution -
Kotlin 2021-11-09 17:04:17
hide keyboard suggestion android kotlin
class CloseHideSoftKeyboard : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_message) val editTextXml = findViewById<EditText&... Add solution -
Other 2021-11-02 09:33:13
restart service ondestroy android
AppLog.i("System UI Service is Restarting") val startSystemUiIntent = Intent(context, AwesomeService::class.java) val restartServicePendingIntent = PendingIntent.getService(context, 1, startSystemUiIntent, PendingIntent.F... Add solution -
Java 2021-11-01 11:09:11
java copy paste from clipboard
import java.awt.datatransfer.StringSelection; import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; String myString = "This text will be copied into clipboard"; StringSelection stringSelection = new StringSelection(myString); Clipbo... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5