This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Activityのビュー階層とコンテンツルート(View)を取得する | |
| View decor = this.getWindow().getDecorView(); | |
| ViewGroup contentRoot = (ViewGroup)this.findViewById(android.R.id.content); | |
| // 処理を委譲する | |
| public void Test(OnResult onResult) { | |
| OnResult.onResult(); | |
| } | |
| public interface OnResult { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Logger Class | |
| * | |
| * @author Shuhei Iwamoto | |
| */ | |
| public class Logged { | |
| /** | |
| * @param msg | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // transaction.replace(R.id.detailFragment, frag1); | |
| Transaction.remove(null).add or replace(frag1) // frag1 on view | |
| // transaction.replace(R.id.detailFragment, frag2).addToBackStack(null); | |
| Transaction.remove(frag1).add or replace(frag2).addToBackStack(null) // frag2 on view | |
| // transaction.replace(R.id.detailFragment, frag3); | |
| Transaction.remove(frag2).add or replace(frag3) // frag3 on view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void create() { | |
| // アプリケーションが生成される際に一度だけ呼ばれる | |
| } | |
| @Override | |
| public void resize(int i, int i2) { | |
| // ゲームがリサイズされる毎に、またゲームが中断状態でない場合に呼ばれます。またcreateイベント後にも自動的に呼ばれます。 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://qiita.com/KeithYokoma/items/3aed43474f63300eab21 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final ViewTreeObserver viewTreeObserver = mView.getViewTreeObserver(); | |
| viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { | |
| @Override | |
| public void onGlobalLayout() { | |
| final int width = mView.getWidth(); | |
| final int height = mView.getHeight(); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package jp.iwamoto.shuehei.libraryalertdialog.adapter; | |
| /** | |
| * YNAdapter | |
| * @author Iwamoto Shuhei | |
| * | |
| */ | |
| public class YNAdapter implements InterfaceYesNo { | |
| @Override |