implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' package com.example.devat.myapplication; public class ExampleItem { private int mImageResource; private String mText1; private String mText2; public ExampleItem(int mImageResource, String mText1, String mText2) { this...
imeOptions 사용 public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); EditText editText1 = findViewById(R.id.edit_text1); EditText editText2 = findViewById(R.id.edit_text2); editText1.setOnEditorActionListener(editorListener); editText2.setOnEditorActionListene..
HashMap 사용방법 public class MapIterationSample { public static void main(String[] agrs) { Map map = new HashMap(); map.put("키1", "값1"); map.put("키2", "값2"); map.put("키3", "값3"); map.put("키4", "값4"); map.put("키5", "값5"); map.put("키6", "값6"); // 방법1 Iterator keys = map.keySet().iterator(); while( keys.hasNext() ){ String key = keys.next(); System.out.println( String.format("키 : %s, 값 : %s", key, map..