Search in sources :

Example 1 with TitleBarActivity

use of org.kymjs.blog.ui.TitleBarActivity in project KJFrameForAndroid by kymjs.

the class AboutFragment method initWidget.

@Override
protected void initWidget(View parentView) {
    super.initWidget(parentView);
    rootView.setOnViewTopPullListener(new OnViewTopPull() {

        @Override
        public void onPull() {
            if (outsideAty instanceof TitleBarActivity) {
                outsideAty.getCurtainView().expand();
            }
        }
    });
}
Also used : TitleBarActivity(org.kymjs.blog.ui.TitleBarActivity) OnViewTopPull(org.kymjs.blog.ui.widget.KJScrollView.OnViewTopPull)

Example 2 with TitleBarActivity

use of org.kymjs.blog.ui.TitleBarActivity in project KJFrameForAndroid by kymjs.

the class FindFragment method initWidget.

@Override
protected void initWidget(View parentView) {
    super.initWidget(parentView);
    LayoutParams params = (LayoutParams) mImgZone.getLayoutParams();
    int h = params.height = (int) (AppContext.screenH * 0.3);
    params.width = AppContext.screenW;
    mImgZone.setLayoutParams(params);
    kjb.displayLoadAndErrorBitmap(mImgZone, "http://www.kymjs.com/app/user_center_bg" + StringUtils.getDataTime("MMdd") + ".png", R.drawable.user_center_bg, R.drawable.user_center_bg);
    int space65 = (int) getResources().getDimension(R.dimen.space_65);
    LayoutParams headParams = (LayoutParams) mImgHead.getLayoutParams();
    headParams.topMargin = (h - space65) / 2 - 20;
    mImgHead.setLayoutParams(headParams);
    LayoutParams nameParams = (LayoutParams) mTvName.getLayoutParams();
    // 在头像底部间距半个头像的大小
    nameParams.topMargin = (h + space65) / 2;
    mTvName.setLayoutParams(nameParams);
    rootView.setOnViewTopPullListener(new OnViewTopPull() {

        @Override
        public void onPull() {
            if (outsideAty instanceof TitleBarActivity) {
                outsideAty.getCurtainView().expand();
            }
        }
    });
}
Also used : LayoutParams(android.widget.RelativeLayout.LayoutParams) TitleBarActivity(org.kymjs.blog.ui.TitleBarActivity) OnViewTopPull(org.kymjs.blog.ui.widget.KJScrollView.OnViewTopPull)

Aggregations

TitleBarActivity (org.kymjs.blog.ui.TitleBarActivity)2 OnViewTopPull (org.kymjs.blog.ui.widget.KJScrollView.OnViewTopPull)2 LayoutParams (android.widget.RelativeLayout.LayoutParams)1