TextView textView = new TextView(this); ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, 100); textView.setText("測試"); textView.setTextSize(24); suggestionContainerLinearLayout.addView(textView, layoutParams);