AndroidSDKTemplate.diff
AndroidSDK.upt (kopia robocza) | ||
---|---|---|
1 | 1 |
template "Android SDK application (no U++)" main; |
2 | 2 | |
3 |
option "Permission - Internet" permissionInternet = 1; |
|
3 | 4 |
option "Text view" textView = 1; |
4 | 5 | |
5 | 6 |
@@<:PACKAGE:>.java |
... | ... | |
7 | 8 | |
8 | 9 |
import android.app.Activity; |
9 | 10 |
import android.os.Bundle;<:?textView:> |
11 |
import android.widget.ScrollView; |
|
10 | 12 |
import android.widget.TextView;<:.:> |
11 | 13 | |
12 | 14 |
public class <:PACKAGE:> extends Activity |
... | ... | |
16 | 18 |
{ |
17 | 19 |
super.onCreate(savedInstanceState); |
18 | 20 |
<:?textView:> |
21 |
ScrollView scrollView = new ScrollView(this); |
|
19 | 22 |
TextView textView = new TextView(this); |
23 |
|
|
20 | 24 |
textView.setText("Hello <:PACKAGE:>!\n"); |
21 | ||
22 |
setContentView(textView);<:.:> |
|
25 |
|
|
26 |
scrollView.addView(textView); |
|
27 |
setContentView(scrollView);<:.:> |
|
23 | 28 |
} |
24 | 29 |
} |
25 | 30 |
@@AndroidManifest.xml |
26 | 31 |
<?xml version="1.0" encoding="utf-8"?> |
27 | 32 |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" |
28 |
package="org.upp.<:PACKAGE:>"> |
|
33 |
package="org.upp.<:PACKAGE:>"><:?permissionInternet:> |
|
34 |
<uses-permission android:name="android.permission.INTERNET" /><:.:> |
|
29 | 35 |
<application> |
30 | 36 |
<activity android:name=".<:PACKAGE:>" |
31 | 37 |
android:label="<:PACKAGE:>"> |