Skip to content

Commit

Permalink
DPMS-11800 Remove core folder inside of Core module (Part3) (oxeanbit…
Browse files Browse the repository at this point in the history
…s#17)

* Add auxiliar anvil components to do renderization

* Remove redundant core folder inside of core module

* Fix name of package patch of aux anvil components
  • Loading branch information
dnovaes authored Apr 15, 2020
1 parent 52f6373 commit 784e3c3
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.view.View
import android.widget.LinearLayout
import androidx.appcompat.app.AppCompatActivity
import com.jakewharton.threetenabp.AndroidThreeTen
import com.oxeanbits.forecastchart.core.ui.component.forecastChartComponent
import com.oxeanbits.forecastchart.ui.component.forecastChartComponent
import com.oxeanbits.forecastchart.util.SetupChartExample
import trikita.anvil.BaseDSL.MATCH
import trikita.anvil.BaseDSL.size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import android.graphics.Color
import com.github.mikephil.charting.data.BarEntry
import com.github.mikephil.charting.data.Entry
import com.github.mikephil.charting.utils.ColorTemplate
import com.oxeanbits.forecastchart.core.model.Line
import com.oxeanbits.forecastchart.core.util.DateFormatter
import com.oxeanbits.forecastchart.model.Line
import java.text.DecimalFormat

object SetupChartExample{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.model
package com.oxeanbits.forecastchart.model

import com.github.mikephil.charting.data.BarEntry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.model
package com.oxeanbits.forecastchart.model

import com.github.mikephil.charting.data.Entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.ui.anvil
package com.oxeanbits.forecastchart.ui.anvil

import android.os.Handler
import android.os.Looper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.ui.anvil
package com.oxeanbits.forecastchart.ui.anvil

import android.content.Context
import android.widget.LinearLayout
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.oxeanbits.forecastchart.ui.anvil

interface RenderListener {
fun render()
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.ui.anvil
package com.oxeanbits.forecastchart.ui.anvil

import android.os.Handler
import android.os.Looper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.ui.component
package com.oxeanbits.forecastchart.ui.component

import android.view.View
import trikita.anvil.Anvil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.oxeanbits.forecastchart.core.ui.component
package com.oxeanbits.forecastchart.ui.component

import android.content.Context
import android.graphics.Typeface.BOLD
import com.github.mikephil.charting.charts.CombinedChart
import com.github.mikephil.charting.data.BarEntry
import com.github.mikephil.charting.data.Entry
import com.oxeanbits.forecastchart.core.model.Line
import com.oxeanbits.forecastchart.core.ui.anvil.LinearLayoutComponent
import com.oxeanbits.forecastchart.core.util.Colors
import com.oxeanbits.forecastchart.core.util.DateFormatter.DEFAULT_DATE_FORMAT
import com.oxeanbits.forecastchart.core.util.ForecastChart
import com.oxeanbits.forecastchart.model.Line
import com.oxeanbits.forecastchart.ui.anvil.LinearLayoutComponent
import com.oxeanbits.forecastchart.util.Colors
import com.oxeanbits.forecastchart.util.DateFormatter.DEFAULT_DATE_FORMAT
import com.oxeanbits.forecastchart.util.ForecastChart
import trikita.anvil.Anvil.currentView
import trikita.anvil.BaseDSL.MATCH
import trikita.anvil.BaseDSL.WRAP
Expand Down Expand Up @@ -42,7 +42,7 @@ class ForecastChartComponent(context: Context) : LinearLayoutComponent(context)
private var detailsEnable: Boolean = false

override fun view() {
size(MATCH, MATCH)
size(MATCH, WRAP)
orientation(VERTICAL)

if(detailsEnable) {
Expand Down Expand Up @@ -192,4 +192,4 @@ class ForecastChartComponent(context: Context) : LinearLayoutComponent(context)
fun detailsEnable(detailsEnable: Boolean){
this.detailsEnable = detailsEnable
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.ui.marker
package com.oxeanbits.forecastchart.ui.marker

import android.annotation.SuppressLint
import android.content.Context
Expand All @@ -8,7 +8,7 @@ import com.github.mikephil.charting.data.Entry
import com.github.mikephil.charting.highlight.Highlight
import com.github.mikephil.charting.utils.MPPointF
import com.oxeanbits.forecastchart.core.R
import com.oxeanbits.forecastchart.core.util.DateFormatter
import com.oxeanbits.forecastchart.util.DateFormatter
import java.text.DecimalFormat

@SuppressLint("ViewConstructor")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.util
package com.oxeanbits.forecastchart.util

import android.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.util
package com.oxeanbits.forecastchart.util

import org.threeten.bp.Instant
import org.threeten.bp.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.oxeanbits.forecastchart.core.util
package com.oxeanbits.forecastchart.util

import android.content.Context
import android.graphics.Color
Expand All @@ -7,11 +7,11 @@ import com.github.mikephil.charting.data.BarData
import com.github.mikephil.charting.data.BarEntry
import com.github.mikephil.charting.data.CombinedData
import com.github.mikephil.charting.data.LineData
import com.oxeanbits.forecastchart.core.model.Bar
import com.oxeanbits.forecastchart.core.model.Line
import com.oxeanbits.forecastchart.core.util.SetupChart.configChart
import com.oxeanbits.forecastchart.core.util.SetupChart.setupEndBarDataSet
import com.oxeanbits.forecastchart.core.util.SetupChart.setupLineDataSet
import com.oxeanbits.forecastchart.model.Bar
import com.oxeanbits.forecastchart.model.Line
import com.oxeanbits.forecastchart.util.SetupChart.configChart
import com.oxeanbits.forecastchart.util.SetupChart.setupEndBarDataSet
import com.oxeanbits.forecastchart.util.SetupChart.setupLineDataSet
import java.text.DecimalFormat

object ForecastChart{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.oxeanbits.forecastchart.core.util
package com.oxeanbits.forecastchart.util

import android.content.Context
import com.github.mikephil.charting.charts.CombinedChart
import com.github.mikephil.charting.components.Legend
import com.github.mikephil.charting.data.BarDataSet
import com.github.mikephil.charting.data.LineDataSet
import com.oxeanbits.forecastchart.core.R
import com.oxeanbits.forecastchart.core.model.Bar
import com.oxeanbits.forecastchart.core.model.Line
import com.oxeanbits.forecastchart.core.ui.marker.ForecastMarkerView
import com.oxeanbits.forecastchart.model.Bar
import com.oxeanbits.forecastchart.model.Line
import com.oxeanbits.forecastchart.ui.marker.ForecastMarkerView
import java.text.DecimalFormat

object SetupChart{
Expand Down

0 comments on commit 784e3c3

Please sign in to comment.