Use AppCompat theme.
This commit is contained in:
parent
fa86101b7c
commit
861255e2a9
9 changed files with 22 additions and 15 deletions
|
@ -11,7 +11,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.android.support:support-v4:22.0.0"
|
||||
compile "com.android.support:appcompat-v7:22.0.0"
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
androidTestCompile "com.android.support:multidex-instrumentation:1.0.1", { exclude module: "multidex" }
|
||||
compile "org.scala-lang:scala-library:2.11.6"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".activities.ConfirmAddContactActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:theme="@style/Translucent"
|
||||
android:excludeFromRecents="true" />
|
||||
|
||||
<activity
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/add_contact"
|
||||
android:title="@string/add_contacts"
|
||||
android:icon="@drawable/ic_action_add_person"
|
||||
android:showAsAction="ifRoom" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/settings"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<style name="AppTheme" parent="@android:style/Theme.Material.Light.DarkActionBar" />
|
||||
</resources>
|
|
@ -1,5 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<style name="AppTheme" parent="android:Theme.DeviceDefault.Light.DarkActionBar" />
|
||||
|
||||
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar" />
|
||||
|
||||
<style name="Translucent" parent="AppTheme">
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -29,7 +29,7 @@ class AddContactsActivity extends EnsiChatActivity with ChatService.OnConnection
|
|||
*/
|
||||
override def onCreate(savedInstanceState: Bundle): Unit = {
|
||||
super.onCreate(savedInstanceState)
|
||||
getActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
getSupportActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
setContentView(R.layout.activity_add_contacts)
|
||||
val list = findViewById(android.R.id.list).asInstanceOf[ListView]
|
||||
|
|
|
@ -3,12 +3,13 @@ package com.nutomic.ensichat.activities
|
|||
import android.app.Activity
|
||||
import android.content.{ComponentName, Context, Intent, ServiceConnection}
|
||||
import android.os.{Bundle, IBinder}
|
||||
import android.support.v7.app.ActionBarActivity
|
||||
import com.nutomic.ensichat.protocol.{ChatService, ChatServiceBinder}
|
||||
|
||||
/**
|
||||
* Connects to [[ChatService]] and provides access to it.
|
||||
*/
|
||||
class EnsiChatActivity extends Activity with ServiceConnection {
|
||||
class EnsiChatActivity extends ActionBarActivity with ServiceConnection {
|
||||
|
||||
private var chatService: Option[ChatService] = None
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ class MainActivity extends EnsiChatActivity {
|
|||
.detach(contactsFragment)
|
||||
.add(android.R.id.content, new ChatFragment(address))
|
||||
.commit()
|
||||
getActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
getSupportActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ class MainActivity extends EnsiChatActivity {
|
|||
.attach(contactsFragment)
|
||||
.commit()
|
||||
currentChat = None
|
||||
getActionBar.setDisplayHomeAsUpEnabled(false)
|
||||
getSupportActionBar.setDisplayHomeAsUpEnabled(false)
|
||||
setTitle(R.string.app_name)
|
||||
} else
|
||||
super.onBackPressed()
|
||||
|
|
|
@ -15,7 +15,7 @@ class SettingsActivity extends EnsiChatActivity {
|
|||
|
||||
override def onCreate(savedInstanceState: Bundle): Unit = {
|
||||
super.onCreate(savedInstanceState)
|
||||
getActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
getSupportActionBar.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
val fm = getFragmentManager
|
||||
fragment =
|
||||
|
|
Reference in a new issue