'코딩'에 해당되는 글 6건
- 2021.03.30 윈도우 파이썬 버전 변경 방법
- 2021.03.24 Layout/Widjet/Drawable 01
- 2021.03.24 안드로이드 스튜디오 삭제 및 기본 설정
- 2021.03.16 Docker 사용법
- 2017.11.10 2017-11-10 Visual Studio에서 빈 솔루션 생성 (VS 2015)
- 2017.11.09 c# 프로젝트 참조들이 느낌표로 표시될 때
ConstraintLayout (제약 레이아웃)
- 위젯이 어느 것과 연결되어 있는지 명시를 해줘야 함
- 연결 점, 연결 선
- 연결 점과 연결 선을 이용해서 화면을 배치하는 레이아웃
- 가이드 선
- 추가하여, 연결할 수 있음
- convert view
- 마우스 우클릭 메뉴로 다른 레이아웃으로 변경
- dp
- 밀도 독립적 픽셀
- 해상도에 따라 픽셀 수가 다른데, 그에 맞게 맞춰 줌
- px는 절대 픽셀
Button layout_gravity
- gravity 중력
- 책받침, 철가루
- 자석을 따라감
- 정렬을 의미함
- 다른 언어의 Alignment
- center
- 가로 세로 모두 가운데
- center_horizontal
- 가로 센터
- 뷰 자체의 속성
- 버튼의 위치
Button gravity
- layout_가 아니면, 뷰 안에서의 속성
- 버튼 안의 텍스트의 위치
Button textSize
- 글자 크기는 sp를 권장함
- 30
LinearLayout baselineAligned
- true
- 텍스트를 기준으로 뷰들을 배치해줌
- 세 개 버튼의 "텍스트를 기준으로" 같은 라인 상 배치
LinearLayout 공간 분할
- weight
- 여유 공간을 분할해서 배치
- 정확히 3분할 방법
- 각 버튼의 layout_height를 0dp로 함
- 각 버튼의 layout_weight를 1로 함
- 정확히 3분할해서 배치
- 4:1:1로 분할 방법
- 각 버튼의 layout_height를 0dp로 함
- 버튼 1은 layout_weight 4
- 버튼 2는 layout_weight 1
- 버튼 3은 layout_weight 1
RelativeLayout
- 버튼 1 (id: button)
- layout_alignParentTop true
- 버튼 2 (id: button2)
- layout_alignParentBottom true
- 버튼 3
- layout_below @id/button
- layout_above @id/button2
FrameLayout
- 위 쪽
- 버튼
- 아래 쪽
- 이미지 두개를 번갈아 보도록 함
- 이미지 파일 위치
- res/drawable
- 탐색기에서 Ctrl+C, 스튜디오의 res/drawable로 Ctrl+V
- 배치
- LinearLayout
- Button 상단 배치 "이미지 바꾸기"
- Layouts/FrameLayout을 하단 배치
- ImageView를 FrameLayout에 추가
- imageView.setVisibility(View.VISIBLE)
- imageView2.setVisibility(View.INVISIBLE)
'코딩 > Android' 카테고리의 다른 글
안드로이드 스튜디오 삭제 및 기본 설정 (0) | 2021.03.24 |
---|
안드로이드 스튜디오 클린 삭제
- c:\Program Files\Android\Android Studio 로 이동
- uninstall.exe 실행
- c:\Users\<사용자계정폴더>\AppData\Local\Android\Sdk 폴더 삭제
기본 설정
- 글자 크기 바꾸기
- File -> Settings -> Editor
- -> Font
- "Consola", 13
- 자동 임포트
- File -> Settings -> Editor
- -> General
- -> Auto Import
- 체크 Add unambiguous imports on the fly
- 체크 optimize imports on the fly
기본 XML UI
- 버튼 넣기
- 자석 활성화 (auto connection)
- RelativeLayout에서 버튼 위치 중심에 위치 시키기
- 버튼의 좌우 상하 점을 다른 버튼 또는 화면의 가장자리로 끌어 연결
'코딩 > Android' 카테고리의 다른 글
Layout/Widjet/Drawable 01 (0) | 2021.03.24 |
---|
빌드
이미지 빌드
# docker build <옵션> <Dockerfile 경로>
옵션 -t, --tag="": <저장소명>/<이미지명>:<태그> 설정
예 docker build .
예 docker build -t repo01 .
예 docker build -t repo01/server:1.0 ./doc
* Dockerfile
FROM "기본이미지"
ADD "이미지에 추가할 파일"
RUN "실행할 명령어"
사용
이미지 목록 보기
# docker images 또는 docker image ls
이미지 실행
# docker run <이미지명>
예 docker run image01
이미지 실행 후 /bin/bash 바로 수행
# docker run -i -t <이미지명> <실행할명령>
인자 -i (interactive), -t 가상 터미널 에뮬레이션, -d 데몬으로 실행
예 docker run -i -t ubuntu /bin/bash
Ctrl+D (/bin/bash 종료)
이미지 실행 후 인위적으로 종료되지 않도록 하기
(작업이 끝나지 않도록 하면 돌고 있게됨)
# docker run -i -t <이미지명> bin/bash
# Ctrl+P+Ctrl+Q (bash 종료하지만 백그라운드로 구동됨)
컨테이너에 접속
# docker attach <컨테이너ID>
삭제
이미지 삭제
# docker rmi <이미지ID>
예 docker rmi 1234
컨테이너 삭제
# docker rm <컨테이너 명>
예 docker rm abc
모두 삭제
# docker rm `docker ps -a -q`
검색
이미지 검색
# docker search <키워드>
예 docker search ubuntu
이미지 다운로드
# docker pull <이미지>
예 docker pull ubuntu:lastest
Visual Studio에서 빈 솔루션 생성하는 방법입니다. (VS 2015)
빈번하게 만들지 않기 때문에 한번 만들려면 찾아 헤매는 경우가 있어 기록해둡니다.
"새 프로젝트 -> 설치됨 -> 템플릿 -> 기타 프로젝트 형식 -> Visual Studio 솔루션" 입니다.
Although a project must reside in a solution, you can create a solution that has no projects.
To create an empty solution
On the File menu, click New and then click New Project.
In the left pane, select Installed, select Other Project Types, and then select Visual Studio Solutions from the expanded list.
In the middle pane, select Blank Solution.
Set the Name and Location values for your solution, then click OK.
After you create an empty solution, you can add new or existing projects or items to it by clicking Add New Item or Add Existing Item on the Projectmenu.
출처 - https://msdn.microsoft.com/en-us/library/zfzh36t7.aspx
'코딩 > Visual Studio' 카테고리의 다른 글
c# 프로젝트 참조들이 느낌표로 표시될 때 (0) | 2017.11.09 |
---|
루션에 프로젝트를 추가하면 참조에 느낌표가 표시되면서 빌드가 안 되는 경우가 있습니다.
이때, 프로젝트 파일 ( Example.csproj )을 열었을 때, 다음 문구가 있다면,
... <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. ... </ErrorText> </PropertyGroup> <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" /> </Target> ... |
아래와 같이 <!-- ... --> 로 주석 처리를 해주면 됩니다.
|
< END >
'코딩 > Visual Studio' 카테고리의 다른 글
2017-11-10 Visual Studio에서 빈 솔루션 생성 (VS 2015) (0) | 2017.11.10 |
---|