액티비티 1에서 버튼을누르면 액티비티 2 로넘어갑니다.
1에서 버튼을 누르면 액티비티 2가 실행되면서 배경색이 파랑으로 변하게됩니다.
만약 제가 지금 빨강이 되게하고싶으면
소스에서 배경색 BLUE를 지우고 RED로 하는방법밖에 없는데요.
어플 실행후에 액티비티 1에서 색을 조정하여 액비티티2로 넘어갔을때 조정한 색깔이 나오게 할려면 어떻게해야되나요
argb(255,255,255,255) 알파값,R,G,B 값을 액티비티 1에서 사용자가 선택하게하고 실행하였을때
액티비티2에서 선택한 투명도값 R,G,B 값이 나오게 하려면 어떻게해야하나요?
즉. 액티비티 1에서 사용자가 데이터를 입력하게하려면 (카지노에있는 머신처럼 숫자를 위아래로 돌아가게하는 아이콘)
혹은 TEXT로 숫자를 입력받게 하려면 어떻게해야하고
그 입력받은 숫자를 액티비티 2 에 어떻게 넘기고
넘겼다하면은 액티비티2에서는 argb(alpha,red,green,blue) 등 변수로 받을수가 있는지요?
package com.example.act_test;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Menu;
import android.view.Window;
import android.view.WindowManager;
public class MainActivity2 extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().getDecorView().setBackgroundColor(Color.argb(255,0,255,255));
setContentView(R.layout.main2);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
package com.example.act_test;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
Button b=(Button)findViewById(R.id.Button01);
b.setOnClickListener(new OnClickListener() {
public void onClick(View V){
Intent intent =new Intent(getApplicationContext(),MainActivity2.class);
startActivity(intent);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}