[안드로이드] 서서히 사라지는 효과 내기 - Animation 정의 --------------------------------------- Animation a = new TranslateAnimation(0.0f, parent.getWidth() - target.getWidth() - parent.getPaddingLeft() - parent.getPaddingRight(), 0.0f, 0.0f); //에니메이션 설정 a.setDuration(1000); a.setStartOffset(300); a.setRepeatMode(Animation.RESTART); a.setRepeatCount(Animation.INFINITE); 3. 에니메이션별 interpolator 설정 미리 정의된 안드로이드 에니메이션 설정을 얻는다. a.setInterpolator( Anima.. 더보기 [안드로이드] 소스에서 layout 셋팅해주기 public class margin_test{ @Override public void onCreate(Bundle savedInstanceState){ LinearLayout linear = new LinearLayout(this); linear.setOrientation(LinearLayout.VERTICAL); linear.setBackgroundColor(Color.LTGRAY); Button btn = new Button(this); btn.setText("Button"); LinearLayout.LayoutParams parambtn = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.Layou.. 더보기 [안드로이드] imeOptions="actionSearch" 키보드 검색을 통해 이벤트 1) android:imeOptions="actionSearch" 검색 창을 만들어 eidteText 에 터치를 했을때 키보드가 나타난다. actionSearch 는 돋보기 모양의 검색 키보드가 나타나며... 2) setOnEditorActionListener(new OnEditorActionListener() editText 에 검색어를 입력하고 키보드에서 돋보기를 입력했을경우, 키보드 값을 받을수 있는 메소드 이다. (아래는 소스) input_searcher = (EditText)findViewById(R.id.input_searcher); input_searcher.setOnEditorActionListener(new OnEditorActionListener() { @Override public b.. 더보기 이전 1 ··· 228 229 230 231 232 233 234 ··· 253 다음