我内部有一个滚动视图和一个文本视图,我想知道它是不在窗口内还是还在窗口内。
scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
L.e(" isShown " + textView.isShown());
}
});
谢谢。
答案 0 :(得分:2)
使用以下代码。对我来说很完美
namespace RenderAPI
{
// Put all rendering related functions here
}
namespace PersistenceAPI
{
// Put all read from disk and write to disk functions here.
}
namespace MySuperCoolBusinessLogicAPI
{
// Put all the functions dealing with your super cool business logic here.
}