Skip to content

Instantly share code, notes, and snippets.

@daichan4649
daichan4649 / AndroidManifest.xml
Last active December 21, 2015 12:19
物理メニューキーがある端末でも、ActionBar の overflowメニュー を強制的に表示する (for Android)
<application
android:name="daichan4649.actionbartest.TestApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="daichan4649.actionbartest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@nobuoka
nobuoka / java-for-android-app.markdown
Last active May 19, 2024 09:11
Android アプリ開発勉強会のために書いた Java の入門文書

Android アプリ開発のための Java 入門

MEMO

  • declaration は 「宣言」 と訳しているが、「定義」 の方が適しているような気がしなくもない。
  • 「インスタンス」 と 「オブジェクト」 という言葉を使うことがあるが、本文書中ではどちらも同じ意味で使用している。
  • String オブジェクト」 という表現は、「String クラスのインスタンス」 を意味している。 (Java に限らず一般的な表現だと思う。)

はじめに

@yyaammaa
yyaammaa / gist:7480613
Last active June 30, 2017 02:50
Butter Knifeの紹介

Butter Knifeの紹介

Android用のView Injectionライブラリである Butter Knife について解説します (といいますか、サイトに書いてあることをほとんどそのまま日本語にしただけです) 。

概要

Butter Knifeは ActionBarSherlock などでお馴染みの Square のJake WhartonさんによるAndroid用のView Injectionライブラリです。

使い方

このライブラリの目的が、

  • Activity, ViewのfindViewByIdを楽に書く
@cyrilmottier
cyrilmottier / ResourcesAdditions.java
Last active January 12, 2024 17:55
Lightweight key-value pairs resources for Android applications.
package com.cyrilmottier.android.resourcesadditions;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* @author Cyril Mottier
@wshaddix
wshaddix / gist:8797934
Created February 4, 2014 03:57
Gets the week number for a given date
main () {
// get today's date
var now = new DateTime.now();
// set it to feb 10th for testing
//now = now.add(new Duration(days:7));
int today = now.weekday;
@zaki50
zaki50 / FloatingActionButton.java
Last active August 29, 2015 14:03
Material Design の FloatingActionButton のためのクラスを作ってみた
/*
* Copyright (C) 2014 uPhyca 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
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@zaki50
zaki50 / studio.vmoptions
Created December 9, 2014 13:05
今使ってる ~/Library/Preferences/AndroidStudio/studio.vmoptions
-Xms2048m
-Xmx2048m
-XX:MaxPermSize=768m
-XX:ReservedCodeCacheSize=256m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
package net.yanzm.profileapplication;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
package net.yanzm.profileapplication;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.FragmentManager;
import android.content.Intent;
import android.net.Uri;