Add floating console support
This commit is contained in:
8
app/src/main/res/drawable/circle_cool_black.xml
Normal file
8
app/src/main/res/drawable/circle_cool_black.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thicknessRatio="2"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#161616"/>
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable/debug_console_icon_128.png
Normal file
BIN
app/src/main/res/drawable/debug_console_icon_128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#ddd2d3d5"/>
|
||||
<solid android:color="#99262626"/>
|
||||
|
||||
<corners android:radius="12dp"/>
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="12dp"/>
|
||||
</shape>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/colorPrimary"/>
|
||||
<solid android:color="#cc181818"/>
|
||||
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 82 B |
16
app/src/main/res/layout/console_view.xml
Normal file
16
app/src/main/res/layout/console_view.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:paddingLeft="3dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</merge>
|
||||
@@ -10,61 +10,65 @@
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/floating_console_bg_top"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
app:title="@string/text_console">
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical|left"
|
||||
android:maxLines="1"
|
||||
android:text="@string/text_console"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/minimize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="26dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_remove_white_24dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/minimize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_remove_white_24dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/move_or_resize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_settings_ethernet_white_24dp"
|
||||
android:tint="@android:color/white"/>
|
||||
<ImageView
|
||||
android:id="@+id/move_or_resize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_settings_ethernet_white_24dp"
|
||||
android:tint="@android:color/white"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_close_white_24dp"/>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_close_white_24dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.stardust.scriptdroid.external.floating_window.console.FloatingConsoleView
|
||||
<com.stardust.scriptdroid.ui.console.ConsoleView
|
||||
android:id="@+id/console"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -79,7 +83,7 @@
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/circle_color_primary"
|
||||
android:background="@drawable/circle_cool_black"
|
||||
android:padding="6dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_resizer"
|
||||
@@ -92,7 +96,7 @@
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/circle_color_primary"
|
||||
android:background="@drawable/circle_cool_black"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_move_cursor"
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/circle"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_android_eat_js_100"/>
|
||||
android:src="@drawable/debug_console_icon_128"/>
|
||||
</LinearLayout>
|
||||
@@ -14,6 +14,12 @@
|
||||
android:title="@string/text_console"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_force_stop"
|
||||
android:orderInCategory="250"
|
||||
android:title="@string/text_force_stop"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_help"
|
||||
android:orderInCategory="300"
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
<string name="key_guard_mode">key_guard_mode</string>
|
||||
<string name="text_console_floating_window">控制台悬浮窗</string>
|
||||
<string name="text_layout_inspector_is_dumping">布局分析中,请稍后点击</string>
|
||||
<string name="text_force_stop">强制停止</string>
|
||||
<string name="text_execution_finished" formatted="false">\n------------\n[%s]运行结束,用时%f秒</string>
|
||||
|
||||
<string-array name="record_control_keys">
|
||||
<item>无</item>
|
||||
|
||||
Reference in New Issue
Block a user