新增 夜间模式
This commit is contained in:
@@ -15,20 +15,20 @@
|
||||
<activity
|
||||
android:name=".execution.ScriptExecuteActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:theme="@style/AppTheme"/>
|
||||
android:theme="@style/ScriptTheme"/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name="com.stardust.autojs.core.permission.PermissionRequestActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:taskAffinity="com.stardust.autojs.runtime.api.image.ScreenCaptureRequestActivity"
|
||||
android:theme="@style/AppTheme.Transparent"/>
|
||||
android:theme="@style/ScriptTheme.Transparent"/>
|
||||
|
||||
<activity
|
||||
android:name="com.stardust.autojs.core.image.capture.ScreenCaptureRequestActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:taskAffinity="com.stardust.autojs.runtime.api.image.ScreenCaptureRequestActivity"
|
||||
android:theme="@style/AppTheme.Transparent"/>
|
||||
android:theme="@style/ScriptTheme.Transparent"/>
|
||||
|
||||
|
||||
</application>
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = function (runtime, global) {
|
||||
ui.setContentView(view);
|
||||
}
|
||||
|
||||
ui.layoutFile = layout(file){
|
||||
ui.layoutFile = function(file) {
|
||||
ui.layout(files.read(file));
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ConsoleView extends FrameLayout implements StardustConsole.LogListe
|
||||
|
||||
private void init() {
|
||||
inflate(getContext(), R.layout.console_view, this);
|
||||
mLogListRecyclerView = (RecyclerView) findViewById(R.id.log_list);
|
||||
mLogListRecyclerView = findViewById(R.id.log_list);
|
||||
LinearLayoutManager manager = new LinearLayoutManager(getContext());
|
||||
mLogListRecyclerView.setLayoutManager(manager);
|
||||
mLogListRecyclerView.setAdapter(new Adapter());
|
||||
@@ -79,7 +79,7 @@ public class ConsoleView extends FrameLayout implements StardustConsole.LogListe
|
||||
}
|
||||
|
||||
private void initSubmitButton() {
|
||||
final Button submit = (Button) findViewById(R.id.submit);
|
||||
final Button submit = findViewById(R.id.submit);
|
||||
submit.setOnClickListener(v -> {
|
||||
CharSequence input = mEditText.getText();
|
||||
submitInput(input);
|
||||
@@ -96,9 +96,9 @@ public class ConsoleView extends FrameLayout implements StardustConsole.LogListe
|
||||
}
|
||||
|
||||
private void initEditText() {
|
||||
mEditText = (EditText) findViewById(R.id.input);
|
||||
mEditText = findViewById(R.id.input);
|
||||
mEditText.setFocusableInTouchMode(true);
|
||||
mInputContainer = (LinearLayout) findViewById(R.id.input_container);
|
||||
mInputContainer = findViewById(R.id.input_container);
|
||||
OnClickListener listener = v -> {
|
||||
if (mWindow != null) {
|
||||
mWindow.requestWindowFocus();
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.stardust.autojs.util.FloatingPermission;
|
||||
import com.stardust.enhancedfloaty.FloatyService;
|
||||
import com.stardust.util.UiHandler;
|
||||
import com.stardust.util.ViewUtil;
|
||||
import com.stardust.util.ViewUtils;
|
||||
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class Floaty {
|
||||
public Floaty(UiHandler uiHandler, UI ui, ScriptRuntime runtime) {
|
||||
mUiHandler = uiHandler;
|
||||
mRuntime = runtime;
|
||||
mContext = new ContextThemeWrapper(mUiHandler.getContext(), R.style.AppTheme);
|
||||
mContext = new ContextThemeWrapper(mUiHandler.getContext(), R.style.ScriptTheme);
|
||||
mLayoutInflater = ui.getLayoutInflater();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
android:theme="@style/ScriptTheme.AppBarOverlay"
|
||||
app:popupTheme="@style/ScriptTheme.PopupOverlay">
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
@@ -6,19 +6,19 @@
|
||||
<item name="colorButtonNormal">#cc181818</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<style name="ScriptTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:popupTheme" tools:ignore="NewApi">@style/AppTheme.PopupOverlay</item>
|
||||
<item name="android:popupTheme" tools:ignore="NewApi">@style/ScriptTheme.PopupOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
<style name="ScriptTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
<style name="ScriptTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
|
||||
|
||||
<style name="AppTheme.Transparent" parent="AppTheme">
|
||||
<style name="ScriptTheme.Transparent" parent="ScriptTheme">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
|
||||
Reference in New Issue
Block a user