Skip to content

Instantly share code, notes, and snippets.

View godjooyoung's full-sized avatar
🌴
On vacation

신주영 godjooyoung

🌴
On vacation
View GitHub Profile
@godjooyoung
godjooyoung / MainActivity.java
Created June 9, 2020 02:31
로그인 버튼에 클릭 이벤트 걸었다. Tost는 밑에 작게 잠깐 올라오는거 로그창에 sysout으로 입력도 되게함. 로그인 버튼의 버튼 id는 button임
package com.example.hello;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@godjooyoung
godjooyoung / MainActivity.java
Created June 10, 2020 01:57
0610 이벤트 리스너 걸기 SETTEXT를 통해 결과를 뿌려줄수도 있습니다.
package com.example.calc;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
@godjooyoung
godjooyoung / MainActivity.java
Created June 11, 2020 02:38
DB에서 값가져와서 리스트에 부리기
package com.example.diary;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
package com.example.diary;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
@godjooyoung
godjooyoung / Volley.java
Created June 17, 2020 01:12
안드로이드 리퀘스트
package com.example.volley;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
@godjooyoung
godjooyoung / build.gradle
Created June 17, 2020 01:12
안드로이드 리퀘스트 그리들
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.volley"
minSdkVersion 16
targetSdkVersion 29
@godjooyoung
godjooyoung / activity_volley.xml
Created June 17, 2020 01:13
안드로이드 리퀘스트 뷰
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Volley">
<TextView
android:id="@+id/textview"
@godjooyoung
godjooyoung / activity_main.xml
Created June 19, 2020 01:06
안드로이드 좌표값 가져오기 레이아웃 뷰
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<Button
@godjooyoung
godjooyoung / MainActivity.java
Created June 19, 2020 01:06
좌표값 가져오기
package com.example.location;
import android.annotation.SuppressLint;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
@godjooyoung
godjooyoung / build.gradle
Created June 19, 2020 01:06
좌표값 가져오기 그리들
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.location"
minSdkVersion 16
targetSdkVersion 29