Added floating action button to add contacts (fixes #40).
This commit is contained in:
parent
1942986962
commit
6867b19380
7 changed files with 13 additions and 0 deletions
BIN
android/src/main/res/drawable-hdpi/ic_add_white_24dp.png
Normal file
BIN
android/src/main/res/drawable-hdpi/ic_add_white_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 B |
BIN
android/src/main/res/drawable-mdpi/ic_add_white_24dp.png
Normal file
BIN
android/src/main/res/drawable-mdpi/ic_add_white_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 B |
BIN
android/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
Normal file
BIN
android/src/main/res/drawable-xhdpi/ic_add_white_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 B |
BIN
android/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
Normal file
BIN
android/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 97 B |
BIN
android/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png
Normal file
BIN
android/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 102 B |
|
@ -72,6 +72,16 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_add_white_24dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.content.{BroadcastReceiver, Context, Intent, IntentFilter}
|
|||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.preference.PreferenceManager
|
||||
import android.support.design.widget.FloatingActionButton
|
||||
import android.support.v4.content.{ContextCompat, LocalBroadcastManager}
|
||||
import android.support.v7.widget.Toolbar
|
||||
import android.view.View.OnClickListener
|
||||
|
@ -70,6 +71,8 @@ class ContactsFragment extends ListFragment with OnClickListener {
|
|||
toolbar.setNavigationIcon(R.drawable.ic_launcher)
|
||||
title = v.findViewById(R.id.title).asInstanceOf[TextView]
|
||||
subtitle = v.findViewById(R.id.subtitle).asInstanceOf[TextView]
|
||||
val fab = v.findViewById(R.id.fab).asInstanceOf[FloatingActionButton]
|
||||
fab.setOnClickListener(this)
|
||||
updateConnections()
|
||||
v
|
||||
}
|
||||
|
|
Reference in a new issue