// ショートカットインテントを作成
// Intent shortcutIntent=new Intent(Intent.ACTION_VIEW);
Intent shortcutIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:0123456789"));
//shortcutIntent.setClassName(this, MySampleActivity.class.getName());
// メッセージを設定
shortcutIntent.putExtra("MESSAGE","WE ARE TECHBOOSTER!!!");
// インテント送信
sendBroadcast(makeIntent("shortcut2", shortcutIntent));
10月 132011
10月 132011
dgvlist.AutoSizeMode=Fill
個別のカラムだけ
dgvlist.ColumnA.AutoSizeMod=Fill
10月 122011
1.eclipseを起動する。
2.メニュー[ウィンドウ]-[設定]をクリック。
3.[一般]-[外観]-[色とフォント]設定
・画面右のツリーから、[基本]-[テキスト・フォント]をクリック。
・画面右のツリーから、[構造化テキストエディタ]-[テキスト・フォント]をクリック。
・画面右のツリーから、[動的言語]-[ターミナル・フォント]をクリック。
——————————————————————————–
10月 082011
cd mkdir local/git wget <a href="http://kernel.org/pub/software/scm/git/git-1.7.0.tar.gz" target="_blank">http://kernel.org/pub/software/scm/git/git-1.7.0.tar.gz</a> ソースを $HOME/local/src/git-* に展開 cd $HOME/local/src/git-* ./configure --prefix=$HOME/local/git --with-python=/usr/local/bin/python gmake gmake install cd $HOME mkdir -m git/mygit.git cd git/mygit.git git --bare init --share cd $HOME/temp mkdir gitTest cd gitTest touch README git add README git commit -m "FIRST COMMIT" git push ssh://user@user.sakura.ne.jp/home/falco/git/mygit.git master
10月 052011
void setImageFileFromHttp( String strUrl ) {
URL url ;
try {
url = new URL( strUrl );
} catch (MalformedURLException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
return ;
}
InputStream input;
try {
input = url.openStream();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
return ;
}
Bitmap bitmap= BitmapFactory.decodeStream(input);
txtUrl.setText( strUrl );
// Androidだと、こんな感じでイメージのダウンロードが出来るのでした。
// 後は、ImageViewなら、そのままsetImageBitmapメソッドなどでイメージを設定できるはずです。
imgView.setImageBitmap(bitmap);
}
10月 052011
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jp.hotaka"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="4" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".ImageViewerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
-- この一行を追加
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
10月 042011
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v == btnFileOpen ) {
FileListDialog dialog = new FileListDialog(this);
dialog.setDirectorySelect(false);
dialog.setOnFileListDialogListener(new onFileListDialogListener() {
@Override
public void onClickFileList(File file) {
if(file == null){
//not select
}else{
//select file or directory
//TextView txtinput = (TextView) findViewById( R.id.input_text_id);
//txtinput.setText( file.getPath() );
readToFile( file.getPath() ) ;
}
}
});
dialog.show("/", "select");
}
}
10月 042011
コマンドプロンプトより
PC->Android
adb push sample.txt /sdcard/
Android->PC
adb pull /sdcard/sample.wav
10月 042011
public void readToFile( String fileName ) {
// String fileName = Environment.getExternalStorageDirectory()
// + "/sample.txt";
FileInputStream fis = null;
try {
TextView txtinput = (TextView) findViewById( R.id.input_text_id);
fis = new FileInputStream(fileName);
byte[] readBytes = new byte[fis.available()];
fis.read(readBytes);
String readString = new String(readBytes);
txtinput.setText( readString );
Log.v("readString", readString);
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}
9月 192011
DOSプロンプトより
adb shell
cd /data/data/パッケージ名/databases
ls
rm データベース名