https://svn.codespot.com/a/eclipselabs.org/mobile-web-development-with-phonegap/tags/r1.2.5/download
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,org.mozilla.javascript,1.7.2.v201005080400.
MD5 hash is not as expected. Expected: 8785860e8f2a2a43fe10dd8b9eb334b6 and found 7ab8a5d6da46b081c83bfc81e7c880e6.
@Override]]>
protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec)
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
}
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 通常 -->
<item
android:state_enabled="true"
android:state_window_focused="false"
android:drawable="@drawable/button_background_normal" />
<!-- 無効 -->
<item
android:state_enabled="false"
android:state_window_focused="false"
android:drawable="@drawable/button_background_disable" />
<!-- 押下 -->
<item
android:state_pressed="true"
android:drawable="@drawable/button_background_pressed" />
<!-- フォーカス -->
<item
android:state_focused="true"
android:state_enabled="true"
android:drawable="@drawable/button_background_focused" />
<!-- 通常 -->
<item
android:state_enabled="true"
android:drawable="@drawable/button_background_normal" />
<!-- 無効、フォーカス -->
<item
android:state_focused="true"
android:drawable="@drawable/button_background_disable_focused" />
</selector>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
... />
private static final int REQUEST_DISCOVERABLE = 1;]]>
private static final int DURATION = 300; // 持続期間
Intent discoverableIntent =
new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, DURATION);
startActivityForResult(discoverableIntent,REQUEST_DISCOVERABLE);
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
switch (requestCode)
{
case REQUEST_DISCOVERABLE:
//成功時のresultCodeは「Activity.RESULT_OK」ではなく、持続期間の秒数になる。
//拒否された場合は0になる。
if (resultCode==DURATION)
{
// result ok ...
}
else
{
// result cancel ....
}
break;
default :
break;
}
}
// paternA
Cursor curA = getCursor();
int a = 0;
for(int i=0; i<curA.getCount();i++)
{
curA.moveToPosition(i);
a++;
}
if(curA!=null) curA.close();
// paternB
Cursor curB = getCursor();
int b = 0;
// curB.moveToNext(); // ←あってもなくても一緒みたい
while(curB.moveToNext())
{
b++;
}
if(curB!=null) curB.close();
<activity android:name=".ActivityA">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ActivityB">
</activity>
<activity android:name=".ActivityA">
</activity>
<activity android:name=".ActivityB">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>