就是点击一下程序的图标,执行一些代码,并不显示任何界面。
那么怎么实现这种需求呢,代码入口在哪儿?
那么怎么实现这种需求呢,代码入口在哪儿?
解决方案 »
- Surfaceview lockCanvas 锁特定rect的问题
- AudioRecoder录音时,如何获取音频流某时刻的音量大小
- 怎么获取控件的值?
- 有关ANDROID加电后启动顺序的若干疑问
- 请教,关于ListView的问题
- Android系统编译出错build/core/base_rules.mk:121
- 如果文件不存在,使用chmod会出现错误吗
- Permission Denial: getTasks()
- Android平板UI的复杂布局怎么做?例如这个zaker HD的
- couldn't load memtrack module (No such file or directory)
- ArrayAdapter的问题,我传进来一个20位的数组 但是显示出来就是40位 很邪门 内有代码 显示的是传进来数组位数的2倍
- android正式发布产品的步骤
首先你 新建项目的时候不要选Create Activity 然后用广播获取 系统启动广播 在开启 Service
不过点击图标这个倒是没想过
我给你写个简单的布局文件
AndroidManifest.xml中注意添加activity的风格。。 <activity android:name=".activity.MoraGameRequestActivity" android:theme="@android:style/Theme.Dialog" />
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="#888888"
> <TextView android:id="@+id/textview1"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:gravity="center"
android:text="提示" />
<TextView android:id="@+id/textview2"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:layout_below="@+id/textview1"
android:gravity="center"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@+id/textview2"
android:weightSum="2"
android:gravity="center">
<Button
android:id="@+id/gamebutton1"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="确定"
android:gravity="center"/>
<Button
android:id="@+id/gamebutton2"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="取消"
android:gravity="center"/>
</LinearLayout>
</RelativeLayout>
发我研究下。