package com.example.user.winner;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
TextView registerButton = (TextView) findViewById(R.id.registerButton);
registerButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent registerIntent = new Intent(LoginActivity.this, RegisterActivity.class);
LoginActivity.this.startActivity(registerIntent);
}
});
}
}
package com.example.user.winner;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
public class RegisterActivity extends AppCompatActivity {
private ArrayAdapter adapter;
private Spinner spinner;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
spinner = (Spinner) findViewById(R.id.sportSpinner);
adapter = ArrayAdapter.createFromResource(this, R.array.sport, android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
}
}
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="225dp"
android:background="@color/colorPrimary"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView"
android:layout_width="125dp"
android:layout_height="125dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:src="@drawable/ic_launcher_foreground" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="내기사이트"
android:textColor="#ffffff"
android:textSize="25dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="내기하실분구해요"
android:textColor="#ffffff"
android:textSize="25dp"
android:textStyle="bold" />
</LinearLayout>
<EditText
android:id="@+id/idText"
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="10dp"
android:textColor="#ffffff"
android:textColorHint="#ffffff"
android:ems="10"
android:hint="아이디"
android:layout_marginTop="10dp"
android:background="@color/colorPrimary"/>
<EditText
android:id="@+id/passwordText"
android:layout_width="280dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="10dp"
android:textColor="#ffffff"
android:textColorHint="#ffffff"
android:ems="10"
android:hint="비밀번호"
android:inputType="textPassword"
android:layout_marginTop="10dp"
android:background="@color/colorPrimary"/>
<Button
android:layout_width="280dp"
android:layout_height="wrap_content"
android:textSize="20dp"
android:textStyle="bold"
android:textColor="#ffffff"
android:background="@color/colorPrimary"
android:text="로그인"
android:layout_marginTop="10dp"
android:layout_gravity="center" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="18dp"
android:layout_marginTop="10dp"
android:text="회원가입"
/>
</LinearLayout>