Android開発者ブログ
http://android-developers.blogspot.jp/
自分で作ったり提供したりするものは、まず自分自身で使ってみろろということです。自分じゃ使わないものなら人はいくらでも無責任にも無思考にもなれる。そういう投げやりな「サービス」やら「プロダクツ」なんて、だれだってイヤだ。自分が作り手と同時に利用者の立場になれば、ちゃんと使えるレベルのものを提供しようとします。
2012年10月16日火曜日
2012年4月26日木曜日
AndroidとiOS開発ID登録
Android ID
https://play.google.com/apps/publish
Apple ID
https://developer.apple.com/jp/programs/iOS/
これからスマートフォン開発を本格にやり始める。
https://play.google.com/apps/publish
Apple ID
https://developer.apple.com/jp/programs/iOS/
これからスマートフォン開発を本格にやり始める。
2012年4月13日金曜日
スマートフォン開発フレームワーク検討中
2012年4月7日土曜日
Android ImageMenu
Androidアプリで【HOME】ボタン処理をオーバーロードし、カスタマイズメニューを出します。
res/layout/custommenu.xml
res/layout/custommenu.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageButton
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/app_name"
android:src="@android:drawable/ic_menu_send" />
<ImageButton
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/app_name"
android:src="@android:drawable/ic_menu_save" />
<ImageButton
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/app_name"
android:src="@android:drawable/ic_menu_search" />
<ImageButton
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/app_name"
android:src="@android:drawable/ic_menu_preferences" />
</LinearLayout>
Android AlertDialog
AlertDialogでコンテキストメニューを表示する
Activity
Activity
package com.sqlendia.android;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Android2_21Activity extends Activity
{
AlertDialog actions;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setTitle("アラーとダイヤログ");
Button button = new Button(this);
button.setText("選んでくださし");
button.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
actions.show();
}
});
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("オプション");
String[] optoins =
{ "オプション1", "オプション2", "オプション3" };
builder.setItems(optoins, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
switch (which)
{
case 0:
break;
case 1:
break;
case 2:
break;
default:
break;
}
}
});
builder.setNegativeButton("Cancel", null);
actions = builder.create();
setContentView(button);
}
}
Android コンテキストメニュー
Androidメニューリソースを利用してコンテキストメニューを表示する。
res/menu/contextmenu.xml
res/menu/contextmenu.xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/menu_delete"
android:title="Delete Item">
</item>
<item
android:id="@+id/menu_copy"
android:title="Copy Item">
</item>
<item
android:id="@+id/menu_edit"
android:title="Edit Item">
</item>
</menu>
2012年4月5日木曜日
Androidシステムキーコードを捉える
ユーザーがAndroid端末のHomeキーとか戻るキーとか押された場合、アプリはこのイベントを捉えて適当な処理をすることができるでしょう。
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
TextView txtContent = (TextView) findViewById(R.id.txtContent);
switch (keyCode)
{
case KeyEvent.KEYCODE_BACK:
case KeyEvent.KEYCODE_MENU:
case KeyEvent.KEYCODE_CALL:
txtContent.setText(String.valueOf(keyCode));
return true;
default:
return super.onKeyUp(keyCode, event);
}
}
Androidスクリーン表示方向設定
コーディングで端末スクリーン表示方向を変えるサンプルです。
public void btnTest_onclick(View v)
{
int current = getResources().getConfiguration().orientation;
if (current == Configuration.ORIENTATION_LANDSCAPE)
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
else
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
Android プログレスバー表示
Androidアプリのタイトルにプログレスバーを表示し、進捗を表すサンプルです。
プログレスバーの最大値は10000となります。
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_PROGRESS);
setContentView(R.layout.main);
setProgressBarVisibility(true);
setProgress(3000);
…
プログレスバーの最大値は10000となります。
2012年3月28日水曜日
Android WebViewサンプル
Androidアプリでただブラウザー機能を提供して、リンク先は最適化したウェブサイトの仕組みです。
main.xml
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
Android hostsファイル更新
adb root
adb remount
adb push XXXX /system/etc/hosts
adb push XXXX /etc/hosts
PS:
XXXXはローカルhostsファイルのパスです。
例:C:\hosts
adb remount
adb push XXXX /system/etc/hosts
adb push XXXX /etc/hosts
PS:
XXXXはローカルhostsファイルのパスです。
例:C:\hosts
2012年3月27日火曜日
Android基本入力フォーム
Android世界を挑戦し始めましたので、まずはAndroid基本入力フォームサンプルを作成する。
main.xml
main.xml
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1"
>
<TableRow>
<TextView android:text="Name:" />
<EditText android:id="@+id/name" />
</TableRow>
<TableRow>
<TextView android:text="Address:" />
<EditText android:id="@+id/addr" />
</TableRow>
<Button android:id="@+id/save"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Save"
/>
</TableLayout>
AndroidコマンドラインでHelloWorldを作成
プロジェクト作成
android create project --target "android-15" --path Skeleton/Koma --activity Koma --package com.sqlendia.android.skeleton
コンパイル
cd Skeleton/Koma
ant clean
ant debug
AVD起動
ant -Dadb.device.arg="-s emulator-5554" installd
アンインストール
ant -Dadb.device.arg="-s emulator-5554" uninstall
android create project --target "android-15" --path Skeleton/Koma --activity Koma --package com.sqlendia.android.skeleton
コンパイル
cd Skeleton/Koma
ant clean
ant debug
AVD起動
ant -Dadb.device.arg="-s emulator-5554" installd
アンインストール
ant -Dadb.device.arg="-s emulator-5554" uninstall
2010年10月4日月曜日
Android Marketの一つ【Camangi】
AndroidマーケットはGoogleだけではなく、いろんなメーカから提供されています、このトピックに自分の収集したAndroid Market情報を公開します。
Camangi
http://www.camangimarket.com/index_jp.html
Camangi
http://www.camangimarket.com/index_jp.html
Androidシステムを備えたタブレットはやってきた
先日ネットで注文したAndroid OSの中国製A81Eタブレットは先週土曜日に到着しました、日本製品のようにじっくり作られるものではないですけど、自分の望む機能はほとんどあるので、納得できる。

