Skip to content

Instantly share code, notes, and snippets.

🌃
Programming the best I can B-)

Carlos Cepeda CarlosACepeda

🌃
Programming the best I can B-)
Block or report user

Report or block CarlosACepeda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@CarlosACepeda
CarlosACepeda / KeyboardUtils.java
Created Oct 24, 2019 — forked from lopspower/KeyboardUtils.java
Force Hide Keyboard Android
View KeyboardUtils.java
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class KeyboardUtils {
public static void hideKeyboard(Activity activity) {
View view = activity.findViewById(android.R.id.content);
View StaticContextLeak.java
package pl.pszklarska.leakexample;
import android.content.Context;
import android.widget.Toast;
public class StaticContextLeak {
private static Context context;
public void setContext(final Context context) {
@CarlosACepeda
CarlosACepeda / convertanicon.cs
Created Mar 28, 2018
This is a snippet in how to Convert <Android.Graphics.Drawables.Icon> to <Android.Graphics.Drawables.Drawable> [c#] [Android][Xamarin.Android]
View convertanicon.cs
//Static: No need to make an instance to call this method.
// Receives two arguments:
//Icon: the Icon to convert:
//Paquete: Package of the app where the icon resides, needed to retrieve an icon from another application.
public static Drawable ReturnActionIconDrawable(Icon icon, string paquete)
{
//New Context field.
Context remotePackageContext = null;
//Create a context using the package passed in <paquete>
You can’t perform that action at this time.