Android - 改变ParseQueryAdapter分页按钮的设计

时间:2015-07-16 04:01:00

标签: android parse-platform

Parse提供了一个ParseQueryAdapter,默认情况下它具有内置的分页功能。

var view = new SomeView();
// the region name will be a part of a unique id
var layout = new Layout({ regionName: 'myRegion' });
// add a dynamic region to the layout and a view to that region
layout.append(view);
// same as above (you have to name the id and class yourself)
var regionId = 'myRegionId';
layout.appendEmpty(regionId, 'someClassName', 'span');
layout.getRegion(regionId).show(view);
// remove a region
layout.customRemove(regionId);

默认情况下,分页设计如下所示:

enter image description here

我想知道如何在Android上为此创建自己的自定义设计?

1 个答案:

答案 0 :(得分:1)

鉴于他们对文档的评价,您必须覆盖该方法:

@Override
public View getNextPageView(View v, ViewGroup parent) {
    if (v == null) {
        // R.layout.adapter_next_page contains an ImageView with a custom graphic
        // and a TextView.
        v = View.inflate(getContext(), R.layout.adapter_next_page, null);
    }

    TextView textView = (TextView) v.findViewById(R.id.nextPageTextViewId);
    textView.setText("Loaded " + getCount() + " rows. Get more!");
    return v;
}