MainActivity.java

1
2
3
4
5
    public void mOnMenuClick(View v){
        //접근성 설정화면으로 이동
        Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
        startActivity(intent);
    }
cs



activity_main.xml

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
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">
 
    <LinearLayout
        android:paddingBottom="8dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="접근성 설정화면으로 이동" />
    </LinearLayout>
 
    <LinearLayout
        android:gravity="center_horizontal"
        android:paddingBottom="8dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <Button
            android:text="접근성 이동"
            android:layout_gravity="center_horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="mOnMenuClick" />
    </LinearLayout>
 
</LinearLayout>
 
cs



결과

 


+ Recent posts