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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.nein37.kanidaisuki" > | |
<uses-feature android:name="android.hardware.microphone" android:required="true" /> |
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" | |
tools:context=".MyActivity" |
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
/** | |
* Draw nothing. | |
* | |
* @param canvas an unused parameter. | |
*/ | |
@Override | |
public void draw(Canvas canvas) { | |
} |
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=".ChildActivity" | |
android:launchMode="singleTop" | |
android:parentActivityName=".ParentActivity"> | |
<meta-data | |
android:name="android.support.PARENT_ACTIVITY" | |
android:value=".ParentActivity" /> | |
</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
AtomicFile atomicFile = new AtomicFile(getFileStreamPath(FILENAME)); | |
FileOutputStream fos = null; | |
try { | |
// 書き込み開始 | |
fos = atomicFile.startWrite(); | |
fos.write(...); | |
// 書き込み成功 | |
atomicFile.finishWrite(fos); |
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 SlidingPanelFragment extends Fragment { | |
SlidingPaneLayout mSlidingPaneLayout; | |
public SlidingPanelFragment() { | |
} | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, |
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
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<receiver android:name=".MyBroadcastReceiver"> | |
... | |
</receiver> | |
<service android:name=".MyService" /> |
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
BroadcastReceiver receiver = new MyBroadcastReceiver(); | |
IntentFilter intentFilter = new IntentFilter(); | |
intentFilter.addAction(MY_ACTION); | |
// 優先度を高めに設定 | |
intentFilter.setPriority(100); | |
registerReceiver(receiver, intentFilter); |
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 PopupWindow mPopupWindow; | |
@Override | |
public void onClick(View v) { | |
mPopupWindow = new PopupWindow(MyActivity.this); | |
// レイアウト設定 | |
View popupView = getLayoutInflater().inflate(R.layout.popup_layout, 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
<menu xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
tools:context=".MyActivity"> | |
<item | |
android:id="@+id/action_share_always" | |
android:actionProviderClass="android.widget.ShareActionProvider" | |
android:showAsAction="always" | |
android:title="@string/action_share" /> | |
</menu> |