Android/App개발2021. 5. 25. 13:48

하단에서 올라오는 팝업 다이얼로그

 

위와 같이 하단에서 솟구치는 팝업 다이얼로그는 Dialog를 상속하여 Animation을 적절히 활용하면 구현이 가능하다.

https://github.com/samse/SlideUpDialog

 

 

samse/SlideUpDialog

Contribute to samse/SlideUpDialog development by creating an account on GitHub.

github.com

 

 

Posted by 삼스
Android/App개발2021. 3. 26. 17:13

MultiWindow를 지원할지에 대해 프로그램 설계시 미리 고려할 사항이 있겠다.
지원하고 한다면 screenOrientaion로 가로/세로로 고정하지 말고 모든 사이즈의 화면에 대응되도록 레이아웃을 고려하여 작성해야한다.
액티비티의 최소사이즈를 지정하면 그 지정한 사이즈 이하로는 조정이 되지 않는다.

screenOrientation를 지정한 상태에서 실행중이 앱을 멀티윈도우로 진입시키면 액티비티가 재시작된다.
이를 막기 위해서는 다음 속성을 추가하면 되는데(https://medium.com/androiddevelopers/5-tips-for-preparing-for-multi-window-in-android-n-7bed803dda64)

android:configChanges="screenSize|smallestScreenSize
|screenLayout|orientation"

이 경우에도 일부 단말에서는 재시작되는것을 확인하였다.

만일 앱을 세로나 가로로 고정해야 한다면 난감한 상황이 될것인데 이 런 경우는 그냥 멀티윈도우 기능을 끄는것이 나을것이다.

android:resizeableActivity="false"

애초에 멀티윈도우를 지원하고자 한다면 고정하지 않고 화면을 설계하는것이 나을것 같다.

자세한 내용은 아래 링크 참조

https://developer.android.com/guide/topics/ui/multi-window

Posted by 삼스
Windows2021. 2. 2. 09:04

서비스 프로젝트를 작성 후 배포하기 위해 서비스를 설치하고 설치 후 바로 서비스가 구동되도록 하는 방법에 대해 설명한다.

 

서비스프로젝트에 설치관련 클래스 추가

  1. 작성한 서비스.cs파일 더블클릭
  2. 도구상자에 ProjectInstaller 선택
  3. ServiceProcessInstaller, ServiceInstaller 생성됨

 

설치 프로젝트 추가

  1. 파일 -> 프로젝트 추가 > Setup Project
  2. 프로젝트 아이콘에 마우스우측 버튼 클릭
  3. Add -> 프로젝트 출력
  4. 추가할 프로젝트를 콤보박스에서 선택하고 기본출력을 선택
  5. View -> 사용자지정작업에서 Install, Commit, Rollback, Uninstall에 각각 마우스우측버튼 클릭 후 '사용자지정작업'으로 작성한 서비스프로젝트 추가
  6. 빌드 수행하면 msi와 setup.exe가 생성됨

 

설치 서비스 실행되도록

  1. ProjectInstaller.Designer.cs코드보기
  2. initializeComponent()에서 서비스설치 관련 파라메터 수정
  • ServiceName, DisplayName, Description
  • StartType : Automatic으로 설정
  • Committed 핸들러 오버라이드 등록

            this.serviceProcessInstaller1.Password = null;

            this.serviceProcessInstaller1.Username = null;

            this.serviceProcessInstaller1.Account = ServiceAccount.LocalSystem;

            this.serviceInstaller1.ServiceName = "My Service";

            this.serviceInstaller1.DisplayName = "My service";

            this.serviceInstaller1.Description = "This is My service";

            this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;

            this.Committed += new System.Configuration.Install.InstallEventHandler(MyServiceWindowsServiceInstaller_Committed);

 

  3. ProjectInstaller.cs 코드보기

  4. Committed 핸들러 오버라이드 수행

  • 서비스 컨트롤러 생성하여 서비스를 시작함.

        void MyServiceWindowsServiceInstaller_Committed(object sender, InstallEventArgs e)

        {

            // Auto Start the Service Once Installation is Finished.

            var controller = new ServiceController("MyService");

            controller.Start();

        }

 

 

Posted by 삼스