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
private void test() { | |
final LockTest test = new LockTest(); | |
new Thread(new Runnable() { | |
@Override | |
public void run() { | |
test.lockTest(); | |
// test.readLockTest(); | |
// test.writeLockTest(); | |
} |
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 xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<solid | |
android:color="@android:color/holo_orange_light"/> | |
<stroke | |
android:width="8dip" | |
android:color="#64ff0000" /> | |
</shape> |
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 PdfUtil { | |
public enum PdfType { | |
SAMPLE("sample.pdf"); | |
private static final String TMP_DIR_ROOT = "/mnt/sdcard/"; | |
private String fileName; | |
private PdfType(String fileName) { |
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
<activity | |
android:name=".MainActivity" | |
android:label="@string/app_name" | |
android:screenOrientation="sensorLandscape" | |
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" > | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> |
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
private void initTabLayout() { | |
// タブバー表示設定 | |
View container = findViewById([resourceId]); | |
tabHost = (TabHost) container.findViewById(R.id.tabhost); | |
tabHost.setup(); | |
for (TabType tabType : TabType.values()) { | |
tabHost.addTab(createTabSpec(tabHost, tabType)); | |
} | |
// 初期表示タブ |
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
<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> |
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 ContactListFragment extends ListFragment { | |
public static ContactListFragment newInstance() { | |
return new ContactListFragment(); | |
} | |
private ArrayAdapter<ContactData> adapter; | |
private DataAccessor accessor; | |
@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
// 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 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 { |