Skip to content

Commit

Permalink
Apply default attributes from XML theme
Browse files Browse the repository at this point in the history
Apply default attributes from GliaTheme to the Entry Widget view in the XML layer.

MOB-3601
  • Loading branch information
AndriiHorishniiMOC committed Oct 31, 2024
1 parent 0cb61af commit 8ae0b3e
Show file tree
Hide file tree
Showing 33 changed files with 63 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.glia.widgets.R
import com.glia.widgets.databinding.EntryWidgetFragmentBinding
import com.glia.widgets.di.Dependencies
import com.glia.widgets.entrywidget.adapter.EntryWidgetAdapter
import com.glia.widgets.helper.wrapWithMaterialThemeOverlay
import com.glia.widgets.view.unifiedui.applyLayerTheme
import com.glia.widgets.view.unifiedui.theme.entrywidget.EntryWidgetTheme
import com.google.android.material.bottomsheet.BottomSheetBehavior
Expand All @@ -35,7 +36,8 @@ internal class EntryWidgetFragment : BottomSheetDialogFragment() {
inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?
): View {
val binding = EntryWidgetFragmentBinding.inflate(inflater, container, false)
val layoutInflater = LayoutInflater.from(requireContext().wrapWithMaterialThemeOverlay())
val binding = EntryWidgetFragmentBinding.inflate(layoutInflater, container, false)
val entryWidgetsTheme = Dependencies.gliaThemeManager.theme?.entryWidgetTheme

setupView(requireContext(), binding, entryWidgetsTheme)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal fun DefaultMediaTypeItemsTheme(pallet: ColorPallet?): MediaTypeItemsThe
pallet?.run {
MediaTypeItemsTheme(
mediaTypeItem = DefaultMediaItemTypeTheme(this),
dividerColor = baseNormalColorTheme
dividerColor = baseShadeColorTheme
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<shape
android:shape="rectangle">
<size android:height="@dimen/glia_px" />
<solid android:color="@color/glia_stroke_gray" />
<solid android:color="?attr/gliaBaseShadeColor" />
</shape>

</item>
Expand Down
4 changes: 1 addition & 3 deletions widgetssdk/src/main/res/drawable/ic_drag_handle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
android:viewportHeight="4">
<path
android:pathData="M2.5,0L30.5,0A2,2 0,0 1,32.5 2L32.5,2A2,2 0,0 1,30.5 4L2.5,4A2,2 0,0 1,0.5 2L0.5,2A2,2 0,0 1,2.5 0z"
android:strokeAlpha="0.4"
android:fillColor="#79747E"
android:fillAlpha="0.4"/>
android:fillColor="?attr/gliaBaseShadeColor" />
</vector>
5 changes: 3 additions & 2 deletions widgetssdk/src/main/res/layout/entry_widget_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/bg_bottom_sheet">
android:background="@drawable/bg_bottom_sheet"
android:backgroundTint="?attr/gliaBaseLightColor">

<ImageView
android:id="@+id/drag_handle"
Expand All @@ -16,7 +17,7 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/container"/>
app:layout_constraintBottom_toTopOf="@id/container" />

<FrameLayout
android:id="@+id/container"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ae0b3e

Please sign in to comment.