목록분류 전체보기 (134)
Foggy day
If an error occurs when you rotate screen, add this code in manifest activity that you want to apply rotation
Sha key is needed when we use api like google and kakao and so on. So, this article is about how to get debug/release SHA-1. First, get debug sha-1. It is very easy. double click "signingReport" If you find Tasks tab, follow below. 1. Android Studio -> Preference -> Experimental -> disable "Do not build Gradle task list during Gradle Sync" 2. File -> Sync Project with Gradle files Second. get re..
we often use base64 encode/decode. when i used base64, i just added base64 in import using alt + enter. import java.util.Base64; But if you add Base64 of java, codes using it need oreo version. The solution i found is android.Base64. In fact, there is no solution. Add Adroid.Base64 instead of java.Base64 import android.util.Base64;
To use vector asset image, min sdk must be at least 24. But If you add this code "vectorDrawables.useSupportLibrary = true" in gradle, minimum sdk need not be 24. defaultConfig { vectorDrawables.useSupportLibrary = true ... }
It is a sample code of DatePickerDialog. Here, you can limit maxDate, minDate and implement spinner DatePickerDialog. Also you can remove the specific type in datepickerdialog. private void setDatePicker() { b.tvTitleDate.setOnClickListener(view -> { Calendar c = Calendar.getInstance(); DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), android.R.style.Theme_Holo_Light_Dialo..
It is the code about How to get number of days in this month as using YearMonth Class. If you want to know number of days in this month, It is that. public static int getDayCountOfThisMonth() { Date date = new Date(); SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); String time = sf.format(date); YearMonth dayCount = YearMonth.from(LocalDate.parse(time, DateTimeFormatter.ofPattern("yyyy..
when there is Viewpager2 inside Viewpager2, ViewPager2 inside can't be swiped. You can see explanation of it in Google Doc. developer.android.com/training/animation/vp2-migration#nested-scrollables Support nested scrollable elements ViewPager2 does not natively support nested scroll views in cases where the scroll view has the same orientation as the ViewPager2 object that contains it. For examp..
This article is an example of LayoutParams. Sometimes, you want to change propertis of view like margin or width in code. It is for that. what we need to know to use LayoutParams is ViewGroup. There are FrameLayout, Linearlayout, ConstraintLayout and RelativeLayout as ViewGroup. we can include child view like TextView, Button, and EditText. To use LayoutParams, we have to access ViewGroup. If Vi..
When making app, we mostly use viewpager and tablayout, and appbar. Animation showing or hiding appbar in activity is not too difficult. But, Sometimes a slightly complicated UI bothers us. For example, there is a fragment A in the activity, and the AppBar, tablayout, and ViewPager ars in the A fragment. The VewPapger has fragments B, C, and D. In this structure what i want to do is an animation..
아래 링크의 글을 번역한 글입니다. vladsonkin.com/android-custom-view-extending-the-views/ Android Custom View: Extending The Views - vladsonkin.com Android has lots of different Views, and you can build almost any app with them. However, sometimes they will not fulfill your requirements, mostly if your design is filled with unusual elements and animations. To handle this case, Android gives us the pos vladson..