본문 바로가기

프로그래밍/App 개발57

[Xamarin] ScrollView with TapGesture Error SettingPage의 label의 탭이 안먹하는 버그 발생. ScrollView가 Root View로 있으면 TapGesture 가 안먹히는 버그가 있다. ScrollView 상위 Child에 뷰 하나를 추가해주면 잘 됨 ㅋ - 상사님께서 알아낸 원인과 해결책 2021. 1. 26.
[Xamarin] ScrollView refresh RefreshView with ScrollView 먼저, ScrollView를 만든다. ... 그리고 ScrollView 바깥에 RefreshView로 감싸준다. // ViewModel Binding ... ViewModel을 생성한다. using System.ComponentModel; namespace yournamespace { class YourViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public YourViewModel() { } } } ViewModel에 리프레쉬 될 때 실행될 Command와, 리프레쉬가 되는 상태를 나타내는 IsReloading 프로퍼티를 정의한다.. 2020. 12. 25.
[Android] 눈 내리는 배경 만들기 눈 내리는 배경 만들기 오픈소스를 활용하여 앱에 눈을 뿌려보자. github.com/JetradarMobile/android-snowfall JetradarMobile/android-snowfall Fully customizable implementation of "Snowfall View" on Android. - JetradarMobile/android-snowfall github.com 먼저, build.gradle의 dependencies에 compile 'com.github.jetradarmobile:android-snowfall:1.2.0' 를 추가한다. dependencies { ... compile 'com.github.jetradarmobile:android-snowfall:1.2.0' .. 2020. 12. 25.
[Android] Frame with rounded corner only top (둥근모서리 위쪽만) Frame with rounded corner only top. (위쪽만 모서리 둥글게 만들기) 기본적으로 FrameLayout은 Corner Radius 옵션이 없다. 따라서, background용 drawable xml을 만들어서 적용시켜줘야 한다. 먼저, drawable에 xml 파일을 하나 만들어준다. 그리고 로 원하는 위치에 Radius 값을 지정한다. 그 다음, 모서리를 둥글게 하고자 하는 FrameLayout의 background를 방금 만든 xml로 지정한다. 2020. 12. 25.
[Xamarin] System.MissingMethodException System.MissingMethodException Method not found: void - Xamarin.Forms nuget을 삭제 후, 한 단계 전 버전으로 설치 ex) 4.8.x.xxxx -> 4.7.x.xxxx - 또는 bin, obj 폴더 삭제 후 Visual Studio 재실행 * 백업필수 2020. 12. 9.
[Xamarin] CollectionView DarkMode NResourceDictionary.xaml 이런식으로 따로 리소스 딕셔너리를 생성하여 관리한다. 아래는, CollectionView Cell을 커스텀 레이아웃으로 만들고, 해당 Cell의 기본 배경색상과 선택했을 때의 배경색상을 현재 스마트폰 테마에 따라 바꿔주는 코드이다. 그리고 App.xaml에 추가하면 된다. * 현재, 이를 C# 코드로 구현하진 못한다. (다크모드 + Selected Color 지정) github.com/xamarin/Xamarin.Forms/issues/11341 Ability to set AppThemeBinding on Styles in code · Issue #11341 · xamarin/Xamarin.Forms Summary I would like to set AppTh.. 2020. 12. 4.
[Xamarin] NSInternalInconsistencyException github.com/xamarin/Xamarin.Forms/issues/6920 [Bug] NSInternalInconsistencyException exception on iOS with CollectionView · Issue #6920 · xamarin/Xamarin.Forms Description I have a Xamarin.Forms project that has a CollectionView that is bound to an ObservableCollection. If I call Clear() on the ObservableCollection and then call Add() to add an item I get... github.com CollectionView의 ItemsSource.. 2020. 11. 26.
[Xamarin] DarkMode 'SetAppThemeColor' Code Behind (without xaml) 보호되어 있는 글 입니다. 2020. 11. 26.
[Xamarin] CollectionView Selected Item Color 방법 1. Trigger 사용 (버그 존재)var triggerTrue = new DataTrigger(typeof(CollectionCellLayout)) { Value = true, Binding = new Binding() { Path = "IsChecked" } }; var setterTrue = new Setter { Property = BackgroundColorProperty, Value = Color.FromRgb(247, 247, 249) }; triggerTrue.Setters.Clear(); triggerTrue.Setters.Add(setterTrue); this.Triggers.Add(triggerTrue);이런 식으로 하면, 터치를 뗐을 때 설정한 색상으로 변경한다.하지만 터치를.. 2020. 11. 24.
[Xamarin] Custom Bottom Sheet Bottom Sheet이란?로직주의코드PanContainerMainPage느낀 점ReferencenugetMaterial Design Bottom Sheet이란? 💡하단에서 밀어올릴 수 있는 뷰. Android는 Material Design에서 제공해주는 기능이다.10/20~10/22 동안 구현하였습니다.로직PanGestureRecognizer()를 등록하여 Drag 이벤트를 정의합니다.GestureStatus.Running 동안 터치한 만큼을 이전 위치에 더하여 뷰의 위치를 지정합니다.→ 스크린 크기만큼 움직일 수 있게 지정할 수 있습니다.GestureStatus.Completed 하면 터치를 해제한 위치를 저장합니다. (아래로 내리면 없어지게 하는 기능도 추가할 수 있습니다.)당연하게도, 화면이 겹칠.. 2020. 10. 22.