본문 바로가기

프로그래밍127

[Android] Custom DialogFragment 좌우 너비 꽉 차게 90% 90% % 조절해서 style에 넣으면 됨. (style 코드 참고) onCreate에 style을 지정해주세요. override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setStyle(STYLE_NORMAL, R.style.ProfileNameEditTextDialogStyle) } 2022. 1. 27.
[Android] Custom DialogFragment EditText keyboard 가림 DialogFragment에 EditText가 있는 상태. EditText 포커싱되면서 Keyboard가 올라오는데 Dialog가 Resize 되지 않고 (밀려올라가는거) 그대로 있어서 키보드가 가려버리는 현상. style의 parent를 반드시 @android:style/Theme.Dialog 로 해야한다. * 주의 !!! ThemeOverlay.MaterialComponents.Dialog 로 하면 안됨. 이것땜에 삽질;;;;;; DialogFragment style은 onCreate에서 지정해주면된다. override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setStyle(STYLE_NO_FRAME.. 2022. 1. 27.
[Android] Android Studio 가장 위로/아래로 커서 이동 단축키 변경 안드로이드 스튜디오 가장 위로/아래로 커서 어떻게 이동? 단축키 어떻게 변경? How do I navigate to the start or end of a file in Android Studio? How to change navigation KeyMap? 맨 위로: cmd + HOME (fn + ←) 맨 아래로: cmd + End (fn + →) 기본 단축키는 home/end 키를 같이 써야해서 겁나 불편하다. (현재 커서에서 가장 밑/위 까지 선택할 때 특히 어렵) 맨 위로: cmd + ↑ 맨 아래로: cmd + ↓ Preferences -> Keymap 으로 이동 사진 처럼 4개의 단축키를 바꿔준다. 2022. 1. 14.
[Android] CoordinatorLayout EditText 키보드 가림 EditText 포커싱 될 때 키보드가 EditText를 가리는 문제 (CoordinatorLayout 안에 scrollview 안에 EditText 가 있음.) 아래처럼 적용하면 키보드가 화면을 밀어내면서 가리지 않게 된다. AndroidManifest 에 windowSoftInputMode 추가 android:windowSoftInputMode="adjustPan|stateAlwaysVisible|stateVisible" (예시) (전체코드) 2022. 1. 7.
[Xamarin] Custom sliver top area (gradually disappearing view while scrolling) https://api.flutter.dev/flutter/material/SliverAppBar-class.html (flutter의 sliver app bar와 유사, airbnb 뷰와 유사) 스크롤 하면서 상단 영역(터치 가능)이 점점 사라지는 커스텀 뷰를 만들어보자. Let's create a view where the top area (touchable) gradually disappears while scrolling. xaml 코드를 살펴보자. (전체 코드를 삽입한 것이 아님.) ... ... ... ... 바깥쪽 최 상위 영역에 스크롤뷰로 감싸준다. 이후에 상단 박스의 opacity를 변경해주기 위해, 이 스크롤뷰의 스크롤 위치를 가져올 예정이다. 그리고 안쪽에 Grid를 배치한다. 안쪽영역.. 2021. 9. 13.
[백준] [c++] 1027번 고층 건물 // // main.cpp // acm // // Created by Nathan on 2020/09/21. // #include #include using namespace std; int main(int argc, const char * argv[]) { vector vec; int n; cin>>n; vector num; for(int i = 0; i >t; vec.push_back(t); num.push_back(0); } for(int i = 0; i < n; i++) { long double comp = -9999999999.0; for (int j = i + 1; j < n; j++) { long double t = (double)((double)(v.. 2021. 7. 10.
[Xamarin] set alpha at hex 100% — FF 95% — F2 90% — E6 85% — D9 80% — CC 75% — BF 70% — B3 65% — A6 60% — 99 55% — 8C 50% — 80 45% — 73 40% — 66 35% — 59 30% — 4D 25% — 40 20% — 33 15% — 26 10% — 1A 5% — 0D 0% — 00 ex) Black 10% => "1A000000" 2021. 6. 16.
[C#, Xamarin] Call by value, deep copy if (!(BindingContext is DFDream dream)) return; MessagingCenter.Send(this, MessagingCenterMessages.AddWizardDream, dream)); 이렇게 하고 dream을 수정하니까 추가된 dream들이 다 같이 수정되어버림. DFDream에 Clone() 메소드를 추가. public object Clone() { return new DFDream { Id = this.Id, ProfileImage = this.ProfileImage, ... }; } (DFDream)dream.Clone()으로 넘김. private async void OnStartDreamButtonTapped(object sender, EventArgs e) .. 2021. 6. 16.
[Xamarin] Draw dashed(dotted) arc with SkiaSharp (not using AddArc()) var dottedArcSize = Math.Min(info.Width, info.Height); var dottdArcRect = new SKRect( StrokeWidth, StrokeWidth, dottedArcSize - StrokeWidth, dottedArcSize - StrokeWidth); var dottedArcLinePaint = new SKPaint { Color = Color.FromHex("#FF521F").ToSKColor(), StrokeWidth = 4.5f, }; var dotYRatio = 0.22; var dotLength = 0.03; var dotEmptyArcAngle = 60; for (var degrees = 0; degrees < 360; degrees += .. 2021. 6. 14.
[Xamarin] Draw Arc with SkiaSharp https://docs.microsoft.com/ko-kr/xamarin/xamarin-forms/user-interface/graphics/skiasharp/curves/arcs 원호를 그리는 3가지 방법 - Xamarin 이 문서에서는 SkiaSharp를 사용 하 여 세 가지 방법으로 원호를 정의 하는 방법을 설명 하 고 샘플 코드를 사용 하 여이를 보여 줍니다. docs.microsoft.com Start Angle : X축 0도 기준 시작각도 Sweep Angle : 그리고자 하는 호의 각도 (StartAngle를 시작으로 SweepAngle 만큼 호를 그림) 코드 식으로 나타내면, var _emptyArcAngle = 60; StartAngle = 90 + _emptyArcAngle / 2; S.. 2021. 6. 14.