Attempt to invoke virtual method 'void android.support.v4.view.ViewPager.setAdapter(android.support.v4.view.PagerAdapter)
2017-10-02
android studio下是在main目录下新建assets文件夹,然后用webView.loadUrl("file:///android_asset/hello.html");就可以了
2017-09-24
通过函数准备有顺序的数据源:
private int[] res = new int[12]
private void setImage(){
for (int i = 0; i < 12 ; i++) {
res[i] = this.getResources().getIdentifier("item"+(i+1),"drawable","com.ishow360.listviewdemo");
Log.i(TAG, "setImage: res[i] = "+res[i]);
}
}
private int[] res = new int[12]
private void setImage(){
for (int i = 0; i < 12 ; i++) {
res[i] = this.getResources().getIdentifier("item"+(i+1),"drawable","com.ishow360.listviewdemo");
Log.i(TAG, "setImage: res[i] = "+res[i]);
}
}
2017-09-19