Skip to content

Instantly share code, notes, and snippets.

View konifar's full-sized avatar
💭
💯

Yusuke Konishi konifar

💭
💯
View GitHub Profile
@konifar
konifar / build.gradle
Last active August 29, 2015 14:10
Androidでメソッド数が65536を超えた時の対処方法 ref: http://qiita.com/konifar/items/d98c78facbaae63badca
apply from: 'strip_play_services.gradle'
@konifar
konifar / gradle.properties
Last active August 29, 2015 14:10
Android Studioのgradleビルドを高速化する ref: http://qiita.com/konifar/items/d0392b6428a47262ab0b
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
# TODO: disable daemon on CI, since builds should be clean and reliable on servers
org.gradle.daemon=true
@konifar
konifar / build.gradle
Created December 4, 2014 07:40
AndroidStudioでローカルの別プロジェクトをインポートする ref: http://qiita.com/konifar/items/c9f66482ebdca404f8fa
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libraries:pulltorefresh')
}
@konifar
konifar / build.gradle
Last active August 29, 2015 14:10
EclipseからAndroid Studioのせかえ時のgradle対応でハマったエラーまとめ ref: http://qiita.com/konifar/items/dbbbfd94ad103239c627
android {
dexOptions {
jumboMode true
}
}
@konifar
konifar / file0.txt
Created December 9, 2014 07:49
AndroidStudio完全アンインストールマニュアル ref: http://qiita.com/konifar/items/508e26dba72cab52cebd
$ rm -Rf /Applications/Android\ Studio.app
$ rm -Rf ~/Library/Application\ Support/AndroidStudio*
$ rm -Rf ~/Library/Logs/AndroidStudio*
$ rm -Rf ~/Library/Caches/AndroidStudio*
@konifar
konifar / build.gradle
Last active August 29, 2015 14:11
EclipseからAndroidStudioへの移行手順まとめ ref: http://qiita.com/konifar/items/b86c6f2e0b0d9dc4269c
buildTypes {
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@konifar
konifar / gist:6809d1aae8cc79fb9523
Created February 28, 2016 15:05
Android localization CFP for English
# 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 (https://play.google.com/store/apps/details?id=com.taptrip), 17 languages supports. And I developed DroidKaigi 2016 (The biggest Android conference in Tokyo) app (https://github.com/konifar/droidkaigi2016). 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
konifar / droidkaigi2017_sessions_ja.json
Created January 14, 2017 16:23
DroidKaig2017 sessions json sample
[
{
"id": 1,
"title": "ウェルカムトーク",
"description": "",
"speaker": {
"id": 1,
"name": "mhidaka",
"image_url": "",
"twitter_name": "",
@konifar
konifar / upload_sessions_to_firebase_database.dart
Created June 6, 2017 14:15
upload_sessions_to_firebase_database.dart
import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
main() async {
var response = await http.read(
'https://raw.githubusercontent.com/konifar/droidkaigi2016/master/app/src/main/res/raw/sessions_ja.json');
var json = {'ja': JSON.decode(response)};
@konifar
konifar / Activity.java
Created November 15, 2017 07:52
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));
menuItem.setIcon(drawable);
}
}