android LinearLayout java단에서 만들기
---- SampleLayoutCodeActivity.java package com.example.administrator.myapplication_view; import android.app.Activity; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Button; import android.widget.LinearLayout; public class SampleLayoutCodeActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout mainLayout = new LinearLayout(this); mainLayout.setOrientation(LinearLayout.VERTICAL); // new 연산자로 LinearLayout을 만들고 방향 설정 Button button01 = new Button(this); // Button 생성 button01.setText("Button 01"); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); // n...