woong's

Android lolipop widget v7 사용하기 본문

Develop/Android

Android lolipop widget v7 사용하기

dlsdnd345 2016. 2. 14. 19:08
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

Android lolipop widget v7  사용하기


안녕하세요. android lolipop 부터 위젯들이 굉장히 이쁘게 바뀌었습니다.

하지만 하위 버젼에는 호환이 안되서 이쁘게 나타나지 않아서 사용을 하고 싶어도 안타깝게

사용을 못하는 경우가 많았습니다.


이게 언제부터 제공됬는지는 잘모르나, 찾아보니 v7 에서 widget을 제공해주고 있습니다.

완전한 애니메이션까지는 lolipop 처럼 제공은 안되나 거의 비슷하나 나타나서

사용하는데 문제가 없을것 같습니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff"
    android:orientation="vertical">
 
    <android.support.v7.widget.SwitchCompat
        android:id="@+id/compatSwitch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#ffffff" />
 
    <android.support.v7.widget.AppCompatButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
 
    <android.support.v7.widget.AppCompatCheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#ffffff" />
 
    <android.support.v7.widget.AppCompatRadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#ffffff" />
 
    <android.support.v7.widget.AppCompatRatingBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#ffffff" />
 
    <android.support.v7.widget.AppCompatEditText
        android:layout_width="100dp"
        android:layout_height="wrap_content" />
 
</LinearLayout>
cs



롤리팝 하위 버젼의 화면 입니다.



Comments