sunnnl

main activity publishing

Showing 141 changed files with 63 additions and 5 deletions
......@@ -15,13 +15,17 @@
<activity android:name=".ui.SplashActivity"
android:screenOrientation="fullSensor"
android:noHistory="true">
</activity>
<activity android:name=".ui.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.MainActivity" />
</application>
</manifest>
\ No newline at end of file
......
package com.sunnni.smartdoorlock.ui;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.os.Bundle;
import com.sunnni.smartdoorlock.R;
import java.util.Objects;
public class MainActivity extends AppCompatActivity {
private Toolbar mToolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setToolbar();
}
// 툴바 설정
private void setToolbar(){
mToolbar = findViewById(R.id.toolbar_main);
setSupportActionBar(mToolbar);
Objects.requireNonNull(getSupportActionBar()).setDisplayShowCustomEnabled(true);
getSupportActionBar().setDisplayShowTitleEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeAsUpIndicator(R.drawable.baseline_menu_white_24);
}
}
}
\ No newline at end of file
......
......@@ -3,14 +3,17 @@ package com.sunnni.smartdoorlock.ui;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
......@@ -27,6 +30,9 @@ public class SplashActivity extends AppCompatActivity {
private Animation logoAnimation;
private ImageView test;
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -39,6 +45,8 @@ public class SplashActivity extends AppCompatActivity {
logoAnimation = AnimationUtils.loadAnimation(this, R.anim.anim_bottom_up);
test = findViewById(R.id.img_test);
splashLoading();
init();
}
......@@ -52,20 +60,49 @@ public class SplashActivity extends AppCompatActivity {
textInputLayout.setVisibility(View.VISIBLE);
btnEnter.setVisibility(View.VISIBLE);
btnEnter.bringToFront();
test.setVisibility(View.VISIBLE);
test.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("스플래시", "테스트 버튼");
}
});
btnEnter.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Log.d("스플래시", "버튼");
}
});
}
}, 3000);
}, 2000);
}
private void init() {
btnEnter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("스플래시", "edtSuperKey.toString()");
if(edtSuperKey.toString().isEmpty()){
Log.d("empty", "true");
Log.d("스플래시", "true");
} else {
// main 화면으로 이동
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
}
});
logoContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("스플래시", "edtSuperKey.toString()");
}
});
}
}
......
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.