Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ogaclejapan on github.
  • I am ogaclejapan (https://keybase.io/ogaclejapan) on keybase.
  • I have a public key ASCTyFaGTUSFCidqJWTzohSTqvlTV9CqSEgMGw3twnew9go

To claim this, I am signing this object:

@ogaclejapan
ogaclejapan / media-query.css
Created April 18, 2020 04:15 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@ogaclejapan
ogaclejapan / MainActivity.kt
Last active September 10, 2018 10:06
onStop() is not called on Nougat 7.0 - repeat next activity start and backpress several times
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d("TEST", "onCreate: $this")
setContentView(R.layout.activity_main)
findViewById<View>(R.id.test).setOnClickListener { test() }
}
override fun onStart() {
@ogaclejapan
ogaclejapan / MainActivity.java
Created April 5, 2015 03:38
Sample to set the argument to the Fragment of SmartTabLayout
package com.ogaclejapan.myapplication;
import com.ogaclejapan.smarttablayout.SmartTabLayout;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItem;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItemAdapter;
import com.ogaclejapan.smarttablayout.utils.v4.FragmentPagerItems;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
@ogaclejapan
ogaclejapan / MainActivity.java
Last active September 27, 2016 07:43
Sample of SmartTabLayout Issue #2
package com.ogaclejapan.myapplication;
import com.ogaclejapan.smarttablayout.SmartTabLayout;
import com.ogaclejapan.smarttablayout.utils.ViewPagerItem;
import com.ogaclejapan.smarttablayout.utils.ViewPagerItemAdapter;
import com.ogaclejapan.smarttablayout.utils.ViewPagerItems;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
@ogaclejapan
ogaclejapan / build.gradle
Created July 7, 2013 10:33
build.gradle template for Android Gradle Plugin 0.4.2
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4.2'
}
}
@ogaclejapan
ogaclejapan / ManagedExecutor.java
Last active December 12, 2015 09:09
同一IDタスクのキャンセル機能をExecutorに加えた、Android用のExecutorServiceライクな簡易スレッド管理クラスです。
package com.ogaclejapan;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
/**
* 送信された Runnable タスクを実行するオブジェクトです。
* <p>id毎にタスクを管理しているため、同一idのタスクがまだ動作中の場合は実行をキャンセルしてくれます</p>
*/
@ogaclejapan
ogaclejapan / build.gradle
Created January 12, 2013 13:56
It is the build tool to install the apk from WebDAV. adb shell set tool/forMac or tool/forWindows extracted from the AndroidSDK.
buildscript {
repositories {
mavenCentral()
maven {
url 'http://sardine.googlecode.com/svn/maven/'
}
}
dependencies {
classpath 'com.googlecode.sardine:sardine:314'
}