Skip to content

Instantly share code, notes, and snippets.

View pcevikogullari's full-sized avatar

Pamir Cevikogullari pcevikogullari

View GitHub Profile
public class RoundedLinearLayout extends LinearLayout {
String TAG = getClass().getSimpleName();
Path mPath;
float mCornerRadius;
public boolean isCornerSet = false;
public RoundedLinearLayout(Context context) {
@pcevikogullari
pcevikogullari / ImageInputHelper.java
Created June 8, 2016 15:42 — forked from eluleci/ImageInputHelper.java
Android: Helper for Android for selecting image from gallery, taking a photo with camera and cropping image.
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import android.util.Log;
import java.io.File;
import java.io.IOException;
@pcevikogullari
pcevikogullari / DraggableView.java
Last active October 4, 2016 14:08
Draggable Button
public class DraggableView extends Button {
float dX;
float dY;
public DraggableView(Context context) {
super(context);
}
public DraggableView(Context context, AttributeSet attrs) {
@pcevikogullari
pcevikogullari / WebViewActivity.java
Created January 13, 2017 21:30
Execute Javascript in webview
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("http://xxx.xxx.xxx.xxx:yyyy/form");
/**
* Created by Pamir on 09/03/2017.
*/
public class MyLinearLayout extends LinearLayout {
private final float SCALE_PRESSED = 0.9f;
private final float SCALE_NORMAL = 1.0f;
private OnMyClickListener myOnClickListener;
@pcevikogullari
pcevikogullari / README-Template.md
Created March 29, 2017 11:21 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pcevikogullari
pcevikogullari / README-Template.md
Created March 29, 2017 11:21 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@pcevikogullari
pcevikogullari / include_list_viewpager.xml
Created April 29, 2018 22:45 — forked from iPaulPro/include_list_viewpager.xml
CollapsingToolbarLayout with TabLayout
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
@pcevikogullari
pcevikogullari / IconView.kt
Created June 27, 2018 14:47 — forked from nickbutcher/IconView.kt
A prototype implementation of a shadow effect inspired by the Google Play Games app (https://play.google.com/store/apps/details?id=com.google.android.play.games).
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY