Created
July 10, 2012 14:30
-
-
Save sakurabird/3083641 to your computer and use it in GitHub Desktop.
AndroidAnnotationsライブラリーを使ったHello World!
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
http://androidannotations.org/ | |
すっきりコードを書けるライブラリー | |
ダウンロードは | |
https://github.com/excilys/androidannotations/wiki/Download | |
jarをlibsフォルダにコピーしてビルドパスで参照する |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.yochiand.myexampleandroidannotations" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="3" /> | |
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" > | |
<activity | |
android:name=".MainActivity_" | |
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> | |
</manifest> |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:orientation="vertical" > | |
<TextView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:text="@string/hello" /> | |
</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
package com.yochiand.myexampleandroidannotations; | |
import com.googlecode.androidannotations.annotations.EActivity; | |
import com.googlecode.androidannotations.annotations.Fullscreen; | |
import com.googlecode.androidannotations.annotations.NoTitle; | |
import android.app.Activity; | |
@NoTitle | |
@Fullscreen | |
@EActivity(R.layout.main) | |
public class MainActivity extends 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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string name="hello">Hello World, MainActivity!</string> | |
<string name="app_name">MyExmpleAndroidAnnotations</string> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment