我有一堂课
@Override
protected void onCreate(Bundle savedInstanceState) {
...
myList.add("a");
myList.add("b");
recyclerView.setAdapter(adapter);
myList.add("c"); // the recyclerView is updating and shows "c" here! why???
findViewById(R.id.fab).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myList.add("e"); // the recyclerView will NOT update here unless you call `notifyDataSetChanged`
}
});
...
我正在尝试找到一个保护规则,以免混淆Condition类。
我尝试了以下几种变化:
public class Cars {
@IntDef(flag = true, value = {Condition.NEW, Condition.USED})
@interface Condition {
int NEW = 0, int USED = 1
}
}
但在编译时仍会收到错误:
-keep @interface com.vungle.warren.downloader.DownloadRequest.Status
对于此方案适用的保护规则是否有任何想法?