// 멤버 변수 private Button BtnDlgStartDate, BtnDlgStopDate; // 버튼 이벤트 Button.OnClickListener mClick = new View.OnClickListener() { @Override public void onClick(View v) { switch(v.getId()) { case R.id.BtnDlgStartDate : msgBox("버튼 이벤트 되냐?"); break; } } }; // 다이얼로그 띄우기 final LinearLayout linear; linear = (LinearLayout) View.inflate(SaleView.this, R.layout.selectdate, null); linear.findViewById(R.id.B..
// xml // java 1. create() private Spinner mComStation; private String mStationList[]; mComStation = (Spinner) findViewById(R.id.ComStation); // 충전소 리스트 선택시 이벤트 mComStation.setOnItemSelectedListener( new OnItemSelectedListener() { public void onItemSelected(AdapterView parent, View view, int position, long id) { msgBox("충전소 선택", mStationList[position].toString()); } public void onNothingSelected..
package pkg.TabView; import android.app.TabActivity; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.view.LayoutInflater; import android.widget.TabHost; public class TabViewActivity extends TabActivity { TabHost mTab; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mTab = getTabHost(); LayoutInflater inflater = L..
// Create() // 이름 검색 이벤트 mEdtSearch = (EditText)findViewById(R.id.EdtSearch); mEdtSearch.addTextChangedListener(txtWatcher); // 이름으로 검색시 change 이벤트 TextWatcher txtWatcher = new TextWatcher(){ @Override public void afterTextChanged(Editable s) { } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int st..
// Manifest // 안 넣어주면 실행 안됨. // main.xml // end.xml // AlramActivity.java package pkg.Alram; import android.app.Activity; import android.app.NotificationManager; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class AlramActivity extends Activity { static final int NAPNOTI = 1; /** Called when th..
// 퍼미션 - 항상 이게 문제였어 ㅜㅜ 안되면 무조건 이거입니다. // 첨부파일 링크 라이브러리로 설정해야합니다. netcomponents-1.3.8.jar package pkg.ftp; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import android.app.Activity; import android.app.AlertDialog; import android.os.Bundle; import com.oroinc.net.ftp.FTPClient; public class FtpActivity extends Activity { /** Called wh..
mList.setSelectionFromTop(10, 10);
- Total
- Today
- Yesterday