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 | |
android:name="CustomActionBarTestActivity" | |
android:label="@string/title_activity_custom_actionbar" | |
android:theme="@style/Theme.Custom" /> | |
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 onCreate(Bundle savedInstanceState) { | |
Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler); | |
} | |
/** UncaughtExceptionHandler */ | |
private UncaughtExceptionHandler uncaughtExceptionHandler = new UncaughtExceptionHandler() { | |
private UncaughtExceptionHandler originalUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); | |
@Override |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="daichan4649.lockoverlay" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="17" /> |
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
class ProgressDialogFragment extends DialogFragment { | |
public static ProgressDialogFragment newInstance() { | |
return new ProgressDialogFragment(); | |
} | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setStyle(STYLE_NO_FRAME, android.R.style.Theme_Translucent); |
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
public class ProgressDialogFragment extends DialogFragmentBase { | |
public static ProgressDialogFragment newInstance() { | |
ProgressDialogFragment fragment = new ProgressDialogFragment(); | |
// キャンセル無効(これやると、BACKキー自体無効になる) | |
// fragment.setCancelable(true); | |
return fragment; | |
} |
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 daichan4649.test; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.Checkable; | |
import android.widget.LinearLayout; | |
public class CheckableLayout extends LinearLayout implements Checkable { |
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 daichan4649.test; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.Checkable; | |
import android.widget.LinearLayout; | |
public class CheckableLayout extends LinearLayout implements Checkable { |
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
// ExpandableListView 長押し時処理実装方法 | |
// イベント発生順番 | |
// (1) OnItemLongClickListener#onItemLongClick | |
// (2) OnCreateContextMenuListener#onCreateContextMenu | |
expandableListView.setOnItemLongClickListener(new OnItemLongClickListener() { | |
@Override | |
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { | |
// 選択要素位置 | |
int groupPosition = ExpandableListView.getPackedPositionGroup(id); |
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
public class ContactListFragment extends ListFragment { | |
public static ContactListFragment newInstance() { | |
return new ContactListFragment(); | |
} | |
private ArrayAdapter<ContactData> adapter; | |
private DataAccessor accessor; | |
@Override |
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
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" > | |
</LinearLayout> |