@Override
protected
void
onCreate(Bundle savedInstanceState) {
super
.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_intro);
image_intro = (ImageView)findViewById(R.id.intro);
new
Thread (
new
Runnable() {
@Override
public
void
run() {
try
{
Animation alphaAnim= AnimationUtils.loadAnimation(Intro.
this
, R.anim.alpha);
image_intro.startAnimation(alphaAnim);
Thread.sleep(
4000
);
usersearchIntent();
}
catch
(Exception e) {
}
}
}).start();
}
private
void
usersearchIntent() {
SharedPreferences pref = getSharedPreferences(
"userinfo"
, MODE_PRIVATE);
String userid = pref.getString(
"id"
,
""
);
String password = pref.getString(
"password"
,
""
);
if
(userid.toString() !=
""
){
Log.d(
"--"
, userid);
new
Login().LoginProcess(handler, userid, password);
viewDialog(
"로그인중..."
);
}
else
{
Intent intent =
new
Intent(
this
,ProvisionActivity.
class
);
startActivity(intent);
finish();
}
}
private
void
viewDialog(String msg){
this
.loaddingDialog = ProgressDialog.show(
this
,
null
, msg);
}
private
void
ErrorViewMessageSet(String msg){
try
{
alert =
new
AlertDialog.Builder(
this
);
new
ViewMessageSet(alert, msg).ErrorMessageSet();
}
catch
(Exception e) {
Log.d(
"Errorlog"
,
"Intro : ErrorViewMessageSet"
+ e.getMessage());
}
}
private
void
goSelectPage(String string) {
Log.d(
"--"
,
"Login2 = goSelectPage"
);
}
@Override
public
boolean
onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.intro, menu);
return
true
;
}