목록Programming/Android Example (37)
2swan
.xml .java public class Date extends AppCompatActivity { Chronometer chrono; RadioButton rdoCal, rdoTime; DatePicker dPicker; TimePicker tPicker; TextView tvYear, tvMonth, tvDay, tvHour, tvMinute; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle("시간 예약"); // 크로노미터 chrono = (Chronometer) findViewById(R..
.xml .java public class MainActivity2 extends AppCompatActivity { TextView text1, text2; Switch switchAgree; RadioGroup rGroup1; RadioButton radioArray[] = new RadioButton[3]; ImageView imgPet; Button btnQuit, btnRerun; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); setTitle("안드로이드 사진 보기"); // 위젯을 변수에 대입 te..
해결방법 manifests 폴더의 xml의 파일에 접근하여 exported는 true intent-filter를 추가 해준다.
web.xml web.java public class MainActivity7_webview extends AppCompatActivity { EditText edtUrl; Button btnGo, btnBack; WebView web; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity7_webview); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setIcon(R.drawable.q10); edtUrl = ..
tab1.xml tab1.java public class MainActivity7_tab extends TabActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity7_tab); TabHost tabHost = getTabHost(); TabHost.TabSpec tabSpecSong = tabHost.newTabSpec("SONG").setIndicator("음악별"); tabSpecSong.setContent(R.id.tabSong); tabHost.addTab(tabSpecSon..
main1.java //첫번째 결과 값 public class MainActivity2_dialog extends AppCompatActivity { private Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity2_dialog); button = findViewById(R.id.button1); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { ..
main.xml main.java public class MainActivity2_ContextMenu extends AppCompatActivity { private LinearLayout baseLayout; private Button button1, button2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity2_context_menu); setTitle("배경색 바꾸기 (컨텍스트 메뉴)"); button1 = findViewById(R.id.button1); button2 = findV..
main.java /*메뉴*/ public class MainActivity extends AppCompatActivity { private LinearLayout baseLayout; private Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle("배경색 변경"); baseLayout = findViewById(R.id.baseLayout); button = findViewById(R.id.button1); } @Override public boolean onCr..
main.xml dialog1.xml toast1.xml main.java public class MainActivity2_user extends AppCompatActivity { TextView tvName, tvEmail; Button button1; EditText dlgEdtName, dlgEdtEmail; TextView toastText; View dialogView, toastView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main_activity2_user); setTitle("사용자 정보 입력 (..
안드로이드 에뮬레이터에 문제가 있어서 초기화하거나 다시 시작하는 과정에서 발생하는 AVD is already running 에러이며 해결방안 : .lock으로 끝나는 LOCK 파일과 폴더를 삭제해준다 경로는 C:\Users\user\.android\avd\Pixel_2_API_30.avd 위치해 있다