Skip to content

Instantly share code, notes, and snippets.

View hamurcuabi's full-sized avatar
🏠
Working from home

Emre Hamurcu hamurcuabi

🏠
Working from home
View GitHub Profile
/**
* Created by hamurcuabi on 05,October,2020
**/
public class BaseBottomSheet extends BottomSheetDialogFragment {
private static final String TAG = "BaseBottomSheet";
@NonNull
@hamurcuabi
hamurcuabi / HorizontalDottedProgress.java
Last active October 29, 2020 23:53
LoadingAnimation
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
@hamurcuabi
hamurcuabi / GenderType.java
Created October 31, 2020 20:44
Enum usage for java
import com.motionsteel.huhuu.R;
import java.util.HashMap;
import java.util.Map;
/**
* Created by hamurcuabi on 29,April,2020
**/
@hamurcuabi
hamurcuabi / LocaitonHelper.java
Last active October 31, 2020 20:46
Location to degree
package com.motionsteel.huhuu.helper;
import android.content.Context;
import android.location.Location;
import android.provider.Settings;
/**
* Created by hamurcuabi on 20,April,2020
**/
public class LocaitonHelper {
import android.view.View;
/**
* Created by hamurcuabi on 11,May,2020
**/
public abstract class DoubleClickListener implements View.OnClickListener {
private static final long DOUBLE_CLICK_TIME_DELTA = 300;//milliseconds
private long lastClickTime = 0;
package com.motionsteel.huhuu.util;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.util.Log;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@hamurcuabi
hamurcuabi / NetworkHelper.kt
Created November 1, 2020 13:07
NetworkHelper
package com.emrhmrc.androidpro
import android.content.Context
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.Build
/**Created by hamurcuabi on 01,November,2020 **/
@Suppress("DEPRECATION")
@hamurcuabi
hamurcuabi / BasicValidation.java
Created November 2, 2020 11:56
Basi Valdation for password
package com.emrhmrc.fideyo.utils;
import android.util.Patterns;
import com.emrhmrc.fideyo.model.ValidationModel;
import java.util.regex.Pattern;
/**
* Created by hamurcuabi on 28,August,2020
@hamurcuabi
hamurcuabi / DataStoreHelper.kt
Last active April 24, 2021 13:56
Datastore demoData store demo
package com.emrehmrc.pref_datastore.helper
import android.content.Context
import androidx.datastore.preferences.core.*
import androidx.datastore.preferences.preferencesDataStore
/**
* Rev 1.0
* Author EmreHamurcu
* Date 4/24/2021
@hamurcuabi
hamurcuabi / MainActivity.kt
Created May 2, 2021 14:50
MainActivity.kt
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
// Capture Image with Camera
if (requestCode == CAMERA_IMAGE_REQUEST && resultCode == Activity.RESULT_OK) {
if (data != null) {
val imageBitmap = data.getExtras().get("data") as Bitmap
// Do Something
} else {
// Couldn't take camera image