Skip to content

Instantly share code, notes, and snippets.


Yusuke Konishi konifar

Block or report user

Report or block konifar

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
View skip_smart_lock.kt
fun skipSmartLock() {
val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
val noneButton = device.findObject(UiSelector().textMatches("(上記以外)|(NONE OF THE ABOVE)").className("android.widget.Button"))
if (noneButton.exists()) {
konifar /
Last active May 15, 2018
#!/bin/bash -xe
# Usage:
# ./ {github token} master
readonly GITHUB_TOKEN=${1}
readonly BASE_BRANCH=${2}
readonly ROOT_DIR=$PWD
readonly SRC_DIR="app/src"
readonly COMPARE_BRANCH="remove_unused_resources"
konifar /
Created Apr 20, 2018
# -*- coding: utf-8 -*-
import commands
import glob
import os
import xml.etree.ElementTree as ElementTree
class CommentedTreeBuilder(ElementTree.TreeBuilder):
def __init__(self, *args, **kwargs):
konifar /
Created Nov 15, 2017
Change menu item icon color
private void refreshMenuItem(@Nullable MenuItem menuItem) {
if (menuItem != null) {
Drawable drawable = ContextCompat.getDrawable(this, R.drawable.vec_ic_refresh_22);
drawable = DrawableCompat.wrap(drawable);
DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_ATOP);
DrawableCompat.setTint(drawable, ResourcesCompat.getColor(getResources(), R.color.grey600, null));
konifar / upload_sessions_to_firebase_database.dart
Created Jun 6, 2017
View upload_sessions_to_firebase_database.dart
import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
main() async {
var response = await
var json = {'ja': JSON.decode(response)};
konifar / droidkaigi2017_sessions_ja.json
Created Jan 14, 2017
DroidKaig2017 sessions json sample
View droidkaigi2017_sessions_ja.json
"id": 1,
"title": "ウェルカムトーク",
"description": "",
"speaker": {
"id": 1,
"name": "mhidaka",
"image_url": "",
"twitter_name": "",
konifar / gist:6809d1aae8cc79fb9523
Created Feb 28, 2016
Android localization CFP for English
View gist:6809d1aae8cc79fb9523
# Sammary
Many people think localization is diffecult. But actually it's just because they don't know what they have to do for localization. So I'm gonna talk about what and how we have to do for localization. For example, how to manage many strings.xml files, to implement plurals by languages, to apply Right-to-Left language.
If you will hear this talk, you become a localization master.
I'm developing Android app called Taptrip (, 17 languages supports. And I developed DroidKaigi 2016 (The biggest Android conference in Tokyo) app ( It supports Japanese, English, Arabic, Korean. So I gonna talk by using these app as sample code.
# Detail
- How to manage many strings.xml files
- How to implement plural strings, diffrent time format
- How to implement Right-to-Left language text
konifar / build.gradle
Last active Aug 29, 2015
EclipseからAndroidStudioへの移行手順まとめ ref:
View build.gradle
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), ''
konifar / file0.txt
Created Dec 9, 2014
AndroidStudio完全アンインストールマニュアル ref:
View file0.txt
$ rm -Rf /Applications/Android\
$ rm -Rf ~/Library/Application\ Support/AndroidStudio*
$ rm -Rf ~/Library/Logs/AndroidStudio*
$ rm -Rf ~/Library/Caches/AndroidStudio*
konifar / build.gradle
Last active Aug 29, 2015
EclipseからAndroid Studioのせかえ時のgradle対応でハマったエラーまとめ ref:
View build.gradle
android {
dexOptions {
jumboMode true
You can’t perform that action at this time.