mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-17 12:00:39 +01:00
start rewriting the Edit screen too
This commit is contained in:
parent
9ad96061a9
commit
61f17de7f4
@ -103,7 +103,8 @@
|
||||
|
||||
<activity
|
||||
android:name=".activities.EditContactActivity"
|
||||
android:parentActivityName=".activities.MainActivity">
|
||||
android:parentActivityName=".activities.MainActivity"
|
||||
android:theme="@style/TranslucentTheme">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.EDIT"/>
|
||||
|
@ -5,15 +5,14 @@ import android.content.ClipData
|
||||
import android.content.ContentValues
|
||||
import android.content.Intent
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.provider.ContactsContract.CommonDataKinds
|
||||
import android.provider.ContactsContract.CommonDataKinds.*
|
||||
import android.provider.MediaStore
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.*
|
||||
import android.widget.EditText
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
@ -60,6 +59,7 @@ class EditContactActivity : ContactActivity() {
|
||||
private var originalContactSource = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
useDynamicTheme = false
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_edit_contact)
|
||||
|
||||
@ -67,6 +67,9 @@ class EditContactActivity : ContactActivity() {
|
||||
return
|
||||
}
|
||||
|
||||
contact_wrapper.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
contact_wrapper.background = ColorDrawable(config.backgroundColor)
|
||||
|
||||
val action = intent.action
|
||||
isThirdPartyIntent = action == Intent.ACTION_EDIT || action == Intent.ACTION_INSERT || action == ADD_NEW_CONTACT_NUMBER
|
||||
val isFromSimpleContacts = intent.getBooleanExtra(IS_FROM_SIMPLE_CONTACTS, false)
|
||||
@ -91,6 +94,11 @@ class EditContactActivity : ContactActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
window.statusBarColor = Color.TRANSPARENT
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_edit_contact, menu)
|
||||
if (wasActivityInitialized) {
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/contact_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/contact_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -49,8 +54,8 @@
|
||||
android:layout_height="@dimen/contact_actions_size"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_email_vector" />
|
||||
|
||||
@ -61,8 +66,8 @@
|
||||
android:layout_marginStart="@dimen/normal_margin"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_phone_vector" />
|
||||
|
||||
@ -73,8 +78,8 @@
|
||||
android:layout_marginStart="@dimen/normal_margin"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_sms_vector" />
|
||||
|
||||
@ -536,4 +541,5 @@
|
||||
tools:text="hello@simplemobiletools.com" />
|
||||
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
|
@ -59,8 +59,8 @@
|
||||
android:layout_height="@dimen/contact_actions_size"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_email_vector" />
|
||||
|
||||
@ -71,8 +71,8 @@
|
||||
android:layout_marginStart="@dimen/normal_margin"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_phone_vector" />
|
||||
|
||||
@ -83,8 +83,8 @@
|
||||
android:layout_marginStart="@dimen/normal_margin"
|
||||
android:adjustViewBounds="true"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:paddingEnd="@dimen/small_margin"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_sms_vector" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user