private
void
initPageView()
{
llPage =
new
LinearLayout(getContext());
llPage.setBackgroundColor(
0xff323232
);
llPage.setOrientation(LinearLayout.VERTICAL);
setLoadingUI();
llTitle =
new
TitleLayout(getContext());
llTitle.setBackgroundResource(R.drawable.title_back);
llTitle.getBtnBack().setOnClickListener(
this
);
llTitle.getTvTitle().setText(R.string.multi_share);
llTitle.getBtnRight().setVisibility(View.VISIBLE);
llTitle.getBtnRight().setText(R.string.share);
llTitle.getBtnRight().setOnClickListener(
this
);
llTitle.setLayoutParams(
new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
llPage.addView(llTitle);
FrameLayout flPage =
new
FrameLayout(getContext());
LinearLayout.LayoutParams lpFl =
new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
lpFl.weight =
1
;
flPage.setLayoutParams(lpFl);
llPage.addView(flPage);
LinearLayout llBody =
new
LinearLayout(getContext());
llBody.setOrientation(LinearLayout.VERTICAL);
FrameLayout.LayoutParams lpLl =
new
FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
lpLl.gravity = Gravity.LEFT | Gravity.TOP;
llBody.setLayoutParams(lpLl);
flPage.addView(llBody);
ivPin =
new
ImageView(getContext());
ivPin.setImageResource(R.drawable.pin);
int
dp_80 = cn.sharesdk.framework.utils.R.dipToPx(getContext(),
80
);
int
dp_36 = cn.sharesdk.framework.utils.R.dipToPx(getContext(),
36
);
FrameLayout.LayoutParams lpPin =
new
FrameLayout.LayoutParams(dp_80, dp_36);
lpPin.topMargin = cn.sharesdk.framework.utils.R.dipToPx(getContext(),
6
);
lpPin.gravity = Gravity.RIGHT | Gravity.TOP;
ivPin.setLayoutParams(lpPin);
flPage.addView(ivPin);
ImageView ivShadow =
new
ImageView(getContext());
ivShadow.setBackgroundResource(R.drawable.title_shadow);
ivShadow.setImageResource(R.drawable.title_shadow);
FrameLayout.LayoutParams lpSd =
new
FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
ivShadow.setLayoutParams(lpSd);
flPage.addView(ivShadow);
LinearLayout llInput =
new
LinearLayout(getContext());
llInput.setMinimumHeight(cn.sharesdk.framework.utils.R.dipToPx(getContext(),
150
));
llInput.setBackgroundResource(R.drawable.edittext_back);
LinearLayout.LayoutParams lpInput =
new
LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
int
dp_3 = cn.sharesdk.framework.utils.R.dipToPx(getContext(),
3
);
lpInput.setMargins(dp_3, dp_3, dp_3, dp_3);
lpInput.weight =
1
;
llInput.setLayoutParams(lpInput);
llBody.addView(llInput);
}