반응형

https://git-scm.com/book/ko/v1/Git%EC%9D%98-%EA%B8%B0%EC%B4%88-%EB%A6%AC%EB%AA%A8%ED%8A%B8-%EC%A0%80%EC%9E%A5%EC%86%8C

 

Git - 리모트 저장소

.5 Git의 기초 - 리모트 저장소 리모트 저장소 리모트 저장소를 관리할 줄 알아야 다른 사람과 함께 일할 수 있다. 리모트 저장소는 인터넷이나 네트워크 어딘가에 있는 저장소를 말한다. 저장소는 여러 개가 있을 수 있는데 어떤 저장소는 읽고 쓰기 모두 할 수 있고 어떤 저장소는 읽기 권한만 있을 수도 있다. 간단히 말해서 다른 사람들과 함께 일한다는 것은 리모트 저장소를 관리하면서 데이터를 거기에 Push하고 Pull하는 것이다. 리모트 저장소를 관리한

git-scm.com

 

Repository 복사

git clone https://github.com/account/repogitory/test.git test

 

전역 설정

1. 계정 설정

<전역 설정>

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

<대상  repository만>

git config  user.email "you@example.com" 
git config  user.name "Your Name" 

2. 라인인코딩

기본으로 lf를 사용

git config --global core.eol lf

git config --global --list|grep core.eol 

저장소에서 소스를 pull하거나 push할때 line encoding  자동 변경
git config --global core.autocrlf true

git config --global --list|grep core.autocrlf

3. LFS - Large File Storage

레포지토리에 LFS 적용

git lfs install

레포지토리에 LFS 해제

git lfs uninstall

LFS 대상 적용

git lfs track "*.zip"

LFS 관리 파일리스트

git lfs ls-files 

 

소스관리

상태확인

git status

파일추가

git add

되돌리기

git reset --soft

git reset --mixed

git reset --hard

비교

git diff

커밋

git commit

git commit -m "modify AAA"

삭제 

git rm

로그확인

git log

리모트 저장소

git remote

git remote -v

되돌리기

git checkout -- file or folder

브랜치변경

git checkout <branch>

브랜치변경 - remote

git remote update : branch 정보 업데이트

git branch -a : branch 전체 확인

git branch -r : remote branch 확인

git checkout -t origin/{branch name} : 브랜치 전환

 

PUSH

git push origin master

PULL

git pull origin master

 

 

LFS

https://newsight.tistory.com/330

 

Git LFS (Large File Storage) 사용하기

Git의 용량제한과 LFS 기본적으로 git은 여러개의 작은 소스코드 파일들을 위한 버전 컨트롤 시스템(VCS)이다. 따라서 Github의 경우 50Mb부터 Warning이 표시되고, 100Mb부터는 push시 Error가 발생한다. 그

newsight.tistory.com

 

Commit관리

https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html

 

[Git] git add 취소하기, git commit 취소하기, git push 취소하기 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io

 

반응형
반응형

CardView

 

CardView는 아래와 같이 곡선 테두리와 그림자(음영)를 표시할 수 있는 형태의 레이아웃입니다.

 

종속성

CardView는 v7 Support library에 포함된 위젯으로

CardView를 사용하기 위해서는 Bundle.gradle(Module: app)에 다음과 같은 종속성을 추가해 주어야 합니다.

dependencies {
...
implementation 'com.android.support:cardview-v7:28.0.0'

...
}

 

CardView 속성

app:cardBackgroundColor - CardView의 배경색 지정

 

app:cardCornerRadius - 코너 radius 지정

 

app:cardElevation

- 음영 elevation 지정, elevation값이 클수록 음영을 표시하기 위한 공간이 더 필요하다.

app:cardMaxElevation

- 음영표시 영역 max값 지정이라고 되어 있는데, 왜 적용이 안되지?

 

app:contentPadding - CardView 패딩 지정

 

app:cardUseCompatPadding="true"

- 음영이 표시될 자동으로 확보 합니다. cardElevation 값이 클 수록 공간이 많이 확보됩니다.

 

app:cardPreventCornerOverlap - ?

 

 

그림자(음영) 표시