Androidシステムはどんなものかと知りたいため、このデバイスを注文した、自分でAndroidアプリを開発できるかなと思って、いろいろ調査して、この中国製A81Eを決めました、なんとiPhone 3Gと同じなCPU(A8)を使ってるので、操作性はよりよいと思いましたが、やっぱりiPhone 3Gのようにスムーズに動作できなかった。どこのせいか分からなくて、A81E本体の設計は悪いか、それとも、Androidシステムは遅いかは本当に分からないです。
驚いたところもあります。Androidアプリのインストールはすごく簡単です、ブラウザーから【apk】ファイルをminiSDカードにダウンロードして、Apk explorerで実行してすぐインストールできます、その便利性は予想外です。
Androidシステムは今まだ勉強中で、いろいろ使ってみて、今後もこの製品の使用レポートを報告します。

Androidシステムはどんなものかと知りたいため、このデバイスを注文した、自分でAndroidアプリを開発できるかなと思って、いろいろ調査して、この中国製A81Eを決めました、なんとiPhone 3Gと同じなCPU(A8)を使ってるので、操作性はよりよいと思いましたが、やっぱりiPhone 3Gのようにスムーズに動作できなかった。どこのせいか分からなくて、A81E本体の設計は悪いか、それとも、Androidシステムは遅いかは本当に分からないです。
驚いたところもあります。Androidアプリのインストールはすごく簡単です、ブラウザーから【apk】ファイルをminiSDカードにダウンロードして、Apk explorerで実行してすぐインストールできます、その便利性は予想外です。
Androidシステムは今まだ勉強中で、いろいろ使ってみて、今後もこの製品の使用レポートを報告します。
2010年9月30日木曜日
Android SDK
グーグルAndroid OSを採用したタブレットを予約しました、週末ごろに届けるかな
携帯、タブレット開発を進めるため、iOSやAndroidの開発便利性を調査するつもりで、Android製品を手にも入れたいです。
Android開発環境:
http://developer.android.com/sdk/index.html
Android開発入門参考:
http://itpro.nikkeibp.co.jp/article/COLUMN/20090708/333496/?ST=android-dev
携帯、タブレット開発を進めるため、iOSやAndroidの開発便利性を調査するつもりで、Android製品を手にも入れたいです。
Android開発環境:
http://developer.android.com/sdk/index.html
Android開発入門参考:
http://itpro.nikkeibp.co.jp/article/COLUMN/20090708/333496/?ST=android-dev
登録:
コメント (Atom)