This file contains 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
public class A { | |
public String hoge() { | |
return "hoge"; | |
} | |
} | |
public class B extends A { | |
This file contains 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 com.example.samplesqlcipher; | |
import net.sqlcipher.Cursor; | |
import net.sqlcipher.database.SQLiteDatabase; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.LoaderManager; | |
import android.support.v4.app.LoaderManager.LoaderCallbacks; | |
import android.support.v4.content.AsyncTaskLoader; |
This file contains 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 com.example.sampledialogfragment; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentManager; | |
import android.view.Menu; | |
public class MainActivity extends FragmentActivity { | |
@Override |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- 作った shape を元に clip を作る --> | |
<clip xmlns:android="http://schemas.android.com/apk/res/android" | |
android:clipOrientation="vertical" | |
android:drawable="@drawable/shape_oval_text_background" | |
android:gravity="bottom|clip_vertical" /> |
This file contains 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
public class SomeActivity extends Activity { | |
ArrayList<String> list_items; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains 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
public class ConfirmDialogFragment extends DialogFragment { | |
public interface OnButtonClickListener { | |
public void onPositiveClick(); | |
public void onNegativeClick(); | |
} | |
} |
This file contains 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
// ダイアログ出すとこは | |
// this.mLoadingDialog = LoadingDialog.newInstance("ちょっとまってねっ!"); | |
// っていう感じでメンバ変数に入れといてる。 | |
if (this.mLoadingDialog != null) { | |
this.mLoadingDialog.dismiss(); // ここでぬるぽ | |
} |
This file contains 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
// 色々端折ってますが | |
public class Hoge { | |
private static Hoge sInstance; | |
private static String sString; | |
// private String mString; // ? | |
public static Hoge getInstance(String s) { | |
if (sInstance == null) { |
This file contains 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
ViewPager viewPager = (ViewPager) this.findViewById(R.id.view_pager); | |
Resources resources = this.getResources(); | |
int viewPagerPageMargin = resources.getDimensionPixelSize(R.dimen.view_pager_page_margin); | |
viewPager.setPageMargin(viewPagerPageMargin); | |
viewPager.setPageMarginDrawable(R.drawable.shape_view_pager_divider); |
This file contains 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
// 基本は一緒 | |
// inJustDecodeBounds = true で読み込んで画像サイズを取得する | |
// options.outWidth, options.outHeight にサイズが入る | |
inputStreamForDecodeBounds = manager.open(FILE_NAME); | |
BitmapFactory.Options options = new BitmapFactory.Options(); | |
options.inJustDecodeBounds = true; | |
BitmapFactory.decodeStream(inputStreamForDecodeBounds, null, options); | |
int bitmapWidth = options.outWidth; | |
int bitmapHeight = options.outHeight; |
NewerOlder