Skip to content

Commit

Permalink
Add order bus feature module
Browse files Browse the repository at this point in the history
  • Loading branch information
wisnukurniawan committed Jan 24, 2020
1 parent ccd5642 commit ea43996
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 1 deletion.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions feature-order-bus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
11 changes: 11 additions & 0 deletions feature-order-bus/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply from: "$rootDir/build-system/dependencies-module.gradle"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

dependencies {
implementation project(':launcher:main')

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
Empty file.
21 changes: 21 additions & 0 deletions feature-order-bus/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
9 changes: 9 additions & 0 deletions feature-order-bus/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wisnu.feature.orderbus">

<application>
<activity android:name="com.wisnu.feature.orderbus.OrderBusActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.wisnu.feature.orderbus

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle

class OrderBusActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_order_bus)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.wisnu.feature.orderbus

import android.app.Application
import android.content.Intent
import com.wisnu.launcher.main.FeatureLaunchable
import com.wisnu.launcher.main.FeatureType

class OrderBusFeature(private val application: Application) : FeatureLaunchable {
override val type: Int = FeatureType.ORDER_FLIGHT

override fun title(): Int = R.string.feature_order_bus_name

override fun intent(): Intent? = Intent(application, OrderBusActivity::class.java)

override fun icon(): Int = R.drawable.ic_bus
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.wisnu.feature.orderbus

import com.wisnu.launcher.main.FeatureApplication
import com.wisnu.launcher.main.Launcher

class OrderBusFeatureApplication : FeatureApplication {
override fun onCreate(launcher: Launcher) {
launcher.registerFeature(OrderBusFeature(launcher.application))
}
}
4 changes: 4 additions & 0 deletions feature-order-bus/src/main/res/drawable/drawable/ic_bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp">
<path android:fillColor="#ffffff" android:pathData="M4,16c0,0.88 0.39,1.67 1,2.22L5,20c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-1h8v1c0,0.55 0.45,1 1,1h1c0.55,0 1,-0.45 1,-1v-1.78c0.61,-0.55 1,-1.34 1,-2.22L20,6c0,-3.5 -3.58,-4 -8,-4s-8,0.5 -8,4v10zM7.5,17c-0.83,0 -1.5,-0.67 -1.5,-1.5S6.67,14 7.5,14s1.5,0.67 1.5,1.5S8.33,17 7.5,17zM16.5,17c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM18,11L6,11L6,6h12v5z"/>
</vector>
17 changes: 17 additions & 0 deletions feature-order-bus/src/main/res/layout/activity_order_bus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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="match_parent"
android:background="#24272B"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:padding="16dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/feature_order_bus_name"
android:textColor="#FFFFFF"
android:textSize="18sp" />
</LinearLayout>
3 changes: 3 additions & 0 deletions feature-order-bus/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<string name="feature_order_bus_name">Order Bus</string>
</resources>
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':app', ':launcher:main', ':launcher:compiler', ':launcher:annotations', ':feature-setting', ':feature-transaction', ':feature-order-train', ':feature-order-flight', ':feature-order-hotel'
include ':app', ':launcher:main', ':launcher:compiler', ':launcher:annotations', ':feature-setting', ':feature-transaction', ':feature-order-train', ':feature-order-flight', ':feature-order-hotel', ':feature-order-bus'
rootProject.name='Order Tiket'

0 comments on commit ea43996

Please sign in to comment.