Commit 788daa59 authored by Roumen Petrov's avatar Roumen Petrov
Browse files

FileSelection as "Compat" application

TextAppearance.AppCompat.Large requires activity to use "Compat" theme to avoid on old devices exception "Can't convert to color: type=0x2"
parent 77d6eed5
......@@ -141,7 +141,8 @@
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:label="@string/addshortcut_button_find_command"
android:launchMode="singleTop">
android:launchMode="singleTop"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.PICK"/>
<category android:name="android.intent.category.DEFAULT"/>
......
......@@ -16,12 +16,12 @@
package com.termoneplus.shortcuts;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.IntDef;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.view.KeyEvent;
import android.view.LayoutInflater;
......@@ -38,7 +38,7 @@
import jackpal.androidterm.R;
public class FileSelection extends Activity {
public class FileSelection extends AppCompatActivity {
private String STATE_CWD = "CWD";
private String cwd; // current working directory
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2017 Roumen Petrov. All rights reserved.
Licensed 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 at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed 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 and
limitations under the License.
-->
<resources>
<color name="colorPrimary">#607D8B</color>
<color name="colorPrimaryDark">#455A64</color>
<color name="colorAccent">#8BC34A</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
Copyright (c) 2017 Roumen Petrov. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -30,5 +31,18 @@
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>
</resources>
<!-- "Compat" application themes ... -->
<style name="AppTheme" parent="Theme.AppCompat">
<!-- Customize TermOnePlus theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment