Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Commit e5c1dd0

Browse files
committed
First version
- Sample - OMFM Library
0 parents  commit e5c1dd0

File tree

65 files changed

+1343
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1343
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
7+
android {
8+
compileSdkVersion 26
9+
buildToolsVersion "26.0.1"
10+
defaultConfig {
11+
applicationId "com.dekoservidoni.omfmsample"
12+
minSdkVersion 16
13+
targetSdkVersion 26
14+
versionCode 1
15+
versionName "1.0"
16+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17+
}
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
}
25+
26+
dependencies {
27+
implementation fileTree(include: ['*.jar'], dir: 'libs')
28+
implementation 'com.android.support:appcompat-v7:26.1.0'
29+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
30+
implementation 'com.android.support:design:26.1.0'
31+
testImplementation 'junit:junit:4.12'
32+
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
33+
exclude group: 'com.android.support', module: 'support-annotations'
34+
})
35+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
36+
implementation project(':omfm')
37+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.dekoservidoni.omfmsample
2+
3+
import android.support.test.InstrumentationRegistry
4+
import android.support.test.runner.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getTargetContext()
22+
assertEquals("com.dekoservidoni.omfmsample", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.dekoservidoni.omfmsample">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity
13+
android:name=".MainActivity"
14+
android:label="@string/app_name"
15+
android:theme="@style/AppTheme.NoActionBar">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN" />
18+
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.dekoservidoni.omfmsample
2+
3+
import android.os.Bundle
4+
import android.support.design.widget.Snackbar
5+
import android.support.v7.app.AppCompatActivity
6+
import android.view.View
7+
import com.dekoservidoni.omfm.OneMoreFabMenu
8+
9+
import kotlinx.android.synthetic.main.activity_main.*
10+
import kotlinx.android.synthetic.main.content_main.*
11+
12+
class MainActivity : AppCompatActivity(), OneMoreFabMenu.OptionsClick {
13+
14+
override fun onCreate(savedInstanceState: Bundle?) {
15+
super.onCreate(savedInstanceState)
16+
setContentView(R.layout.activity_main)
17+
setSupportActionBar(toolbar)
18+
19+
fab.setOptionsClick(this@MainActivity)
20+
}
21+
22+
override fun onOptionClick(optionId: Int?) {
23+
24+
var text = ""
25+
26+
when(optionId) {
27+
R.id.option1 -> text = "Option 1 clicked!"
28+
R.id.option2 -> text = "Option 2 clicked!"
29+
R.id.option3 -> text = "Option 3 clicked!"
30+
R.id.option4 -> text = "Option 4 clicked!"
31+
}
32+
33+
if(text.isNotEmpty()) {
34+
Snackbar.make(fragment.view as View, text, Snackbar.LENGTH_SHORT)
35+
.setAction("Done", null).show()
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.dekoservidoni.omfmsample
2+
3+
import android.support.v4.app.Fragment
4+
import android.os.Bundle
5+
import android.view.LayoutInflater
6+
import android.view.View
7+
import android.view.ViewGroup
8+
9+
/**
10+
* A placeholder fragment containing a simple view.
11+
*/
12+
class MainActivityFragment : Fragment() {
13+
14+
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
15+
savedInstanceState: Bundle?): View? {
16+
return inflater.inflate(R.layout.fragment_main, container, false)
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
8+
android:fillColor="#FFFFFF"/>
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:pathData="M22,5.72l-4.6,-3.86 -1.29,1.53 4.6,3.86L22,5.72zM7.88,3.39L6.6,1.86 2,5.71l1.29,1.53 4.59,-3.85zM12.5,8L11,8v6l4.75,2.85 0.75,-1.23 -4,-2.37L12.5,8zM12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"
8+
android:fillColor="#FFFFFF"/>
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportHeight="108.0"
6+
android:viewportWidth="108.0">
7+
<path
8+
android:fillColor="#26A69A"
9+
android:pathData="M0,0h108v108h-108z"
10+
android:strokeColor="#66FFFFFF"
11+
android:strokeWidth="0.8" />
12+
<path
13+
android:fillColor="#00000000"
14+
android:pathData="M19,0L19,108"
15+
android:strokeColor="#33FFFFFF"
16+
android:strokeWidth="0.8" />
17+
<path
18+
android:fillColor="#00000000"
19+
android:pathData="M9,0L9,108"
20+
android:strokeColor="#66FFFFFF"
21+
android:strokeWidth="0.8" />
22+
<path
23+
android:fillColor="#00000000"
24+
android:pathData="M39,0L39,108"
25+
android:strokeColor="#66FFFFFF"
26+
android:strokeWidth="0.8" />
27+
<path
28+
android:fillColor="#00000000"
29+
android:pathData="M29,0L29,108"
30+
android:strokeColor="#66FFFFFF"
31+
android:strokeWidth="0.8" />
32+
<path
33+
android:fillColor="#00000000"
34+
android:pathData="M59,0L59,108"
35+
android:strokeColor="#66FFFFFF"
36+
android:strokeWidth="0.8" />
37+
<path
38+
android:fillColor="#00000000"
39+
android:pathData="M49,0L49,108"
40+
android:strokeColor="#66FFFFFF"
41+
android:strokeWidth="0.8" />
42+
<path
43+
android:fillColor="#00000000"
44+
android:pathData="M79,0L79,108"
45+
android:strokeColor="#66FFFFFF"
46+
android:strokeWidth="0.8" />
47+
<path
48+
android:fillColor="#00000000"
49+
android:pathData="M69,0L69,108"
50+
android:strokeColor="#66FFFFFF"
51+
android:strokeWidth="0.8" />
52+
<path
53+
android:fillColor="#00000000"
54+
android:pathData="M89,0L89,108"
55+
android:strokeColor="#33FFFFFF"
56+
android:strokeWidth="0.8" />
57+
<path
58+
android:fillColor="#00000000"
59+
android:pathData="M99,0L99,108"
60+
android:strokeColor="#66FFFFFF"
61+
android:strokeWidth="0.8" />
62+
<path
63+
android:fillColor="#00000000"
64+
android:pathData="M0,89L108,89"
65+
android:strokeColor="#33FFFFFF"
66+
android:strokeWidth="0.8" />
67+
<path
68+
android:fillColor="#00000000"
69+
android:pathData="M0,99L108,99"
70+
android:strokeColor="#66FFFFFF"
71+
android:strokeWidth="0.8" />
72+
<path
73+
android:fillColor="#00000000"
74+
android:pathData="M0,69L108,69"
75+
android:strokeColor="#66FFFFFF"
76+
android:strokeWidth="0.8" />
77+
<path
78+
android:fillColor="#00000000"
79+
android:pathData="M0,79L108,79"
80+
android:strokeColor="#66FFFFFF"
81+
android:strokeWidth="0.8" />
82+
<path
83+
android:fillColor="#00000000"
84+
android:pathData="M0,49L108,49"
85+
android:strokeColor="#66FFFFFF"
86+
android:strokeWidth="0.8" />
87+
<path
88+
android:fillColor="#00000000"
89+
android:pathData="M0,59L108,59"
90+
android:strokeColor="#66FFFFFF"
91+
android:strokeWidth="0.8" />
92+
<path
93+
android:fillColor="#00000000"
94+
android:pathData="M0,29L108,29"
95+
android:strokeColor="#66FFFFFF"
96+
android:strokeWidth="0.8" />
97+
<path
98+
android:fillColor="#00000000"
99+
android:pathData="M0,39L108,39"
100+
android:strokeColor="#66FFFFFF"
101+
android:strokeWidth="0.8" />
102+
<path
103+
android:fillColor="#00000000"
104+
android:pathData="M0,19L108,19"
105+
android:strokeColor="#33FFFFFF"
106+
android:strokeWidth="0.8" />
107+
<path
108+
android:fillColor="#00000000"
109+
android:pathData="M0,9L108,9"
110+
android:strokeColor="#66FFFFFF"
111+
android:strokeWidth="0.8" />
112+
</vector>
113+

0 commit comments

Comments
 (0)