Skip to content

Instantly share code, notes, and snippets.

View gelldur's full-sized avatar
🎯
Focusing

Gelldur gelldur

🎯
Focusing
View GitHub Profile
@gelldur
gelldur / CardView.h
Last active July 11, 2019 13:14
iOS view that looks like CardView from Android
#import <UIKit/UIKit.h>
//Based on: https://github.com/aclissold/CardView
@interface CardView : UIView
@end
@gelldur
gelldur / .clang-format
Last active March 27, 2024 16:51
My clang format file. In sample.cpp is sample output
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/
# Or http://cf.monofraps.net/
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# https://github.com/01org/parameter-framework/blob/master/.clang-format
# Tested on: clang-format version 6.0.1
# Common settings
BasedOnStyle: WebKit
@gelldur
gelldur / RoundedTransformation.java
Last active March 23, 2016 08:32 — forked from aprock/RoundedTransformation.java
Rounded Corner Image Transformation for square's Picasso
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
// enables hardware accelerated rounded corners
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.ArrayList;
import java.util.Arrays;
public class CyclicPagesAdapter extends FragmentStatePagerAdapter {
@gelldur
gelldur / FullscreenFragment.java
Created September 11, 2015 12:48
FullscreenFragment - simple android fragment that will make fullscreen for you. Remember to: "You must manually call onKeyDown and onWindowFocusChanged."
package com.dexode.fragment;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.view.KeyEvent;
@gelldur
gelldur / ShareIntentBuilder
Last active January 24, 2022 11:12
Share builder for android
package com.dexode.util;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LabeledIntent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.support.annotation.Nullable;
@gelldur
gelldur / HideNavigationBarComponent.java
Last active June 17, 2022 17:56
HideNavigationBarComponent.java
package com.dexode.core.view;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnSystemUiVisibilityChangeListener;
@gelldur
gelldur / onEnter checker
Last active August 29, 2015 14:14
Chcking for onEnter method
template<typename T>
struct has_onEnter
{
private:
template<typename U>
static auto test(int) -> decltype(std::declval<U>().onEnter(), std::true_type
{});
template<typename >
static std::false_type test(...);