EVENT @Click :点击事件,只能有0个或1个参数,且参数为View @Click(R.id.myButton) void myButtonWasClicked() { [...] } @Click void anotherButton() { [...] } @Click void yetAnotherButton(View clickedView) { [...] } @LongClick @Touch AdapterViewEvents @ItemClick 必须有一个参数,如果这…
Save Instance State:程序保留Activity的实例状态 , 在onSaveInstanceState(Bundle)被系统调用的时候自动保存 , onCreate(Bundle)被系统调用会重新修复. @EActivity public class MyActivity extends Activity { @InstanceState int someId; @InstanceState MySerializableBean bean; } 设置没有Title: @NoTi…
注入res文件夹的资源: @StringRes @EActivity public class MyActivity extends Activity { @StringRes(R.string.hello) String myHelloString; @StringRes String hello; } @ColorRes @EActivity public class MyActivity extends Activity { @ColorRes(R.color.backgroundColo…
代替繁琐的finViewById @EActivity public class MyActivity extends Activity { // Injects R.id.myEditText @ViewById EditText myEditText; @ViewById(R.id.myTextView) TextView textView; } 指定需要在视图加载完成后才能执行的方法@AfterViews @EActivity(R.layout.main) public class MyA…
线程使用: @Background这个是使用了cached thread pool executor , 阻止开启过多的线程 可以为@Background指定一个id,用于随时终止线程的操作(BackgroundExecutor.cancelAll()) void myMethod() { someCancellableBackground("hello", 42); [...] boolean mayInterruptIfRunning = true; BackgroundExecu…
Fragment: @EActivity(R.layout.fragments) public class MyFragmentActivity extends FragmentActivity { @FragmentById MyFragment myFragment; @FragmentById(R.id.myFragment) MyFragment myFragment2; @FragmentByTag MyFragment myFragmentTag; @FragmentByTag("m…
1. 设置Activity的布局 @EActivity(R.layout.main) public class MyActivity extends Activity {} 注: 此时在AndroidManifest.xml 注册Activity需要: <activity android:name="MyActivity_" /> 2. 设置及使用Application设置:在AndroidManifest.xml也需要配置<application android:n…
接着第一篇总结 系列第一篇地址:AVFoundation 框架初探究(一) 在第一篇的文章中,我们总结了主要有下面几个点的知识: 1.对AVFoundation框架整体的一个认识 2.AVSpeechSynthesizer这个文字转音频类 3.AVAudioPlayer音频播放类 4.AVAudioRecorder音频录制类 5.AVAudioSession音频会话处理类 上面第一篇说的内容,大致都是关于上面总结的,接着说说我们这第二篇总结什么?其实刚开始的时候,我是想按照<AVFoundati…
使用框架版本 dubbo-2.5.3 spring-4.2.1.RELEASE jdk-1.8 tomcat-8.0 zookeeper-3.3.6 Dubbo与Zookeeper.SpringMVC整合使用 第一步:在Linux上安装Zookeeper (1)下载Zookeeper-3.4.6.tar.gz  地址http://www.apache.org/dist/zookeeper/ (2) 我们放到Linux下的一个文件夹,然后解压: (3)然后在对应的zookeeper-3.4.6/c…
话不多说,先把报错贴出来: 刚开始用slim框架,在设置完自动加载文件和路由文件之后,我写了一个控制器: <?php use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; use \interop\Container\ContainerInterface; class HomeController { protected $app;…