Git Product home page Git Product logo

issues's Issues

AndroidManifest.xml的一些资料整理

android:exported是Android中的四大组件 Activity,Service,Provider,Receiver 四大组件中都会有的一个属性。总体来说它的主要作用是:是否支持其它应用调用当前组件。 默认值:如果包含有intent-filter 默认值为true; 没有intent-filter默认值为false。(具体可参考:android:exported 属性详解

在Activity中该属性用来标示:当前Activity是否可以被另一个Application的组件启动:true允许被启动;false不允许被启动。如果被设置为了false,那么这个Activity将只会被当前Application或者拥有同样user ID的Application的组件调用。
在Service中该属性用来标示,其它应用的组件是否可以唤醒service或者和这个service进行交互:true可以,false不可以。如果为false,只有同一个应用的组件或者有着同样user ID的应用可以启动这个service或者绑定这个service。

ListView点击置顶

mRecommendList.setSelection(0);无滑动效果

mRecommendList.smoothScrollToPosition(0); 有滑动效果

打开一个新的Activity三种方法

Android中打开新的Activity的三种方法,:

// 第一种方法:
Intent intent1 = new Intent(IntentActivity.this,IntentSecond.class);

// 第二种方法:
Intent intent2 = new Intent();
intent2.setClass(IntentActivity.this, IntentSecond.class);

// 第三种方法:
Intent intent3 = new Intent();
intent3.setComponent(new ComponentName(IntentActivity.this,IntentSecond.class));
startActivity(intent1);

其他可参考:http://www.tuicool.com/articles/6B3iIj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.