Skip to content

Instantly share code, notes, and snippets.

View samigehi's full-sized avatar
🎯
Focusing

Sumeet Kumar samigehi

🎯
Focusing
View GitHub Profile
@samigehi
samigehi / NativeMapView.android.kt
Last active July 12, 2024 12:12
Android / iOS Native MapView using Compose Multiplatform
package com.samigehi.map
@Composable
actual GetNativeMapView(modifier: Modifier) : NativeMapView {
// TODO not implemenmted
}
package com.allure.mht;
/*
* Licensed under the MIT License (https://opensource.org/licenses/MIT)
*/
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.DownloadManager;
import android.app.DownloadManager.Request;
@samigehi
samigehi / GifView.java
Created February 13, 2019 06:36
Gif View using Movie
package com.samigehi.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Movie;
import android.view.View;
import java.io.InputStream;
@samigehi
samigehi / RecyclerAdapter.java
Created November 22, 2018 09:34
Simpler generic RecyclerView.Adapter and RecyclerView.ViewHolder with click listener, easy to use, no boilerplate code
package com.sumeet.gehi;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
@samigehi
samigehi / UIImage+Orientation.swift
Last active January 4, 2018 10:38 — forked from nRewik/UIImage+Orientation.swift
UIImage fix orientation ( rotate pixel rather than relying on exif )
//
// UIImage+Orientation.swift
// DrCloudPatient
//
// Created by DW78 on 8/21/15.
// Copyright (c) 2015 DW78. All rights reserved.
//
// swift 3.2
import UIKit
@samigehi
samigehi / Android Studio .gitignore
Created August 30, 2016 10:04 — forked from iainconnor/Android Studio .gitignore
A .gitignore for use in Android Studio
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
@samigehi
samigehi / StatusBarUtils.java
Created April 1, 2016 12:00
add ImageView to Status Bar, Transparrent Status Bar
// add background image to Status Bar android
private void setStatusBar(Activity activity, int imageRes) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
@samigehi
samigehi / colors_material.xml
Created February 12, 2016 05:01
Material Design Colors ( Resources )
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Material Design Colors -->
<color name="md_red_50">#ffffebee</color>
<color name="md_red_100">#ffffcdd2</color>
<color name="md_red_200">#ffef9a9a</color>
<color name="md_red_300">#ffe57373</color>
<color name="md_red_400">#ffef5350</color>