Improved dark theme

This commit is contained in:
Sylvain Berfini 2019-03-04 21:20:02 +01:00
parent 80cddbfb6c
commit 7360c1f832
40 changed files with 206 additions and 183 deletions

View file

@ -58,8 +58,8 @@ import org.linphone.R;
import org.linphone.core.tools.Log;
import org.linphone.mediastream.Version;
import org.linphone.utils.FileUtils;
import org.linphone.utils.ImageUtils;
import org.linphone.utils.LinphoneUtils;
import org.linphone.views.ContactAvatar;
public class ContactEditorFragment extends Fragment {
private static final int ADD_PHOTO = 1337;
@ -311,13 +311,9 @@ public class ContactEditorFragment extends Fragment {
mContactPicture = mView.findViewById(R.id.contact_picture);
if (mContact != null) {
ImageUtils.setImagePictureFromUri(
getActivity(),
mContactPicture,
mContact.getPhotoUri(),
mContact.getThumbnailUri());
ContactAvatar.displayAvatar(mContact, mView.findViewById(R.id.avatar_layout));
} else {
ImageUtils.setDefaultContactImage(mContactPicture);
ContactAvatar.displayAvatar("", mView.findViewById(R.id.avatar_layout));
}
mContactPicture.setOnClickListener(

View file

@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import androidx.appcompat.app.AppCompatDelegate;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
@ -1432,13 +1433,15 @@ public class LinphonePreferences {
}
public boolean isDarkModeEnabled() {
return /*AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES
&& */ getConfig().getBool("app", "dark_mode", false);
return getConfig()
.getBool(
"app",
"dark_mode",
AppCompatDelegate.getDefaultNightMode()
== AppCompatDelegate.MODE_NIGHT_YES);
}
public void enableDarkMode(boolean enable) {
/*AppCompatDelegate.setDefaultNightMode(
enable ? AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_NO);*/
getConfig().setBool("app", "dark_mode", enable);
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@color/colorD" />
<item android:state_enabled="false"
android:drawable="@color/colorC" />
<item android:state_selected="true"
android:drawable="@color/colorC" />
<item
android:drawable="@color/colorC" />
</selector>

View file

@ -4,7 +4,8 @@
android:drawable="@color/colorE" />
<item android:state_enabled="false"
android:drawable="@color/colorF" />
<item android:state_selected="true"
android:drawable="@color/colorF" />
<item
android:drawable="@color/colorF" />
</selector>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@color/colorE" />
<item android:state_selected="true"
android:drawable="@color/colorF" />
<item
android:drawable="@color/colorF" />
</selector>

View file

@ -119,7 +119,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:text="@string/menu_send_log" />
<Button
@ -128,7 +128,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:text="@string/menu_reset_log" />
</LinearLayout>

View file

@ -278,7 +278,7 @@
android:id="@+id/video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_switch_video"
android:padding="20dp"
android:src="@drawable/camera" />
@ -299,7 +299,7 @@
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_micro"
android:padding="10dp"
android:src="@drawable/micro" />
@ -314,7 +314,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_speaker"
android:padding="15dp"
android:src="@drawable/speaker" />
@ -324,7 +324,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_audio_route"
android:padding="15dp"
android:src="@drawable/routes"
@ -335,7 +335,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/audio_route"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_bluetooth"
android:padding="15dp"
android:src="@drawable/route_bluetooth"
@ -346,7 +346,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/route_bluetooth"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_earpiece"
android:padding="15dp"
android:src="@drawable/route_earpiece"
@ -357,7 +357,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/route_earpiece"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_speaker"
android:padding="15dp"
android:src="@drawable/route_speaker"
@ -375,7 +375,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_call_options"
android:padding="15dp"
android:src="@drawable/options" />
@ -385,7 +385,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/options"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_record_call"
android:padding="15dp"
android:src="@drawable/options_rec"
@ -396,7 +396,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/record_call"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_call"
android:padding="15dp"
android:src="@drawable/options_add_call"
@ -407,7 +407,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/add_call"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_transfer"
android:padding="15dp"
android:src="@drawable/options_transfer_call"
@ -418,7 +418,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/transfer"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_conference"
android:padding="15dp"
android:src="@drawable/options_start_conference"

View file

@ -83,7 +83,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />

View file

@ -34,10 +34,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_dialer_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/top_bar_title"

View file

@ -81,7 +81,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />

View file

@ -34,10 +34,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_dialer_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/top_bar_title"

View file

@ -81,7 +81,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />

View file

@ -34,10 +34,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_dialer_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/top_bar_title"

View file

@ -103,21 +103,23 @@
<Button
android:id="@+id/send_log"
style="android:attr/buttonBarButtonStyleStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:background="@drawable/assistant_button"
android:textColor="@drawable/assistant_button_text_color"
style="@style/font8"
android:padding="10dp"
android:text="@string/menu_send_log" />
<Button
android:id="@+id/reset_log"
style="android:attr/buttonBarButtonStyleStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/button_background"
android:background="@drawable/assistant_button"
android:textColor="@drawable/assistant_button_text_color"
style="@style/font8"
android:padding="10dp"
android:text="@string/menu_reset_log" />

View file

@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:background="@color/colorF"
android:background="?attr/lighToolbarBackgroundColor"
android:orientation="horizontal">
<ImageView
@ -12,10 +12,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
style="@style/font1"

View file

@ -219,7 +219,7 @@
android:id="@+id/video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_switch_video"
android:padding="20dp"
android:src="@drawable/camera" />
@ -240,7 +240,7 @@
android:layout_width="0dp"
android:layout_height="60dp"
android:layout_weight="0.25"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_micro"
android:padding="10dp"
android:src="@drawable/micro" />
@ -255,7 +255,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_speaker"
android:padding="15dp"
android:src="@drawable/speaker" />
@ -265,7 +265,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_audio_route"
android:padding="15dp"
android:src="@drawable/routes"
@ -276,7 +276,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/audio_route"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_bluetooth"
android:padding="15dp"
android:src="@drawable/route_bluetooth"
@ -287,7 +287,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/route_bluetooth"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_earpiece"
android:padding="15dp"
android:src="@drawable/route_earpiece"
@ -298,7 +298,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/route_earpiece"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_speaker"
android:padding="15dp"
android:src="@drawable/route_speaker"
@ -316,7 +316,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_call_options"
android:padding="15dp"
android:src="@drawable/options" />
@ -326,7 +326,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/options"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_record_call"
android:padding="15dp"
android:src="@drawable/options_rec"
@ -337,7 +337,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/record_call"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_call"
android:padding="15dp"
android:src="@drawable/options_add_call"
@ -348,7 +348,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/add_call"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_transfer"
android:padding="15dp"
android:src="@drawable/options_transfer_call"
@ -359,7 +359,7 @@
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/transfer"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_conference"
android:padding="15dp"
android:src="@drawable/options_start_conference"

View file

@ -106,7 +106,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_micro"
android:padding="10dp"
android:src="@drawable/micro" />
@ -116,7 +116,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/button_background"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_toggle_speaker"
android:padding="15dp"
android:src="@drawable/speaker" />

View file

@ -21,10 +21,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<LinearLayout
android:layout_width="0dp"
@ -58,10 +59,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back_call"
android:padding="15dp"
android:src="@drawable/call_back"
android:tint="?attr/drawableDarkModeTintColor"
android:visibility="gone" />
<ImageView
@ -69,27 +71,29 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_call"
android:padding="15dp"
android:src="@drawable/call_alt_start" />
android:src="@drawable/call_alt_start"
android:tint="?attr/drawableDarkModeTintColor" />
<ImageView
android:id="@+id/group_infos"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_conversation_infos"
android:padding="15dp"
android:src="@drawable/chat_room_group_infos" />
android:src="@drawable/chat_room_group_infos"
android:tint="?attr/drawableDarkModeTintColor" />
<ImageView
android:id="@+id/edit"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit_list"
android:padding="15dp"
android:src="@drawable/delete" />

View file

@ -22,10 +22,11 @@
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_weight="1"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<LinearLayout
android:layout_width="0dp"
@ -72,7 +73,7 @@
android:id="@+id/all_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_all_contacts"
android:padding="15dp"
android:src="@drawable/contacts_all" />
@ -95,7 +96,7 @@
android:id="@+id/linphone_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_linphone_contacts"
android:gravity="center"
android:padding="15dp"
@ -116,7 +117,7 @@
android:layout_height="match_parent"
android:layout_gravity="right"
android:layout_weight="1"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_valid"
android:padding="18dp"
android:src="@drawable/chat_room_creation_next"
@ -151,7 +152,7 @@
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="5dp"
android:background="@drawable/resizable_textfield"
android:background="?attr/lighToolbarBackgroundColor"
android:fadeScrollbars="false"
android:lines="1">
@ -164,6 +165,7 @@
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:scrollIndicators="bottom" />
</HorizontalScrollView>
<RelativeLayout

View file

@ -44,7 +44,8 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="10dp"
android:src="@drawable/chevron_list_close" />
android:src="@drawable/chevron_list_close"
android:tint="?attr/drawableDarkModeTintColor"/>
</RelativeLayout>

View file

@ -21,30 +21,24 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/title"
style="@style/toolbar_small_title_font"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:layout_weight="0.8"
android:ellipsize="marquee"
android:gravity="center"
android:padding="15dp"
android:singleLine="true"
android:text="@string/group_chat_room_devices" />
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:padding="15dp"
android:visibility="invisible" />
</LinearLayout>
</RelativeLayout>

View file

@ -21,7 +21,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />

View file

@ -21,7 +21,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />

View file

@ -22,10 +22,11 @@
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
style="@style/toolbar_small_title_font"
@ -43,10 +44,11 @@
android:layout_height="match_parent"
android:layout_gravity="right"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_valid"
android:padding="18dp"
android:src="@drawable/chat_room_creation_confirm" />
android:src="@drawable/chat_room_creation_confirm"
android:tint="?attr/drawableDarkModeTintColor" />
</LinearLayout>
@ -75,7 +77,7 @@
android:id="@+id/addParticipantsLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorG"
android:background="?attr/lighToolbarBackgroundColor"
android:paddingTop="8dp"
android:paddingBottom="8dp">
@ -84,7 +86,7 @@
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/chat_room_participants"
android:textColor="@color/colorB"
android:textColor="?attr/primaryTextColor"
android:textSize="15sp"
android:textStyle="bold" />

View file

@ -21,30 +21,33 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_new_discussion"
android:padding="15dp"
android:src="@drawable/chat_new" />
android:src="@drawable/chat_new"
android:tint="?attr/drawableDarkModeTintColor" />
<ImageView
android:id="@+id/new_group_discussion"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_new_discussion"
android:padding="15dp"
android:src="@drawable/chat_group_new" />
android:src="@drawable/chat_group_new"
android:tint="?attr/drawableDarkModeTintColor"/>
<ImageView
android:id="@+id/back_in_call"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back_call"
android:padding="15dp"
android:src="@drawable/call_back"
android:tint="?attr/drawableDarkModeTintColor"
android:visibility="invisible" />
<View
@ -57,10 +60,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit_list"
android:padding="15dp"
android:src="@drawable/delete" />
android:src="@drawable/delete"
android:tint="?attr/drawableDarkModeTintColor" />
</LinearLayout>
<include layout="@layout/edit_list" />

View file

@ -20,10 +20,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<View
android:layout_width="0dp"
@ -35,7 +36,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_delete"
android:padding="15dp"
android:src="@drawable/delete" />
@ -45,10 +46,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit"
android:padding="15dp"
android:src="@drawable/edit" />
android:src="@drawable/edit"
android:tint="?attr/drawableDarkModeTintColor" />
</LinearLayout>

View file

@ -16,10 +16,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_cancel_button"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:src="@drawable/cancel_edit"
android:tint="?attr/drawableDarkModeTintColor" />
<View
android:layout_width="0dp"
@ -31,7 +32,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_delete"
android:padding="15dp"
android:src="@drawable/delete" />
@ -41,10 +42,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_valid"
android:padding="18dp"
android:src="@drawable/valid" />
android:src="@drawable/valid"
android:tint="?attr/drawableDarkModeTintColor" />
</LinearLayout>
@ -73,24 +75,7 @@
android:layout_height="wrap_content"
android:gravity="center">
<ImageView
android:id="@+id/contact_picture"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"
android:adjustViewBounds="true"
android:contentDescription="@string/content_description_contact_picture"
android:src="@drawable/avatar" />
<ImageView
android:id="@+id/mask"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"
android:adjustViewBounds="true"
android:src="@drawable/avatar_mask" />
<include layout="@layout/contact_avatar_big" />
</RelativeLayout>

View file

@ -21,7 +21,7 @@
android:id="@+id/all_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_all_contacts"
android:padding="15dp"
android:src="@drawable/contacts_all" />
@ -44,7 +44,7 @@
android:id="@+id/linphone_contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_linphone_contacts"
android:gravity="center"
android:padding="15dp"
@ -69,7 +69,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_new_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />
@ -79,7 +79,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit_list"
android:padding="15dp"
android:src="@drawable/delete" />
@ -103,8 +103,7 @@
android:inputType="textPersonName"
android:paddingRight="5dp"
android:queryBackground="@android:color/transparent"
android:queryHint="@string/chat_room_creation_filter_hint"
android:textColor="@color/colorC" />
android:queryHint="@string/chat_room_creation_filter_hint"/>
</RelativeLayout>

View file

@ -76,7 +76,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />

View file

@ -12,10 +12,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_cancel_button"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:src="@drawable/cancel_edit"
android:tint="?attr/drawableDarkModeTintColor" />
<View
android:layout_width="0dp"
@ -27,20 +28,22 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_select_all"
android:padding="15dp"
android:src="@drawable/select_all" />
android:src="@drawable/select_all"
android:tint="?attr/drawableDarkModeTintColor" />
<ImageView
android:id="@+id/deselect_all"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_deselect_all"
android:padding="15dp"
android:src="@drawable/deselect_all"
android:tint="?attr/drawableDarkModeTintColor"
android:visibility="gone" />
<ImageView
@ -48,7 +51,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_delete_selection"
android:padding="15dp"
android:src="@drawable/delete" />

View file

@ -25,7 +25,7 @@
android:id="@+id/all_calls"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_all_contacts"
android:padding="15dp"
android:src="@drawable/history_all" />
@ -48,7 +48,7 @@
android:id="@+id/missed_calls"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_linphone_contacts"
android:gravity="center"
android:padding="15dp"
@ -73,7 +73,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit_list"
android:padding="15dp"
android:src="@drawable/delete" />

View file

@ -21,10 +21,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<View
android:layout_width="0dp"
@ -36,7 +37,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_add_contact"
android:padding="15dp"
android:src="@drawable/contact_add" />
@ -46,10 +47,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_contacts"
android:padding="15dp"
android:src="@drawable/contact"
android:tint="?attr/drawableDarkModeTintColor"
android:visibility="gone" />
</LinearLayout>

View file

@ -27,7 +27,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
@ -45,7 +45,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_dialer_back"
android:padding="15dp"
android:src="@drawable/dialer_back" />

View file

@ -34,10 +34,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_dialer_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/top_bar_title"

View file

@ -17,10 +17,11 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_back"
android:padding="18dp"
android:src="@drawable/back" />
android:src="@drawable/back"
android:tint="?attr/drawableDarkModeTintColor" />
<TextView
android:id="@+id/top_bar_title"
@ -38,7 +39,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="@drawable/toolbar_button"
android:background="?attr/button_background_drawable"
android:contentDescription="@string/content_description_edit_list"
android:padding="15dp"
android:src="@drawable/delete" />

View file

@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="35dp"
android:background="@color/colorG"
android:background="?attr/backgroundColor"
android:gravity="center">
<TextView
@ -25,5 +25,7 @@
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/backgroundColor" />
android:layout_alignParentBottom="true"
android:background="?attr/dividerColor" />
</RelativeLayout>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="45dp">

View file

@ -6,20 +6,11 @@
android:background="?attr/lighToolbarBackgroundColor"
android:contentDescription="@string/content_description_default_account">
<ImageView
android:id="@+id/main_account_avatar"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:src="@drawable/avatar" />
<LinearLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/main_account_avatar"
android:layout_marginLeft="10dp"
android:gravity="center_vertical"
android:orientation="vertical">
@ -47,4 +38,10 @@
android:padding="5dp"
android:src="@drawable/led_connected" />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:background="?attr/dividerColor" />
</RelativeLayout>

View file

@ -18,5 +18,6 @@
<attr name="lighToolbarTextColor" format="color"/>
<attr name="darkToolbarBackgroundColor" format="color"/>
<attr name="darkToolbarTextColor" format="color"/>
<attr name="button_background_drawable" format="reference" />
</declare-styleable>
</resources>

View file

@ -2,6 +2,14 @@
<resources>
<style name="LinphoneStyleLight" parent="Theme.AppCompat.NoActionBar">
<!-- Android theme override -->
<item name="colorAccent">@color/colorA</item>
<item name="android:textColorPrimary">@color/colorC</item>
<item name="android:textColorSecondary">@color/colorH</item>
<item name="android:textColorHint">@color/colorE</item>
<item name="android:colorBackground">@color/colorH</item>
<item name="android:textColorPrimaryInverse">@color/colorH</item>
<item name="accentColor">@color/colorA</item>
<item name="accentTextColor">@color/colorH</item>
<item name="primaryTextColor">@color/colorC</item>
@ -19,9 +27,17 @@
<item name="lighToolbarTextColor">@color/colorC</item>
<item name="darkToolbarBackgroundColor">@color/colorC</item>
<item name="darkToolbarTextColor">@color/colorH</item>
<item name="button_background_drawable">@drawable/button_background_light</item>
</style>
<style name="LinphoneStyleDark" parent="Theme.AppCompat.NoActionBar">
<style name="LinphoneStyleDark" parent="LinphoneStyleLight">
<!-- Android theme override -->
<item name="android:textColorPrimary">@color/colorH</item>
<item name="android:textColorSecondary">@color/colorC</item>
<item name="android:textColorHint">@color/colorF</item>
<item name="android:colorBackground">@color/colorC</item>
<item name="android:textColorPrimaryInverse">@color/colorC</item>
<item name="accentColor">@color/colorA</item>
<item name="accentTextColor">@color/colorH</item>
<item name="primaryTextColor">@color/colorH</item>
@ -32,15 +48,15 @@
<item name="drawableDarkModeTintColor">@color/colorH</item>
<!-- Same value for now -->
<item name="dividerColor">@color/colorE</item>
<item name="drawableTintColor">@color/colorC</item>
<item name="drawableTintDisabledColor">@color/colorDisabled</item>
<item name="drawableTintColor">@color/colorH</item>
<item name="drawableTintDisabledColor">@color/colorE</item>
<item name="drawableTintOverColor">@color/colorA</item>
<item name="lighToolbarBackgroundColor">@color/colorF</item>
<item name="lighToolbarBackgroundColor">@color/colorC</item>
<item name="lighToolbarBackgroundDisabledColor">@color/colorE</item>
<item name="lighToolbarTextColor">@color/colorC</item>
<item name="lighToolbarTextColor">@color/colorH</item>
<item name="darkToolbarBackgroundColor">@color/colorC</item>
<item name="darkToolbarTextColor">@color/colorH</item>
<item name="button_background_drawable">@drawable/button_background_dark</item>
</style>
<style name="main_account_font" parent="@android:style/TextAppearance.Medium">
@ -84,7 +100,7 @@
</style>
<style name="toolbar_small_title_font" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorC</item>
<item name="android:textColor">?attr/primaryTextColor</item>
<item name="android:textSize">18sp</item>
</style>
@ -146,7 +162,7 @@
</style>
<style name="font13" parent="@android:style/TextAppearance.Medium">
<item name="android:textColor">@color/colorE</item>
<item name="android:textColor">?attr/primarySubtextLightColor</item>
<item name="android:textSize">13sp</item>
</style>