add a Fab button

This commit is contained in:
tibbi 2016-08-13 17:07:03 +02:00
parent ac3492880d
commit 9eef8a5c55
8 changed files with 13 additions and 3 deletions
app
build.gradle
src/main
kotlin/com/simplemobiletools/applauncher/activities
res
layout
mipmap-hdpi
mipmap-mdpi
mipmap-xhdpi
mipmap-xxhdpi
mipmap-xxxhdpi

@ -29,6 +29,7 @@ dependencies {
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }

@ -27,6 +27,7 @@ class MainActivity : SimpleActivity() {
startActivity(viewIntent("https://play.google.com/store/apps/details?id=" + it.pkgName)) startActivity(viewIntent("https://play.google.com/store/apps/details?id=" + it.pkgName))
} }
} }
fab.setOnClickListener { }
} }
override fun onCreateOptionsMenu(menu: Menu?): Boolean { override fun onCreateOptionsMenu(menu: Menu?): Boolean {

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <android.support.design.widget.CoordinatorLayout
android:id="@+id/grid_holder" android:id="@+id/coordinator_layout"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -16,4 +16,12 @@
app:layoutManager="android.support.v7.widget.GridLayoutManager" app:layoutManager="android.support.v7.widget.GridLayoutManager"
app:spanCount="@integer/columns"/> app:spanCount="@integer/columns"/>
</RelativeLayout> <android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin"
android:src="@mipmap/plus"/>
</android.support.design.widget.CoordinatorLayout>

Binary file not shown.

After

(image error) Size: 232 B

Binary file not shown.

After

(image error) Size: 148 B

Binary file not shown.

After

(image error) Size: 185 B

Binary file not shown.

After

(image error) Size: 292 B

Binary file not shown.

After

(image error) Size: 269 B