본문 바로가기

프로그래밍257

[Flutter] 둥근 버튼 만들기 SizedBox( width: 80, height: 80, child: Container( decoration: BoxDecoration( border: Border.all( color: Colors.grey, width: 4), shape: BoxShape.circle, ), child: MaterialButton( onPressed: () { }, color: Colors.grey, child: Text("토익", style: const TextStyle(color: Colors.black, fontSize: 18), ), padding: const EdgeInsets.all(8), shape: const CircleBorder(), ) )​ Border 효과를 주고 싶다면 Container를 사용하.. 2022. 4. 3.
[Flutter] List<TextSpan> in ChangeNotifier ChangeNotifier 내부에서 데이터를 로드하고 List에 데이터를 채우는 형태를 가지고 있었는데 해당 데이터를 채우고 NotifyListeners()를 호출해줘도 갱신이 안 되었다. 값은 이미 바뀌어 있는 상태 RichText( text: TextSpan( style: const TextStyle( color: Colors.white, fontSize: 18, ), children: notifier.descDataList, // not working ), ) children: notifier.isQuizNotCorrect() ? notifier.descDataList : null, 이렇게 바꿔주니까 인식이 되기 시작한다. LiveData 개념에서도 특정 Observable 상태인 데이터가 바뀌어야.. 2022. 4. 2.
[Flutter] RichText 안드로이드에서 여러 텍스트들 사이에서 원하는 Style을 적용하고 싶은 경우에 Span을 사용한다. Flutter에서 이러한 처리를 하기 위해 RichText 위젯을 사용하는데 사용법은 이렇다. RichText( text: TextSpan( style: const TextStyle( color: Colors.white, fontSize: 18, ), children: [ const TextSpan(text: "정답은 "), TextSpan( text: "사과", style: const TextStyle( color: Colors.yellow, fontWeight: FontWeight.bold)), const TextSpan(text: "에요."), ], ); RichText로 감싸고 TextSpan을 넣.. 2022. 4. 2.
[Java] 학생 관리 프로그램 학교에서 자바 프로젝트를 만들어 제출하는 수행평가가 있어서 제출했던 것을 올린다. 실제 제출했던 파일 그대로 이고, C++ 스타일을 최대한 살려서 만들었다. 자바로 만든 학생 관리 프로그램 코드를 참고하고 싶다면 마음껏 이용해도 좋다. ​ 보고서나 ppt는 코드 이해를 위한 용도로만 써주시길 바랍니다. (사실 별거 없음) 2022. 4. 1.
[Java] for-each class Exam { public static void main(String[] args) { int a[] = new int[] {100, 200, 300}; char c[] = new char[] {'a', 'b', 'c', 'd'}; String str[] = new String[] {"hansei", "cyber", "security"}; int sum = 0; for(int k : a) sum += k; System.out.println(sum); for(char k : c) System.out.print(k + " "); for(String k : str) System.out.print(k + " "); } } 600 a b c d hansei cyber security 2022. 4. 1.
[Java] label class Exam { public static void main(String[] args) { label: for(int i = 0; i 2022. 4. 1.
[Java] Scanner & 표준 출력 스트림 Scanner import java.util.Scanner; class Exam { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("String Line : "); // \n까지 받아서 버림 System.out.println(scanner.nextLine()); System.out.println("String : "); System.out.println(scanner.next()); System.out.println("Byte : "); System.out.println(scanner.nextByte()); System.out.println("Short : "); Sys.. 2022. 4. 1.
[Java] 문자 입력 받기 import java.io.IOException; class Exam { public static void main(String[] args) throws IOException { int Input1 = System.in.read(); int Input2 = System.in.read(); int Input3 = System.in.read(); int Input4 = System.in.read(); int Input5 = System.in.read(); System.out.println("Input1 : " + Input1); System.out.println("Input2 : " + Input2); System.out.println("Input3 : " + Input3); System.out.print.. 2022. 4. 1.
[Android] EditText 주로 쓰는 옵션 EditText의 옵션에 따라서 기본 키패드 옵션이 달라지게 된다. ​ // 문자열 추가 android:text="@string/str_dot" ​ // 텍스트 정렬 , 색상, 크기, style(bold, normal, italic), 입력 가능 문자 android:textAlignment="center" android:textColor="@color/black" android:textSize="50dp" android:textStyle="normal" android:maxLength="6" ​ // 비밀번호 입력 타입(영어) android:inputType="textPassword" ​ // 숫자 키패드 android:inputType="number" ​ // 이메일 키패드(영어, @) android:.. 2022. 4. 1.
[Google Play Store] 어플 키워드 관련 정리 플레이스토어 상위 노출이 되기 위해 필요한 요소들을 정리한다. 1. 앱 성능 성능이 좋은 경우에 더욱 상위에 배치가 된다고 한다. 2. 앱 소개 키워드를 콘솔에 앱 이름에 키워드를 담고 설명에 키워드를 적절하게 넣어라. 애플의 앱 스토어 같은 경우에는 키워드 등록이 있다고 하는데 플레이 스토어의 경우에는 그런 개념이 존재하지 않는다. 하지만 어플 이름에 AAA: BBB형태나 AAA-BBB 처럼 특정 키워드를 같이 사용할 수 있다. 앱 설명에도 특정 키워드를 넣어주는 것이 좋다고 한다. 3. 앱 이름 짓기 (기존에 출시된 어플과 비슷하게 하면 좋지 않음) 기존에 출시된 어플과 비슷하게 짓지말고 눈의 확 띄게 지으면 좋다고 한다. 4. 다운로드 및 평가 인기가 많고 평가가 좋은 어플이 상위에 배치가 된다. .. 2022. 3. 31.