在Android中调用SurfaceViewExample等类
我在 Android SurfaceViewExample.java 中有一个类,我无法从我的设备调用它 滚动视图控件。我想知道如何从 androidManifest.xml 调用我的类 SurfaceViewExample.java
我将感谢大家的帮助。
我已附上我的 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.empressphalanx.thebasics"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialOne"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALONE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialTwo"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALTWO" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialThree"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALTHREE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialFour"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALFOUR" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".SurfaceViewExample"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.SURFACEVIEWEXAMPLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Sweet"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.SWEET" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
我还包括我的 menu.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:background="@drawable/empphx1"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="This is a whatsup" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="195dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/tutorial1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Radio Buttons"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="List View"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Wallpaper App"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Graphics View App"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Surface View Example"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 6"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 7"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 8"
android:textSize="25dp"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>
I have a class in Android SurfaceViewExample.java, I am having trouble calling it from my
scrollview control. I want to know how do I call my class SurfaceViewExample.java from the androidManifest.xml
I will appreciate everybodys help.
I have enclosed my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.empressphalanx.thebasics"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".menu"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialOne"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALONE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialTwo"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALTWO" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialThree"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALTHREE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TutorialFour"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.TUTORIALFOUR" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".SurfaceViewExample"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.SURFACEVIEWEXAMPLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Sweet"
android:label="@string/app_name"
android:theme="@android:style/Theme.Dialog" >
<intent-filter>
<action android:name="com.empressphalanx.thebasics.SWEET" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
I am also including my menu.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:background="@drawable/empphx1"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="This is a whatsup" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="195dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<Button
android:id="@+id/tutorial1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Radio Buttons"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="List View"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Wallpaper App"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial4"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Graphics View App"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Surface View Example"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial6"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 6"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial7"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 7"
android:textSize="25dp"
android:textStyle="bold" />
<Button
android:id="@+id/tutorial8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.00"
android:text="Button 8"
android:textSize="25dp"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
称之为
call this