activity_main.xml (첫화면,로그인 전 화면)

 

<?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:gravity="center"

android:orientation="vertical"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/textViewID"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_weight="1"
android:text="ID"
android:textSize="28dp" />

<EditText
android:id="@+id/eid"
android:layout_width="213dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:hint="ID" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<TextView
android:id="@+id/textViewpw"
android:layout_width="100dp"
android:layout_height="50dp"
android:layout_weight="1"
android:text="PW"
android:textSize="26dp" />

<EditText
android:id="@+id/epw"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:ems="10"
android:hint="password"
android:inputType="textPassword" />

</LinearLayout>

<Button
android:id="@+id/gotomenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:onClick="login"
android:text="로그인" />

</LinearLayout>


activtiy_main2.xml (로그인 후 화면)
 

<?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:gravity="center"
android:orientation="vertical">


<Button
android:id="@+id/customerM"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="고객관리"
/>

<Button
android:id="@+id/profitM"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="매출관리"
/>
<Button
android:id="@+id/goodsM"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="상품관리"
/>

</LinearLayout>

MainActivity.java



import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
public static final int REQUEST_CODE_MENU=101;
String userid="identity";
String userpw="password";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_MENU) {
if (resultCode == RESULT_OK) {
String menu = data.getExtras().getString("menu");
Toast.makeText(getApplicationContext(), "응답으로 전달된 menu :" + menu, Toast.LENGTH_LONG).show();
}
}
}
public void login(View v){
EditText id=(EditText)findViewById(R.id.eid);
EditText pw=(EditText)findViewById(R.id.epw);

if(id.getText().toString().equals(userid)){
if (pw.getText().toString().equals(userpw)){
Intent intent=new Intent(getApplicationContext(),Main2Activity.class);
startActivityForResult(intent,REQUEST_CODE_MENU);
}
else Toast.makeText(MainActivity.this,"로그인 실패",Toast.LENGTH_LONG).show();
}
else Toast.makeText(MainActivity.this,"로그인 실패",Toast.LENGTH_LONG).show();
}

}

Main2Activity.java

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Main2Activity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);

Button customerM=(Button)findViewById(R.id.customerM);
Button profitM=(Button)findViewById(R.id.profitM);
Button goodsM=(Button)findViewById(R.id.goodsM);

customerM.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("menu","customer");
setResult(RESULT_OK,intent);

finish();
}
});
profitM.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("menu","profit");
setResult(RESULT_OK,intent);

finish();
}
});
goodsM.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.putExtra("menu","goods");
setResult(RESULT_OK,intent);

finish();
}
});
}
}

5세대(5G) 이동통신 주도권을 결정짓는 주파수 경매 초안이 공개됐습니다. 최저경쟁가격은 3.5㎓ 대역 2조6544억원, 28㎓ 대역 6216억원이다. 2개 대역의 경매 최저경쟁가격을 합치면 3조2760억원에 달한다고 합니다.


하지만 이동통신 3사의 입장은 달랐습니다. 정부가 5G주파수의 가격을 너무 높게 잡았다며 재조정을 요구했습니다.

입찰을 맡은 과학기술정보통신부측 입장은 "할당 대가와 관련해 3.5㎓ 대역의 경우 2016년 경매 최저가를 고려했고, 28㎓ 대역은 불확실성을 고려해 재할당시 가격을 재산정하겠다"며 "최소한의 대가를 부여했다"고 표명했습니다.


경매 추진 세부 일정은 과학기술정보통신부가 5월 이동통신 주파수 할당 공고를 내고, 6월 주파수 경매가 진행될 예정이다.



'일상 잡글' 카테고리의 다른 글

오늘은 무슨날일까요  (1) 2018.04.19

오늘은 4월 19일입니다.

58년전 오늘 이승만 정권에 대항해 일어난 학생, 시민 중심세력의 반독재 민주주의 운동인 4.19혁명이 일어났습니다.

이승만정권은 1948년부터 60년 까지 발췌개헌, 사사오입 개헌등의 불법적 개헌을 통해 총 12년간 장기 집권 하였습니다. 그리고 1960년 3월 15일 4대 부정통령 선출 선거에서 반공개 투표, 투표함 바꿔치기, 득표수 조작등 부정선거를 시행하였습니다.


그러자 마산에서 시민들과 학생이 부정선거를 반대하는 격렬한 시위를 벌였고 이승만정권은 총격과 폭력으로 무참히 강제진압하던 도중 다수의 사상자가 발생하였습니다.


이후 4월 11일에 1차 마산시위에서 실종된 김주열군이 눈에 최루탄이 박힌 시체로 발견됨으로써 시민들은 더욱 분개하여 2차 시위가 일어나게 되었습니다. 


그리고 4월 18일 고려대학교의 4천여명의 학생들이 민주이념을 쟁취하기 위한 선언문을 낭독하고, 국회의사당으로 진출했습니다. 이후 학교로 복귀하다가 괴한들의 습격에 부상당했다.


또 이에 분개한 시민들은 다음날인 58년전 오늘, 이승만 하야와 독재정권 타도를 위한 혁명적 투쟁으로 발전하였고, 이에 이승만 정권은 무력으로 탄압하고 비상계엄령을 선포하였다.

하지만 시민들은 무력에도 굽히지 않고 더욱 완강하게 투쟁하여 결국 1960년 4월 26일 이승만은 결국 대통령직에서 하야하였습니다.


대한민국의 현대는 시민들이 많은 것을 바꾸어 왔는데요.

여러분도 우리나라 시민으로써 잊지말고 자신감을 가지고 생활하세요.

'일상 잡글' 카테고리의 다른 글

4차 산업혁명, IoT 시대, '5G 주파수 경매 시작'  (0) 2018.04.19

+ Recent posts