안드로이드 개발 질문/답변
(글 수 45,052)
현재 구현한 다이얼로그와 Style입니다.
public class MemoDialog extends Activity{
private ImageButton m_ok;
private ImageButton m_dismiss;
private EditText m_memo;
private String str_memo;
private MessageHelper m_msg=new MessageHelper();
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
setContentView(R.layout.dialog_memo);
m_memo = (EditText)findViewById(R.id.dialog_memo);
m_ok = (ImageButton)findViewById(R.id.itn_memo_ok);
m_dismiss = (ImageButton)findViewById(R.id.itn_memo_dismiss);
Intent getIntent=getIntent();
if(getIntent.getStringExtra("memo") != null)
m_memo.setText(getIntent.getStringExtra("memo"));
m_ok.setOnClickListener(new OnClickListener() {
public void onClick(View v){
Intent intent = new Intent();
str_memo=m_memo.getText().toString();
intent.putExtra("data_memo", str_memo);
intent.putExtra("Type",1);
intent.setAction("TableAdd");
sendBroadcast(intent); // 추가 정보를 넣은 후 다시 인텐트를 반환합니다.
finish(); // 액티비티 종료
}
});
m_dismiss.setOnClickListener(new OnClickListener() {
public void onClick(View v){
}
});
}
}
<style name="Theme.Transparent" parent="android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowBackground">@color/black_alpha_40</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowTitleStyle">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:background">@color/transparent</item>
</style>
이상태로 진저브레드 사용시 완벽하게 원하는 작동을 합니다.(뒷배경 블러 다이얼로그 투명)
하지만 ics에서 사용시 투명효과만 적용되고 뒷배경은 안나오고 검은색으로 나옵니다.
ics에서 뒷배경 투명 구현하는 방법이 따로 존재하나요?