【安卓笔记】view.getX和view.getTranslationX区别
http://www.68idc.cn/help/buildlang/ask/20150104156778.html
Scrollto 的真正意思
This is called in response to an internal scroll in this view
(i.e., the view scrolled its own contents).
pendintent
flag定义:FLAG_NO_CREATE,基本不使用;FLAG_ONE_SHOT,以第一个为准,后续的会全部和第一条保持一致,任意一条被触发,其他的都cancel;FLAG_CANCEL_CURRENT,前面的相同的PendingIntent都会被cancel,只有最新的可用;FLAG_UDPATE_CURRENT,前面的PendingIntent都会被更新(它们Intent中的extras都会被更新)
private ServiceConnection mService =new ServiceConnection()
{
@Override
public void onServiceDisconnected(ComponentName name) {
// TODO Auto-generated method stub
mAidl=null;
Toast.makeText(MainActivity.this, "mAidl=null;"+"",
0).show();
}
@Override
public void onServiceConnected(ComponentName name, IBinder
service) {
// TODO Auto-generated method stub
mAidl=IcallAIDL.Stub.asInterface(service);
}
};
Intent i=new Intent(MainActivity.this,CallService.class);
i.setAction("com.example.aidl");
i.setPackage("com.example.aidl.CallService");
bindService(i, mService, Context.BIND_AUTO_CREATE);
Toast.makeText(MainActivity.this, "binserver"+"", 0).show();
int add = mAidl.add(12, 12);
Toast.makeText(MainActivity.this, add+"", 0).show();
private final IcallAIDL.Stub mStub=new Stub() {
@Override
public int min(int x, int y) throws RemoteException {
// TODO Auto-generated method stub
return x*y;
}
@Override
public int add(int x, int y) throws RemoteException {
// TODO Auto-generated method stub
return x+y;
}
};
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
Log.e(TAG, "onBind");
return mStub;
}