开发者

Make a widget show up has a normal App

How t开发者_开发技巧o make a widget show up has a normal App?


The way I did it was to make a really basic activity with a layout with basically just text telling them how to properly add the widget

 public class Jump extends Activity{
        @Override
        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
        }

And then put this in your manifest:

<activity android:name=".Jump" android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
     </activity>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