Skip to content

Instantly share code, notes, and snippets.

ogaclejapan ogaclejapan

Block or report user

Report or block ogaclejapan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ogaclejapan
ogaclejapan / MainActivity.kt
Last active Sep 10, 2018
onStop() is not called on Nougat 7.0 - repeat next activity start and backpress several times
View MainActivity.kt
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 Apr 5, 2015
Sample to set the argument to the Fragment of SmartTabLayout
View MainActivity.java
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 Sep 27, 2016
Sample of SmartTabLayout Issue #2
View MainActivity.java
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 Jul 7, 2013
build.gradle template for Android Gradle Plugin 0.4.2
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4.2'
}
}
@ogaclejapan
ogaclejapan / ManagedExecutor.java
Last active Dec 12, 2015
同一IDタスクのキャンセル機能をExecutorに加えた、Android用のExecutorServiceライクな簡易スレッド管理クラスです。
View ManagedExecutor.java
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 Jan 12, 2013
It is the build tool to install the apk from WebDAV. adb shell set tool/forMac or tool/forWindows extracted from the AndroidSDK.
View build.gradle
buildscript {
repositories {
mavenCentral()
maven {
url 'http://sardine.googlecode.com/svn/maven/'
}
}
dependencies {
classpath 'com.googlecode.sardine:sardine:314'
}
You can’t perform that action at this time.