그림자(음영)이 표시되기 위해서는 CardView 주변으로 추가적인 공간이 필요합니다.

그림자가 표시될 영역을 확보할 수 있는 방법은 다음의 세가지 방법이 있습니다.

 

1. cardUseCompatPadding 속성을 통해 지정

app:cardUseCompatPadding="true"로 설정하여 음영을 그릴 공간을 자동으로 확보하도록 설정 합니다.

다만 이경우, cardElevation값이 클 수로 생각보다 많은 공간이 확보되어 CardView 영역이 작아 집니다. 

app:cardElevation="40dp"으로 설정한 모습입니다.

아래의 두가지 방법을 통해 고정된 공간을 확보할 수는 있으나, 반대로 음영을 표시할 공각이 부족하면

연결부분이 약간 부자연 스럽게 표시될수 있습니다.

 

2. 상위 layout의 padding을 통해 지정

상위 layout에 padding을 지정하고, clip 속성을 false로 지정해야 합니다.

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:clipChildren="false"
    android:clipToPadding="false"
    android:orientation="vertical"
    android:padding="8dp">

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:cardBackgroundColor="#ff0000ff"
        app:cardCornerRadius="10dp"
        app:cardElevation="5dp"
        app:cardPreventCornerOverlap="false"
        app:contentPadding="0dp">

 

3. CardView에 layout_marging을 지정합니다.

<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardBackgroundColor="#ff0000ff"
app:cardCornerRadius="10dp"
app:cardElevation="5dp"
app:cardPreventCornerOverlap="false"
app:contentPadding="0dp"
android:layout_margin="8dp">

 

기타 속성

[parent layout]

android:clipChildren"
android:clipToPadding

 

참고URL

https://developer.android.com/guide/topics/ui/layout/cardview

https://stackoverflow.com/questions/41615468/how-to-add-shadow-on-cardview-aligned-to-bottom-of-parent/46374054

http://devstory.ibksplatform.com/2018/05/android-cardview.html

반응형
반응형

View의 background 속성을 이용해 View의 모양 변경하기


layout xml의 적용 부분

<View
android:id="@+id/marker"
android:layout_width="match_parent"
android:layout_height="7dp"
android:background="@drawable/marker_bound_top" />


marker_bound_top.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item >
<shape android:shape="rectangle">
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" />
<solid android:color="@color/default_marker_color"/>
</shape>
</item>
</layer-list>


shape Background 지정한 상태에서 필요에 따라 배경색상 변경

*setBackgroundColor()로 색상을 변경할 경우, xml로 지정한 내용이 무효화 된다.

아래와 같은 코드로 모양은 유지하면서 배경색만 변경 가능하다.

public void setMarkerColor(@ColorInt int color) {

Drawable backgroundOff = vMarker.getBackground();
backgroundOff.setTint(color);
vMarker.setBackground(backgroundOff);

}


반응형
반응형

Error type 3: Activity class {xxxx.MainActivity} does not exist.



package rename 후 빌드는 정상적으로 되나, app 실행 안되는 현상


$ adb shell am start -n "com.x.y.z/com.c.b.a.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Error while executing: am start -n "com.x.y.z/com.c.b.a.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.x.y.z/com.c.b.a.MainActivity }

Error type 3

Error: Activity class {com.x.y.z/com.c.b.a.MainActivity} does not exist.


Error while Launching activity 



1. Android Studio 종료
2. .idea Directory  삭제
3. .iml 확장자 파일 삭제
4. Android Studio 재시작


http://1004lucifer.blogspot.com/2015/03/intellij-build-apk.html

반응형
반응형

Activity & Fragment & ViewModel Lifecycle


Activity Lifecycle

Fragment


onCreateView() 와 onActivityCreated() 사이에 onViewCreated() 호출됨


https://developer.android.com/guide/components/fragments



ViewModel Lifecycle

https://developer.android.com/topic/libraries/architecture/viewmodel



런타임 변경처리

https://developer.android.com/guide/topics/resources/runtime-changes?hl=ko

반응형
반응형

Android Platform Version and API LEVEL and 점유율



2019년 4월 3일자

반응형

+ Recent posts