Java Code Examples for android.widget.LinearLayout.setMinimumHeight()

The following are Jave code examples for showing how to use setMinimumHeight() of the android.widget.LinearLayout class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: puremadrid   File: FeedbackFragment.java   View Source Code Vote up 6 votes
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    // Set the text view as the activity layout
    View view =  inflater.inflate(R.layout.fragment_feedback, container, false);
    this.view = view;

    FloatingActionButton sendButton = view.findViewById(R.id.floating_button_send_feedback);
    sendButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            sendMessage();
        }
    });

    LinearLayout linearLayout = view.findViewById(R.id.linearlayout_desc);
    linearLayout.setMinimumHeight((int) (1.6*((double) view.getResources().getDimension(R.dimen.abc_action_bar_default_height_material))));

    return view;
}
 
Example 2
Project: RLibrary   File: T.java   View Source Code Vote up 5 votes
private static View createToastView(Context context) {
        RelativeLayout root = new RelativeLayout(context);
        root.setTag("root");
        if (isSupport()) {
            root.setBackgroundResource(context.getResources().getIdentifier("colorAccent", "color", context.getPackageName()));
        }
        //root.setBackgroundColor(Color.RED);
        WindowManager.LayoutParams rootParams = new WindowManager.LayoutParams(-1, -2);
        rootParams.gravity = Gravity.TOP;
        root.setLayoutParams(rootParams);

        LinearLayout layout = new LinearLayout(context);
        layout.setOrientation(LinearLayout.HORIZONTAL);
        if (isSupport()) {
            layout.setBackgroundResource(context.getResources().getIdentifier("colorAccent", "color", context.getPackageName()));
        }
//        layout.setBackgroundResource(android.R.color.holo_red_dark);
//        layout.setVerticalGravity(Gravity.VERTICAL_GRAVITY_MASK);
        final RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(-2, -2);
        params.addRule(RelativeLayout.CENTER_IN_PARENT);
        layout.setLayoutParams(params);
        layout.setMinimumHeight(getMinHeight(context));

        ImageView imageView = new ImageView(context);
        imageView.setTag("image");
        imageView.setVisibility(View.GONE);

        TextView textView = new TextView(context);
        textView.setTag("text");
        textView.setTextColor(Color.WHITE);

        final LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
        layoutParams.setMargins(getMinHeight(context, 10), 0, 0, 0);
        layoutParams.gravity = Gravity.CENTER_VERTICAL;

        layout.addView(imageView, layoutParams);
        layout.addView(textView, layoutParams);
        root.addView(layout);
        return root;
    }
 
Example 3
Project: cniao5   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 4
Project: yyox   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 5
Project: POCenter   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 6
Project: YiZhi   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 7
Project: topnews   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 8
Project: LiuAGeAndroid   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 9
Project: TextEmoji   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 10
Project: androidgithub   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 11
Project: LQRWeChat-master   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 12
Project: QuanMinTV   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 13
Project: Mobike   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 14
Project: LQRWeChat   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 15
Project: Mybilibili   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}
 
Example 16
Project: lqrwechatrongcloud   File: FriendAdapter.java   View Source Code Vote up 4 votes
public View getFooterView() {
	LinearLayout footerView = new LinearLayout(getContext());
	footerView.setMinimumHeight(10);
	return footerView;
}