diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/CapturePhotoListener.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/CapturePhotoListener.kt similarity index 71% rename from ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/CapturePhotoListener.kt rename to ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/CapturePhotoListener.kt index 4917186..beb0db4 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/CapturePhotoListener.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/CapturePhotoListener.kt @@ -1,4 +1,4 @@ -package com.vt.extendedbeaglelib.common +package com.vt.extendedbeaglelib.common.callback import android.net.Uri diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/ImageSetListener.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/ImageSetListener.kt similarity index 62% rename from ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/ImageSetListener.kt rename to ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/ImageSetListener.kt index 626526b..54b411c 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/ImageSetListener.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/ImageSetListener.kt @@ -1,4 +1,4 @@ -package com.vt.extendedbeaglelib.common +package com.vt.extendedbeaglelib.common.callback import android.net.Uri diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/PickLocalPhotoListener.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/PickLocalPhotoListener.kt similarity index 72% rename from ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/PickLocalPhotoListener.kt rename to ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/PickLocalPhotoListener.kt index 2d5b9ad..5a7fc6d 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/PickLocalPhotoListener.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/callback/PickLocalPhotoListener.kt @@ -1,4 +1,4 @@ -package com.vt.extendedbeaglelib.common +package com.vt.extendedbeaglelib.common.callback import android.net.Uri diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/FontStyle.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/FontStyle.kt similarity index 63% rename from ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/FontStyle.kt rename to ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/FontStyle.kt index 0eee2ca..4b9929b 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/FontStyle.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/FontStyle.kt @@ -1,4 +1,4 @@ -package com.vt.beagle_ui.common +package com.vt.extendedbeaglelib.common.enum_class enum class FontStyle { SEMI_BOLD, diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/Gravity.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/Gravity.kt similarity index 64% rename from ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/Gravity.kt rename to ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/Gravity.kt index 0a5bd2d..20659b5 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/Gravity.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/Gravity.kt @@ -1,4 +1,4 @@ -package com.vt.extendedbeaglelib.common +package com.vt.extendedbeaglelib.common.enum_class import br.com.zup.beagle.core.BeagleJson diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/TabInfoType.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/TabInfoType.kt new file mode 100644 index 0000000..d77848e --- /dev/null +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/common/enum_class/TabInfoType.kt @@ -0,0 +1,9 @@ +package com.vt.extendedbeaglelib.common.enum_class + +import br.com.zup.beagle.core.BeagleJson + +@BeagleJson +enum class TabInfoType { + BEAGLE, + NATIVE +} \ No newline at end of file diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/CapturePhoto.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/CapturePhoto.kt index 87411c0..c405374 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/CapturePhoto.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/CapturePhoto.kt @@ -8,7 +8,7 @@ import br.com.zup.beagle.android.action.Action import br.com.zup.beagle.android.utils.handleEvent import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.annotation.RegisterAction -import com.vt.extendedbeaglelib.common.CapturePhotoListener +import com.vt.extendedbeaglelib.common.callback.CapturePhotoListener import com.vt.extendedbeaglelib.common.Constants.PERMISSION_CAMERA import com.vt.extendedbeaglelib.ui.AppBeagleActivity import com.vt.extendedbeaglelib.utils.bus.SingleBus diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/OpenSideMenuViewController.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/OpenSideMenuViewController.kt index b050fc1..4274bfb 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/OpenSideMenuViewController.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/OpenSideMenuViewController.kt @@ -6,7 +6,7 @@ import br.com.zup.beagle.android.action.Action import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.annotation.RegisterAction import com.vt.extendedbeaglelib.R -import com.vt.extendedbeaglelib.common.Gravity +import com.vt.extendedbeaglelib.common.enum_class.Gravity import com.vt.extendedbeaglelib.ui.FragmentDrawer @RegisterAction diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/PickLocalPhoto.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/PickLocalPhoto.kt index 947f645..9658ca1 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/PickLocalPhoto.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/PickLocalPhoto.kt @@ -9,7 +9,7 @@ import br.com.zup.beagle.android.utils.handleEvent import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.annotation.RegisterAction import com.vt.extendedbeaglelib.common.Constants.PERMISSION_PHOTO -import com.vt.extendedbeaglelib.common.PickLocalPhotoListener +import com.vt.extendedbeaglelib.common.callback.PickLocalPhotoListener import com.vt.extendedbeaglelib.ui.AppBeagleActivity import com.vt.extendedbeaglelib.utils.bus.SingleBus import com.vt.extendedbeaglelib.utils.bus.SingleBusKey diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/SetNotificationBadge.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/SetNotificationBadge.kt index 9cef4e1..f8bc7f7 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/SetNotificationBadge.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/actions/SetNotificationBadge.kt @@ -4,7 +4,7 @@ import android.view.View import br.com.zup.beagle.android.action.Action import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.annotation.RegisterAction -import com.vt.beagle_ui.data.model.BadgeModel +import com.vt.extendedbeaglelib.data.model.BadgeModel import com.vt.extendedbeaglelib.utils.bus.SingleBus import com.vt.extendedbeaglelib.utils.bus.SingleBusKey diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/BottomNavigationView.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/BottomNavigationView.kt index 9dce574..d74e46c 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/BottomNavigationView.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/BottomNavigationView.kt @@ -17,9 +17,10 @@ import com.bumptech.glide.Glide import com.bumptech.glide.request.target.SimpleTarget import com.bumptech.glide.request.transition.Transition import com.google.android.material.bottomnavigation.BottomNavigationView -import com.vt.beagle_ui.data.model.BadgeModel -import com.vt.beagle_ui.data.model.TabInfo import com.vt.extendedbeaglelib.R +import com.vt.extendedbeaglelib.common.enum_class.TabInfoType +import com.vt.extendedbeaglelib.data.model.BadgeModel +import com.vt.extendedbeaglelib.data.model.TabInfo import com.vt.extendedbeaglelib.ui.BaseFragment import com.vt.extendedbeaglelib.utils.bus.SingleBus import com.vt.extendedbeaglelib.utils.bus.SingleBusKey @@ -53,10 +54,10 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { } fun setupMenu( - tabItems: List, - selectedColor: String? = "#3596EC", - unselectedColor: String? = "#788793", - activity: AppCompatActivity + tabItems: List, + selectedColor: String? = "#3596EC", + unselectedColor: String? = "#788793", + activity: AppCompatActivity ) { if (tabItems.isNotEmpty()) { val fragmentManager: FragmentManager = activity.supportFragmentManager @@ -78,8 +79,8 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { .load(tabItems[i].remoteIconUrl) .into(object : SimpleTarget() { override fun onResourceReady( - resource: Drawable, - @Nullable transition: Transition? + resource: Drawable, + @Nullable transition: Transition? ) { if (i == 0) { menu.findItem(R.id.default_page).apply { @@ -95,7 +96,7 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS) } - if (i == tabItems.size-1) { + if (i == tabItems.size - 1) { notificationMenuItemId = menuItemId } } @@ -105,25 +106,36 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { } private fun generateFragment( - tabItems: List, - fragmentManager: FragmentManager) + tabItems: List, + fragmentManager: FragmentManager) { val fragmentTransaction = fragmentManager.beginTransaction() for (i in tabItems.indices) { - val homeFragmentInstance = BaseFragment.newInstance(tabItems[i].api) // pass the destination - - fragmentTransaction.add( - R.id.server_driven_container, - homeFragmentInstance, - tabItems[i].title - ) - - if (i == 0) { - fragmentTransaction.show(homeFragmentInstance) - tempFragment = homeFragmentInstance - } else { - fragmentTransaction.hide(homeFragmentInstance) + if (tabItems[i].type == TabInfoType.BEAGLE) { + tabItems[i].api?.let { + val endpoint = "/beagle$it" + val homeFragmentInstance = BaseFragment.newInstance(endpoint) + + fragmentTransaction.add( + R.id.server_driven_container, + homeFragmentInstance, + tabItems[i].title + ) + + if (i == 0) { + fragmentTransaction.show(homeFragmentInstance) + tempFragment = homeFragmentInstance + } else { + fragmentTransaction.hide(homeFragmentInstance) + } + } + } else if (tabItems[i].type == TabInfoType.NATIVE) { + tabItems[i].className?.let { + Log.d("dLog", "Native fragment -> $it") +// val nativeFragmentClass = Class.forName(it) +// val nativeFragmentInstance = nativeFragmentClass.newInstance() + } } } @@ -131,8 +143,8 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { } private fun setupListener( - tabItems: List, - fragmentManager: FragmentManager) + tabItems: List, + fragmentManager: FragmentManager) { navigationBar.setOnNavigationItemSelectedListener { item -> val fragmentTransaction = fragmentManager.beginTransaction() @@ -156,17 +168,17 @@ class BottomNavigationView(context: Context) : LinearLayout(context) { } private fun setNavigationTextColor( - navigationView: BottomNavigationView, - selectedColor: String? = "#3596EC", - unselectedColor: String? = "#788793" + navigationView: BottomNavigationView, + selectedColor: String? = "#3596EC", + unselectedColor: String? = "#788793" ) { val colors = intArrayOf( - Color.parseColor(unselectedColor), - Color.parseColor(selectedColor) + Color.parseColor(unselectedColor), + Color.parseColor(selectedColor) ) val states = arrayOf( - intArrayOf(android.R.attr.state_enabled, -android.R.attr.state_checked), - intArrayOf(android.R.attr.state_enabled, android.R.attr.state_checked) + intArrayOf(android.R.attr.state_enabled, -android.R.attr.state_checked), + intArrayOf(android.R.attr.state_enabled, android.R.attr.state_checked) ) navigationView.itemTextColor = ColorStateList(states, colors) diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/CustomImageView.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/CustomImageView.kt index a85944b..c781259 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/CustomImageView.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/CustomImageView.kt @@ -8,7 +8,7 @@ import android.view.View import android.widget.LinearLayout import com.vt.extendedbeaglelib.R import com.vt.extendedbeaglelib.ui.AppBeagleActivity -import com.vt.extendedbeaglelib.common.ImageSetListener +import com.vt.extendedbeaglelib.common.callback.ImageSetListener import com.vt.extendedbeaglelib.utils.bus.SingleBus import com.vt.extendedbeaglelib.utils.bus.SingleBusKey import com.vt.extendedbeaglelib.utils.extensions.loadGlide diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/PieChart.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/PieChart.kt index 7108936..95161ed 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/PieChart.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/PieChart.kt @@ -7,7 +7,7 @@ import android.widget.LinearLayout import android.widget.Toast import com.github.mikephil.charting.animation.Easing import com.github.mikephil.charting.data.PieEntry -import com.vt.beagle_ui.data.model.PieChartSlice +import com.vt.extendedbeaglelib.data.model.PieChartSlice import com.vt.extendedbeaglelib.R import com.vt.extendedbeaglelib.utils.extensions.updateData import kotlinx.android.synthetic.main.layout_pie_chart.view.* @@ -21,16 +21,16 @@ class PieChart(context: Context) : LinearLayout(context){ } fun setupPieChart( - dataset: List, - valueTextColor: String, - valueTextSize: Float, - sliceSpace: Float, - isHoleNeeded: Boolean, - holeRadius: Float, - holeColor: String, - holeText: String, - holeTextColor: String, - holeTextSize: Float + dataset: List, + valueTextColor: String, + valueTextSize: Float, + sliceSpace: Float, + isHoleNeeded: Boolean, + holeRadius: Float, + holeColor: String, + holeText: String, + holeTextColor: String, + holeTextSize: Float ) { if (dataset.isNotEmpty()) { val listData = mutableListOf() diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/TextView.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/TextView.kt index 2c8362e..110b2ce 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/TextView.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widget_views/TextView.kt @@ -10,7 +10,7 @@ import android.view.Gravity import android.view.View import android.widget.LinearLayout import br.com.zup.beagle.widget.core.TextAlignment -import com.vt.beagle_ui.common.FontStyle +import com.vt.extendedbeaglelib.common.enum_class.FontStyle import com.vt.extendedbeaglelib.R import kotlinx.android.synthetic.main.layout_custom_text_view.view.* @@ -23,15 +23,15 @@ class TextView constructor( } fun setText( - text: String? = "", - textColor: String = "#000000", - cornerRadius: Double? = null, - backgroundColor: String? = null, - fontSize: Double = 17.0, - fontName: String? = null, - fontStyle: FontStyle = FontStyle.NORMAL, - numberOfLines: Int = 1, - textAlignment: TextAlignment = TextAlignment.LEFT + text: String? = "", + textColor: String = "#000000", + cornerRadius: Double? = null, + backgroundColor: String? = null, + fontSize: Double = 17.0, + fontName: String? = null, + fontStyle: FontStyle = FontStyle.NORMAL, + numberOfLines: Int = 1, + textAlignment: TextAlignment = TextAlignment.LEFT ) { if (text.equals("")) { parentBackground.visibility = View.GONE diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/BottomNavigationView.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/BottomNavigationView.kt index 26791b7..6a2e9df 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/BottomNavigationView.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/BottomNavigationView.kt @@ -5,14 +5,14 @@ import androidx.appcompat.app.AppCompatActivity import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.android.widget.WidgetView import br.com.zup.beagle.annotation.RegisterWidget -import com.vt.beagle_ui.data.model.TabInfo +import com.vt.extendedbeaglelib.data.model.TabInfo import com.vt.extendedbeaglelib.components.widget_views.BottomNavigationView @RegisterWidget class BottomNavigationView( - private val tabItems: List, - private val selectedColor: String? = "#3596EC", - private val unselectedColor: String? = "#788793" + private val tabItems: List, + private val selectedColor: String? = "#3596EC", + private val unselectedColor: String? = "#788793" ): WidgetView() { override fun buildView(rootView: RootView): View { return BottomNavigationView(rootView.getContext()).apply { diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/ImageView.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/ImageView.kt index 715693a..586084e 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/ImageView.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/ImageView.kt @@ -11,7 +11,7 @@ import br.com.zup.beagle.android.utils.handleEvent import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.android.widget.WidgetView import br.com.zup.beagle.annotation.RegisterWidget -import com.vt.extendedbeaglelib.common.ImageSetListener +import com.vt.extendedbeaglelib.common.callback.ImageSetListener import com.vt.extendedbeaglelib.components.widget_views.CustomImageView import java.io.ByteArrayOutputStream diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/Label.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/Label.kt index 741e66c..bd7c877 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/Label.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/Label.kt @@ -7,20 +7,20 @@ import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.android.widget.WidgetView import br.com.zup.beagle.annotation.RegisterWidget import br.com.zup.beagle.widget.core.TextAlignment -import com.vt.beagle_ui.common.FontStyle +import com.vt.extendedbeaglelib.common.enum_class.FontStyle import com.vt.extendedbeaglelib.components.widget_views.TextView @RegisterWidget class Label( - val text: Bind?, - val textColor: Bind?, - val cornerRadius: Double? = null, - val backgroundColor: String? = null, - val fontSize: Double = 17.0, - val fontName: String? = null, - val fontStyle: FontStyle = FontStyle.NORMAL, - val numberOfLines: Int = 1, - val textAlignment: TextAlignment = TextAlignment.LEFT + val text: Bind?, + val textColor: Bind?, + val cornerRadius: Double? = null, + val backgroundColor: String? = null, + val fontSize: Double = 17.0, + val fontName: String? = null, + val fontStyle: FontStyle = FontStyle.NORMAL, + val numberOfLines: Int = 1, + val textAlignment: TextAlignment = TextAlignment.LEFT ) : WidgetView() { override fun buildView(rootView: RootView): View { return TextView(rootView.getContext()).apply { diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/PieChart.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/PieChart.kt index ec8e786..455838c 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/PieChart.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/components/widgets/PieChart.kt @@ -4,23 +4,23 @@ import android.view.View import br.com.zup.beagle.android.widget.RootView import br.com.zup.beagle.android.widget.WidgetView import br.com.zup.beagle.annotation.RegisterWidget -import com.vt.beagle_ui.data.model.PieChartSlice +import com.vt.extendedbeaglelib.data.model.PieChartSlice import com.vt.extendedbeaglelib.components.widget_views.PieChart @RegisterWidget class PieChart( - private val dataset: List, - private val valueTextColor: String = "#ffffff", - private val valueTextSize: Float = 12F, - private val sliceSpace: Float = 3F, - private val isHoleNeeded: Boolean = false, - private val holeRadius: Float = 0f, - private val holeColor: String = "#ffffff", - private val holeText: String = "", - private val holeTextColor: String = "#000000", - private val holeTextSize: Float = 12F, - private val width: Int = 100, - private val height: Int = 100 + private val dataset: List, + private val valueTextColor: String = "#ffffff", + private val valueTextSize: Float = 12F, + private val sliceSpace: Float = 3F, + private val isHoleNeeded: Boolean = false, + private val holeRadius: Float = 0f, + private val holeColor: String = "#ffffff", + private val holeText: String = "", + private val holeTextColor: String = "#000000", + private val holeTextSize: Float = 12F, + private val width: Int = 100, + private val height: Int = 100 ): WidgetView() { override fun buildView(rootView: RootView): View { return PieChart(rootView.getContext()).apply { diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/BadgeModel.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/BadgeModel.kt index bb6c06b..983d135 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/BadgeModel.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/BadgeModel.kt @@ -1,4 +1,4 @@ -package com.vt.beagle_ui.data.model +package com.vt.extendedbeaglelib.data.model data class BadgeModel( val number: Int, diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/PieChartSlice.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/PieChartSlice.kt index 6ad0325..deeadc1 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/PieChartSlice.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/PieChartSlice.kt @@ -1,4 +1,4 @@ -package com.vt.beagle_ui.data.model +package com.vt.extendedbeaglelib.data.model data class PieChartSlice( val percentage: Float, diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/TabInfo.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/TabInfo.kt index 112ff38..f7c9643 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/TabInfo.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/data/model/TabInfo.kt @@ -1,8 +1,14 @@ -package com.vt.beagle_ui.data.model +package com.vt.extendedbeaglelib.data.model + +import com.vt.extendedbeaglelib.common.enum_class.TabInfoType data class TabInfo( - val remoteIconUrl: String, - val title: String, - val api: String, - val cacheFile: String -) + val remoteIconUrl: String? = null, + val title: String? = null, + val api: String? = null, + val cacheFile: String? = null, + val type: TabInfoType = TabInfoType.BEAGLE, + val fileName: String? = null, + val className: String? = null, + val storyboardName: String? = null // Just for only iOS +) \ No newline at end of file diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/AppBeagleActivity.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/AppBeagleActivity.kt index 651e80d..aaaadac 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/AppBeagleActivity.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/AppBeagleActivity.kt @@ -14,10 +14,10 @@ import br.com.zup.beagle.android.annotation.RegisterController import br.com.zup.beagle.android.view.BeagleActivity import br.com.zup.beagle.android.view.ServerDrivenState import com.vt.extendedbeaglelib.R -import com.vt.extendedbeaglelib.common.CapturePhotoListener +import com.vt.extendedbeaglelib.common.callback.CapturePhotoListener import com.vt.extendedbeaglelib.common.Constants.PERMISSION_CAMERA import com.vt.extendedbeaglelib.common.Constants.PERMISSION_PHOTO -import com.vt.extendedbeaglelib.common.PickLocalPhotoListener +import com.vt.extendedbeaglelib.common.callback.PickLocalPhotoListener import com.vt.extendedbeaglelib.utils.bus.SingleBus import com.vt.extendedbeaglelib.utils.bus.SingleBusKey import com.vt.extendedbeaglelib.utils.extensions.toast diff --git a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/FragmentDrawer.kt b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/FragmentDrawer.kt index 437acc5..6f5ab69 100644 --- a/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/FragmentDrawer.kt +++ b/ExtendedBeagleLib/src/main/java/com/vt/extendedbeaglelib/ui/FragmentDrawer.kt @@ -16,7 +16,7 @@ import br.com.zup.beagle.android.view.ScreenRequest import br.com.zup.beagle.android.view.ServerDrivenState import br.com.zup.beagle.android.view.custom.OnServerStateChanged import com.vt.extendedbeaglelib.R -import com.vt.extendedbeaglelib.common.Gravity +import com.vt.extendedbeaglelib.common.enum_class.Gravity import kotlinx.android.synthetic.main.fragment_drawer_navigation.* class FragmentDrawer : Fragment() {