package com.example.l008_basic_layout_withpadding;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
public class Main extends Activity {
Context c;
FrameLayout frame;
LinearLayout linear;
Called when the activity is first created.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
c = getApplicationContext();
frame = new FrameLayout(c);
setContentView(frame);
frame.setPadding(100, 100, 100, 100);
linear = new LinearLayout(c);
frame.addView(linear);
TextView tv = new TextView(c);
tv.setText("hoge---");
linear.addView(tv);
frame.setBackgroundColor(Color.GRAY);
linear.setBackgroundColor(Color.LTGRAY);
tv.setTextColor(Color.WHITE);
tv.setTextSize(30.0f);
}
}