<ImageViewandroid:id="@android:id/icon"android:layout_width="48dp"android:layout_height="48dp"android:layout_gravity="center"android:paddingLeft="16dp"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_toEndOf="@android:id/title"android:layout_toStartOf="@id/iv_arrow_right"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><ImageViewandroid:id="@+id/iv_arrow_right"android:layout_width="32dp"android:layout_height="32dp"android:layout_centerVertical="true"android:layout_alignParentEnd="true"android:src="@drawable/ic_homepage_arrow_right"android:paddingLeft="16dp"/></RelativeLayout><!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" />
control_iconsize_preference_middle.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_middle" ><ImageViewandroid:id="@android:id/icon"android:layout_width="48dp"android:layout_height="48dp"android:layout_gravity="center"android:paddingLeft="16dp"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_toEndOf="@android:id/title"android:layout_toStartOf="@id/iv_arrow_right"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><ImageViewandroid:id="@+id/iv_arrow_right"android:layout_width="32dp"android:layout_height="32dp"android:layout_centerVertical="true"android:layout_alignParentEnd="true"android:src="@drawable/ic_homepage_arrow_right"android:paddingLeft="16dp"/></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_bottom.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_bottom" ><ImageViewandroid:id="@android:id/icon"android:layout_width="48dp"android:layout_height="48dp"android:layout_gravity="center"android:paddingLeft="16dp"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_toEndOf="@android:id/title"android:layout_toStartOf="@id/iv_arrow_right"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><ImageViewandroid:id="@+id/iv_arrow_right"android:layout_width="32dp"android:layout_height="32dp"android:layout_centerVertical="true"android:layout_alignParentEnd="true"android:src="@drawable/ic_homepage_arrow_right"android:paddingLeft="16dp"/></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_airplane.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_top" ><ImageViewandroid:id="@android:id/icon"android:layout_width="48dp"android:layout_height="48dp"android:layout_gravity="center"android:paddingLeft="16dp"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="6dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_below="@android:id/title"android:layout_alignStart="@android:id/title"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"android:maxLines="4" /></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_no_arrow_top.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_top" ><ImageViewandroid:id="@android:id/icon"android:layout_width="0dp"android:layout_height="0dp"android:layout_gravity="center"android:paddingLeft="0dp"android:visibility="gone"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"android:paddingStart="16dp"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_alignParentEnd="true"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><com.starkylin.settings.widget.tick.TickViewandroid:id="@+id/tick_view"android:layout_width="28dp"android:layout_height="28dp"android:layout_marginStart="5dp"android:layout_alignParentEnd="true"android:layout_centerVertical="true"android:visibility="gone"app:check_base_color="#00FFB7"app:check_tick_color="#00FFB7"app:rate="normal" /></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_no_arrow_middle.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_middle" ><ImageViewandroid:id="@android:id/icon"android:layout_width="0dp"android:layout_height="0dp"android:layout_gravity="center"android:paddingLeft="0dp"android:visibility="gone"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"android:paddingStart="16dp"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_alignParentEnd="true"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><com.starkylin.settings.widget.tick.TickViewandroid:id="@+id/tick_view"android:layout_width="28dp"android:layout_height="28dp"android:layout_marginStart="5dp"android:layout_alignParentEnd="true"android:layout_centerVertical="true"android:visibility="gone"app:check_base_color="#00FFB7"app:check_tick_color="#00FFB7"app:rate="normal" /></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_no_arrow_bottom.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"android:background="@drawable/card_style_bottom" ><ImageViewandroid:id="@android:id/icon"android:layout_width="0dp"android:layout_height="0dp"android:layout_gravity="center"android:paddingLeft="0dp"android:visibility="gone"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"android:paddingStart="16dp"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_alignParentEnd="true"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><com.starkylin.settings.widget.tick.TickViewandroid:id="@+id/tick_view"android:layout_width="28dp"android:layout_height="28dp"android:layout_marginStart="5dp"android:layout_alignParentEnd="true"android:layout_centerVertical="true"android:visibility="gone"app:check_base_color="#00FFB7"app:check_tick_color="#00FFB7"app:rate="normal" /></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"android:minHeight="58dp"android:gravity="center_vertical"android:background="@color/transparent"android:paddingEnd="?android:attr/scrollbarSize" ><ImageViewandroid:id="@android:id/icon"android:layout_width="0dp"android:layout_height="0dp"android:layout_gravity="center"android:paddingLeft="0dp"android:visibility="gone"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="18dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"android:paddingStart="16dp"><TextView android:id="@android:id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@android:id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_alignParentEnd="true"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><com.starkylin.settings.widget.tick.TickViewandroid:id="@+id/tick_view"android:layout_width="28dp"android:layout_height="28dp"android:layout_marginStart="5dp"android:layout_alignParentEnd="true"android:layout_centerVertical="true"android:visibility="gone"app:check_base_color="#00FFB7"app:check_tick_color="#00FFB7"app:rate="normal" /></RelativeLayout><!-- Preference should place its actual preference widget here. --><LinearLayout android:id="@android:id/widget_frame"android:layout_width="wrap_content"android:layout_height="match_parent"android:gravity="center_vertical"android:paddingEnd="16dp"android:orientation="vertical" /></LinearLayout>
control_iconsize_preference_satellite.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><!-- Layout for a Preference in a PreferenceActivity. ThePreference is able to place a specific widget for its particulartype in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"android:layout_height="wrap_content"android:minHeight="58dp"android:gravity="center_vertical"android:paddingEnd="?android:attr/scrollbarSize"><ImageViewandroid:id="@+id/icon"android:layout_width="48dp"android:layout_height="48dp"android:layout_gravity="center"android:paddingLeft="16dp"android:src="@drawable/starkylin_voice_communication"/><RelativeLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginStart="10dp"android:layout_marginEnd="16dp"android:layout_marginTop="1dp"android:layout_marginBottom="1dp"android:layout_weight="1"><TextView android:id="@+id/title"android:layout_width="wrap_content"android:layout_height="34dp"android:textSize="17sp"android:gravity="center_vertical"android:singleLine="true"android:textAppearance="?android:attr/textAppearanceLarge"android:ellipsize="marquee"android:fadingEdge="horizontal" /><TextView android:id="@+id/summary"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerVertical="true"android:layout_marginStart="5dp"android:gravity="end"android:maxLines="1"android:ellipsize="end"android:layout_toEndOf="@id/title"android:layout_toStartOf="@id/iv_arrow_right"android:textAppearance="?android:attr/textAppearanceSmall"android:textColor="?android:attr/textColorSecondary"/><ImageViewandroid:id="@+id/iv_arrow_right"android:layout_width="32dp"android:layout_height="32dp"android:layout_centerVertical="true"android:layout_alignParentEnd="true"android:src="@drawable/ic_homepage_arrow_right"android:paddingLeft="16dp"/></RelativeLayout></LinearLayout>
1、無頭瀏覽設置和規避爬蟲檢測
問題一:有界面時可以展示的元素,無頭模式報錯element not interactable
解決方法:通過錯誤截圖發現,頁面上有該元素,但是頁面不夠大,沒有顯示想定位的元素。
from seleni…