答案 0 :(得分:1)
您可以覆盖private class MyPagerAdapter extends PagerAdapter {
@Override
public int getCount() {
return numCap;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
LayoutInflater inflater = (LayoutInflater) container.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
final ListView list = (ListView) inflater.inflate(R.layout.capitulo, null);
//set the chapter you left off at, in case you change orientation
s.setCap(position);
//Load content
listll(position);
//Display it
list.setAdapter(new CapituloAdapter(getApplicationContext(), R.layout.content_main, ll));
((ViewPager) container).addView(list, 0);
//Only shows when position is any item from the first to the next to last, doesn't show for last item
Log.v(TAG, "Finished my pager adapter object" + (position-1));
return list;
}
//more code here...
的{{1}},textRectForBounds(_:)
和placeholderRectForBounds(_:)
方法来自定义文字位置,并与设置为editingRectForBounds(_:)
的{{1}}结合使用
假设您希望文本有10个点填充:
UITextField