mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1086 Design | Typography, core ui module (#3089)
* DROID-1086 legacy * DROID-1086 core ui design * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 legacy archive screen * DROID-1086 core-ui module design * DROID-1086 cutom widgets fix * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 legacy styles * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 legacy * DROID-1086 design fixes * DROID-1086 design system font fix
This commit is contained in:
parent
869ac6a370
commit
dc84f878f9
204 changed files with 255 additions and 7050 deletions
|
@ -5,7 +5,6 @@ import com.anytypeio.anytype.core_models.Id
|
|||
import com.anytypeio.anytype.di.feature.AddFileRelationModule
|
||||
import com.anytypeio.anytype.di.feature.AddObjectRelationModule
|
||||
import com.anytypeio.anytype.di.feature.AddObjectRelationValueModule
|
||||
import com.anytypeio.anytype.di.feature.ArchiveModule
|
||||
import com.anytypeio.anytype.di.feature.AuthModule
|
||||
import com.anytypeio.anytype.di.feature.CreateAccountModule
|
||||
import com.anytypeio.anytype.di.feature.CreateBookmarkModule
|
||||
|
@ -232,12 +231,6 @@ class ComponentManager(
|
|||
.build()
|
||||
}
|
||||
|
||||
val archiveComponent = ComponentMap {
|
||||
main.archiveComponentBuilder()
|
||||
.module(ArchiveModule)
|
||||
.build()
|
||||
}
|
||||
|
||||
val objectIconPickerComponent = DependentComponentMap { ctx ->
|
||||
editorComponent
|
||||
.get(ctx)
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
package com.anytypeio.anytype.di.feature
|
||||
|
||||
import com.anytypeio.anytype.analytics.base.Analytics
|
||||
import com.anytypeio.anytype.core_utils.di.scope.PerScreen
|
||||
import com.anytypeio.anytype.domain.event.interactor.InterceptEvents
|
||||
import com.anytypeio.anytype.domain.objects.SetObjectIsArchived
|
||||
import com.anytypeio.anytype.domain.page.CloseBlock
|
||||
import com.anytypeio.anytype.domain.page.OpenPage
|
||||
import com.anytypeio.anytype.presentation.editor.DocumentExternalEventReducer
|
||||
import com.anytypeio.anytype.presentation.editor.archive.ArchiveViewModelFactory
|
||||
import com.anytypeio.anytype.presentation.editor.editor.Orchestrator
|
||||
import com.anytypeio.anytype.presentation.editor.render.DefaultBlockViewRenderer
|
||||
import com.anytypeio.anytype.presentation.editor.selection.SelectionStateHolder
|
||||
import com.anytypeio.anytype.ui.archive.ArchiveFragment
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.Subcomponent
|
||||
|
||||
@Subcomponent(
|
||||
modules = [
|
||||
ArchiveModule::class,
|
||||
EditorUseCaseModule::class,
|
||||
EditorUseCaseModule.Bindings::class,
|
||||
EditorSessionModule::class
|
||||
]
|
||||
)
|
||||
@PerScreen
|
||||
interface ArchiveSubComponent {
|
||||
|
||||
@Subcomponent.Builder
|
||||
interface Builder {
|
||||
fun module(module: ArchiveModule): Builder
|
||||
fun build(): ArchiveSubComponent
|
||||
}
|
||||
|
||||
fun inject(fragment: ArchiveFragment)
|
||||
}
|
||||
|
||||
@Module
|
||||
object ArchiveModule {
|
||||
|
||||
@JvmStatic
|
||||
@Provides
|
||||
fun provideArchiveViewModelFactory(
|
||||
openPage: OpenPage,
|
||||
closePage: CloseBlock,
|
||||
setObjectIsArchived: SetObjectIsArchived,
|
||||
interceptEvents: InterceptEvents,
|
||||
renderer: DefaultBlockViewRenderer,
|
||||
selectionStateHolder: SelectionStateHolder,
|
||||
documentExternalEventReducer: DocumentExternalEventReducer,
|
||||
interactor: Orchestrator,
|
||||
analytics: Analytics
|
||||
): ArchiveViewModelFactory = ArchiveViewModelFactory(
|
||||
openPage = openPage,
|
||||
closePage = closePage,
|
||||
setObjectIsArchived = setObjectIsArchived,
|
||||
interceptEvents = interceptEvents,
|
||||
renderer = renderer,
|
||||
selectionStateHolder = selectionStateHolder,
|
||||
reducer = documentExternalEventReducer,
|
||||
orchestrator = interactor,
|
||||
analytics = analytics
|
||||
)
|
||||
}
|
|
@ -3,7 +3,6 @@ package com.anytypeio.anytype.di.main
|
|||
import com.anytypeio.anytype.app.AndroidApplication
|
||||
import com.anytypeio.anytype.di.common.ComponentDependencies
|
||||
import com.anytypeio.anytype.di.common.ComponentDependenciesKey
|
||||
import com.anytypeio.anytype.di.feature.ArchiveSubComponent
|
||||
import com.anytypeio.anytype.di.feature.AuthSubComponent
|
||||
import com.anytypeio.anytype.di.feature.CreateBookmarkSubComponent
|
||||
import com.anytypeio.anytype.di.feature.CreateObjectSubComponent
|
||||
|
@ -78,7 +77,6 @@ interface MainComponent :
|
|||
fun inject(app: AndroidApplication)
|
||||
|
||||
fun editorComponentBuilder(): EditorSubComponent.Builder
|
||||
fun archiveComponentBuilder(): ArchiveSubComponent.Builder
|
||||
fun createBookmarkBuilder(): CreateBookmarkSubComponent.Builder
|
||||
fun linkToObjectBuilder(): LinkToObjectSubComponent.Builder
|
||||
fun moveToBuilder(): MoveToSubComponent.Builder
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.anytypeio.anytype.core_models.Id
|
|||
import com.anytypeio.anytype.presentation.navigation.AppNavigation
|
||||
import com.anytypeio.anytype.presentation.settings.EditorSettings
|
||||
import com.anytypeio.anytype.presentation.widgets.collection.Subscription
|
||||
import com.anytypeio.anytype.ui.archive.ArchiveFragment
|
||||
import com.anytypeio.anytype.ui.auth.Keys
|
||||
import com.anytypeio.anytype.ui.auth.account.CreateAccountFragment.Companion.ARGS_CODE
|
||||
import com.anytypeio.anytype.ui.auth.account.DeletedAccountFragment
|
||||
|
@ -203,13 +202,6 @@ class Navigator : AppNavigation {
|
|||
)
|
||||
}
|
||||
|
||||
override fun openArchive(target: String) {
|
||||
navController?.navigate(
|
||||
R.id.archiveFragment,
|
||||
bundleOf(ArchiveFragment.ID_KEY to target)
|
||||
)
|
||||
}
|
||||
|
||||
override fun openObjectSet(target: String, isPopUpToDashboard: Boolean) {
|
||||
if (isPopUpToDashboard) {
|
||||
navController?.navigate(
|
||||
|
|
|
@ -1,133 +0,0 @@
|
|||
package com.anytypeio.anytype.ui.archive
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.anytypeio.anytype.R
|
||||
import com.anytypeio.anytype.core_ui.features.archive.ArchiveAdapter
|
||||
import com.anytypeio.anytype.core_ui.tools.FirstItemInvisibilityDetector
|
||||
import com.anytypeio.anytype.core_utils.ext.hideSoftInput
|
||||
import com.anytypeio.anytype.core_utils.ext.invisible
|
||||
import com.anytypeio.anytype.core_utils.ext.visible
|
||||
import com.anytypeio.anytype.databinding.FragmentArchiveBinding
|
||||
import com.anytypeio.anytype.di.common.componentManager
|
||||
import com.anytypeio.anytype.presentation.editor.archive.ArchiveViewModel
|
||||
import com.anytypeio.anytype.presentation.editor.archive.ArchiveViewModelFactory
|
||||
import com.anytypeio.anytype.presentation.editor.archive.ArchiveViewState
|
||||
import com.anytypeio.anytype.ui.base.NavigationFragment
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import javax.inject.Inject
|
||||
|
||||
open class ArchiveFragment : NavigationFragment<FragmentArchiveBinding>(R.layout.fragment_archive) {
|
||||
|
||||
@Inject
|
||||
lateinit var factory: ArchiveViewModelFactory
|
||||
|
||||
private val vm by viewModels<ArchiveViewModel> { factory }
|
||||
|
||||
private val archiveAdapter by lazy {
|
||||
ArchiveAdapter(
|
||||
blocks = mutableListOf(),
|
||||
onClickListener = { vm.onPageClicked(it) }
|
||||
)
|
||||
}
|
||||
|
||||
private val titleVisibilityDetector by lazy {
|
||||
FirstItemInvisibilityDetector { isVisible ->
|
||||
if (isVisible) {
|
||||
binding.topToolbar.title.invisible()
|
||||
} else {
|
||||
binding.topToolbar.title.visible()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
vm.state.observe(viewLifecycleOwner) { render(it) }
|
||||
vm.navigation.observe(viewLifecycleOwner, navObserver)
|
||||
|
||||
BottomSheetBehavior.from(binding.sheet).apply {
|
||||
state = BottomSheetBehavior.STATE_EXPANDED
|
||||
isHideable = true
|
||||
addBottomSheetCallback(
|
||||
object : BottomSheetBehavior.BottomSheetCallback() {
|
||||
override fun onSlide(bottomSheet: View, slideOffset: Float) {}
|
||||
override fun onStateChanged(bottomSheet: View, newState: Int) {
|
||||
if (newState == BottomSheetBehavior.STATE_HIDDEN) {
|
||||
activity?.hideSoftInput()
|
||||
vm.onBottomSheetHidden()
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
binding.topToolbar.menu.invisible()
|
||||
|
||||
with(binding.bottomMenu) {
|
||||
update(COUNTER_INIT)
|
||||
findViewById<TextView>(R.id.btnRestore).setOnClickListener {
|
||||
vm.onPutBackClicked()
|
||||
}
|
||||
}
|
||||
|
||||
binding.recycler.apply {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
setHasFixedSize(true)
|
||||
adapter = archiveAdapter
|
||||
addOnScrollListener(titleVisibilityDetector)
|
||||
}
|
||||
}
|
||||
|
||||
private fun render(state: ArchiveViewState) {
|
||||
when (state) {
|
||||
ArchiveViewState.Loading -> {}
|
||||
is ArchiveViewState.Success -> {
|
||||
archiveAdapter.update(state.blocks)
|
||||
binding.bottomMenu.update(state.selections)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
vm.onStart(extractDocumentId())
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
vm.onStop()
|
||||
super.onStop()
|
||||
}
|
||||
|
||||
override fun injectDependencies() {
|
||||
componentManager().archiveComponent.get(extractDocumentId()).inject(this)
|
||||
}
|
||||
|
||||
override fun releaseDependencies() {
|
||||
componentManager().archiveComponent.release(extractDocumentId())
|
||||
}
|
||||
|
||||
private fun extractDocumentId(): String =
|
||||
requireArguments()
|
||||
.getString(ID_KEY)
|
||||
?: throw IllegalStateException("Document id missing")
|
||||
|
||||
|
||||
override fun inflateBinding(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?
|
||||
): FragmentArchiveBinding = FragmentArchiveBinding.inflate(
|
||||
inflater, container, false
|
||||
)
|
||||
|
||||
companion object {
|
||||
const val ID_KEY = "args.id"
|
||||
const val COUNTER_INIT = 0
|
||||
}
|
||||
}
|
|
@ -34,7 +34,6 @@ class NavigationRouter(
|
|||
command.id,
|
||||
command.editorSettings
|
||||
)
|
||||
is AppNavigation.Command.OpenArchive -> navigation.openArchive(command.target)
|
||||
is AppNavigation.Command.OpenObjectSet -> navigation.openObjectSet(
|
||||
command.target,
|
||||
command.isPopUpToDashboard
|
||||
|
|
|
@ -1,259 +0,0 @@
|
|||
package com.anytypeio.anytype.ui.menu
|
||||
|
||||
import android.animation.ValueAnimator
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Point
|
||||
import android.text.Editable
|
||||
import android.text.Spanned
|
||||
import android.view.Gravity
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewTreeObserver
|
||||
import android.widget.PopupWindow
|
||||
import android.widget.TextView
|
||||
import com.anytypeio.anytype.R
|
||||
import com.anytypeio.anytype.core_ui.extensions.color
|
||||
import com.anytypeio.anytype.core_ui.menu.ContextMenuType
|
||||
import com.anytypeio.anytype.core_utils.ext.PopupExtensions.calculateContentBounds
|
||||
import com.anytypeio.anytype.core_utils.ext.PopupExtensions.calculateRectInWindow
|
||||
import com.anytypeio.anytype.core_utils.ext.PopupExtensions.lerp
|
||||
import com.anytypeio.anytype.presentation.editor.editor.Markup
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
class AnytypeContextMenu constructor(
|
||||
context: Context,
|
||||
anchorView: TextView,
|
||||
parent: View,
|
||||
type: ContextMenuType,
|
||||
private val onMarkupActionClicked: (Markup.Type) -> Unit,
|
||||
private val dismissOnTouchOutside: Boolean = false
|
||||
) : PopupWindow.OnDismissListener {
|
||||
|
||||
companion object {
|
||||
const val DEFAULT_X = 20
|
||||
const val WIDTH_CHANGE_IGNORE = -1
|
||||
const val HEIGHT_CHANGE_IGNORE = -1
|
||||
const val ANIM_DURATION = 150L
|
||||
}
|
||||
|
||||
private val contextRef: WeakReference<Context>
|
||||
private val anchorViewRef: WeakReference<TextView>
|
||||
private val parentViewRef: WeakReference<View>
|
||||
|
||||
private var scrollListener: ViewTreeObserver.OnScrollChangedListener? = null
|
||||
|
||||
private val isShowable: Boolean
|
||||
get() = !isDismissed && contextRef.get() != null && popupWindowRef.get() != null && anchorViewRef.get() != null
|
||||
private var isDismissed: Boolean = false
|
||||
private var popupWindowRef: WeakReference<ContextPopupWindow>
|
||||
private var popupWindowCurrentLocation = Point()
|
||||
|
||||
/**
|
||||
* We need to add this bottom padding below selected content,
|
||||
* because of [android.widget.Editor.SelectionHandleView]
|
||||
*/
|
||||
private var bottomAllowance: Int = 0
|
||||
|
||||
/**
|
||||
* Callback for all touch events being dispatched to the popup
|
||||
* window.
|
||||
*/
|
||||
private var onTouchListener = View.OnTouchListener { v, event ->
|
||||
if (!isShowable) return@OnTouchListener false
|
||||
when {
|
||||
(!dismissOnTouchOutside && event.action == MotionEvent.ACTION_OUTSIDE) -> {
|
||||
v.performClick()
|
||||
return@OnTouchListener true
|
||||
}
|
||||
else -> return@OnTouchListener false
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
|
||||
scrollListener = ViewTreeObserver.OnScrollChangedListener {
|
||||
updatePosition()
|
||||
}
|
||||
anchorView.viewTreeObserver?.addOnScrollChangedListener(
|
||||
scrollListener
|
||||
)
|
||||
|
||||
val popupWindow = ContextPopupWindow(
|
||||
context = context,
|
||||
onContextMenuButtonClicked = this::onContextMenuButtonClicked,
|
||||
onDismissListener = this,
|
||||
onTouchInterceptor = onTouchListener,
|
||||
type = type,
|
||||
editable = anchorView.text as Editable,
|
||||
textRange = IntRange(anchorView.selectionStart, anchorView.selectionEnd),
|
||||
tintColor = ColorStateList.valueOf(context.color(R.color.context_menu_selected_item)),
|
||||
textDefaultColor = context.color(R.color.white)
|
||||
)
|
||||
contextRef = WeakReference(context)
|
||||
anchorViewRef = WeakReference(anchorView)
|
||||
parentViewRef = WeakReference(parent)
|
||||
popupWindowRef = WeakReference(popupWindow)
|
||||
bottomAllowance = context.resources
|
||||
.getDimensionPixelSize(R.dimen.popup_context_menu_bottom_allowance)
|
||||
}
|
||||
|
||||
private fun cleanup() {
|
||||
anchorViewRef.get()?.viewTreeObserver?.removeOnScrollChangedListener(scrollListener)
|
||||
scrollListener = null
|
||||
}
|
||||
|
||||
private fun updatePosition() {
|
||||
val anchorView = anchorViewRef.get()
|
||||
val popupWindow = popupWindowRef.get()
|
||||
val parentView = parentViewRef.get()
|
||||
if (anchorView != null && popupWindow != null && parentView != null) {
|
||||
if (popupWindow.isShowing) {
|
||||
val updatedLocation = getUpdatedCoordinates(
|
||||
parentView = parentView,
|
||||
anchorView = anchorView,
|
||||
bottomAllowance = bottomAllowance,
|
||||
popupWindow = popupWindow
|
||||
)
|
||||
if (updatedLocation != popupWindowCurrentLocation) {
|
||||
popupWindowCurrentLocation = updatedLocation
|
||||
popupWindow.update(
|
||||
DEFAULT_X,
|
||||
popupWindowCurrentLocation.y,
|
||||
WIDTH_CHANGE_IGNORE,
|
||||
HEIGHT_CHANGE_IGNORE
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun onContextMenuButtonClicked(click: ContextMenuButtonClick) {
|
||||
when (click) {
|
||||
ContextMenuButtonClick.Copy -> anchorViewRef.get()
|
||||
?.onTextContextMenuItem(android.R.id.copy)
|
||||
ContextMenuButtonClick.Cut -> anchorViewRef.get()
|
||||
?.onTextContextMenuItem(android.R.id.cut)
|
||||
ContextMenuButtonClick.Paste -> anchorViewRef.get()
|
||||
?.onTextContextMenuItem(android.R.id.paste)
|
||||
ContextMenuButtonClick.Bold -> onMarkupActionClicked(Markup.Type.BOLD)
|
||||
ContextMenuButtonClick.Italic -> onMarkupActionClicked(Markup.Type.ITALIC)
|
||||
ContextMenuButtonClick.Stroke -> onMarkupActionClicked(Markup.Type.STRIKETHROUGH)
|
||||
ContextMenuButtonClick.Code -> onMarkupActionClicked(Markup.Type.KEYBOARD)
|
||||
ContextMenuButtonClick.Color -> onMarkupActionClicked(Markup.Type.TEXT_COLOR)
|
||||
ContextMenuButtonClick.Background -> onMarkupActionClicked(Markup.Type.BACKGROUND_COLOR)
|
||||
ContextMenuButtonClick.Link -> onMarkupActionClicked(Markup.Type.LINK)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
isDismissed = true
|
||||
}
|
||||
|
||||
fun showAtLocation() {
|
||||
val anchorView = anchorViewRef.get()
|
||||
val popupWindow = popupWindowRef.get()
|
||||
val parentView = parentViewRef.get()
|
||||
if (anchorView != null && popupWindow != null && parentView != null) {
|
||||
if (popupWindow.isShowing) {
|
||||
val contentView = popupWindow.contentView
|
||||
contentView?.handler?.removeCallbacksAndMessages(null)
|
||||
contentView.post {
|
||||
val updatedLocation = getUpdatedCoordinates(
|
||||
parentView = parentView,
|
||||
anchorView = anchorView,
|
||||
bottomAllowance = bottomAllowance,
|
||||
popupWindow = popupWindow
|
||||
)
|
||||
popupWindow.updateMarkupButtons(
|
||||
textRange = IntRange(
|
||||
anchorView.selectionStart,
|
||||
anchorView.selectionEnd
|
||||
),
|
||||
spanned = anchorView.text as Spanned
|
||||
)
|
||||
if (updatedLocation != popupWindowCurrentLocation) {
|
||||
val currY = popupWindowCurrentLocation.y
|
||||
popupWindowCurrentLocation = updatedLocation
|
||||
ValueAnimator.ofFloat(0f, 1f).apply {
|
||||
addUpdateListener { animation ->
|
||||
val v = animation.animatedValue as Float
|
||||
val y = lerp(currY, updatedLocation.y, v)
|
||||
popupWindow.update(
|
||||
DEFAULT_X,
|
||||
y,
|
||||
WIDTH_CHANGE_IGNORE,
|
||||
HEIGHT_CHANGE_IGNORE
|
||||
)
|
||||
}
|
||||
duration = ANIM_DURATION
|
||||
start()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
with(popupWindow) {
|
||||
popupWindowCurrentLocation = getUpdatedCoordinates(
|
||||
parentView = parentView,
|
||||
anchorView = anchorView,
|
||||
bottomAllowance = bottomAllowance,
|
||||
popupWindow = this
|
||||
)
|
||||
updateMarkupButtons(
|
||||
textRange = IntRange(
|
||||
anchorView.selectionStart,
|
||||
anchorView.selectionEnd
|
||||
),
|
||||
spanned = anchorView.text as Spanned
|
||||
)
|
||||
showAtLocation(
|
||||
anchorView,
|
||||
Gravity.NO_GRAVITY,
|
||||
DEFAULT_X,
|
||||
popupWindowCurrentLocation.y
|
||||
)
|
||||
runShowAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getUpdatedCoordinates(
|
||||
parentView: View,
|
||||
anchorView: TextView,
|
||||
popupWindow: ContextPopupWindow,
|
||||
bottomAllowance: Int
|
||||
): Point {
|
||||
val windowPointOnScreen = getWindowPointOnScreen(parentView)
|
||||
val contentRect = calculateContentBounds(anchorView, bottomAllowance)
|
||||
val parentRect = calculateRectInWindow(parentView)
|
||||
return popupWindow.refreshCoordinates(
|
||||
selectedContentBounds = contentRect,
|
||||
viewPortOnScreen = parentRect,
|
||||
windowTopOnScreen = windowPointOnScreen.y,
|
||||
windowLeftOnScreen = windowPointOnScreen.x
|
||||
)
|
||||
}
|
||||
|
||||
private fun getWindowPointOnScreen(parentView: View): Point {
|
||||
val tempCoords = IntArray(2)
|
||||
var windowLeftOnScreen = 0
|
||||
var windowTopOnScreen = 0
|
||||
parentView.rootView?.let {
|
||||
it.getLocationOnScreen(tempCoords)
|
||||
val rootViewLeftOnScreen = tempCoords[0]
|
||||
val rootViewTopOnScreen = tempCoords[1]
|
||||
it.getLocationInWindow(tempCoords)
|
||||
val rootViewLeftOnWindow = tempCoords[0]
|
||||
val rootViewTopOnWindow = tempCoords[1]
|
||||
windowLeftOnScreen = rootViewLeftOnScreen - rootViewLeftOnWindow
|
||||
windowTopOnScreen = rootViewTopOnScreen - rootViewTopOnWindow
|
||||
}
|
||||
return Point(windowLeftOnScreen, windowTopOnScreen)
|
||||
}
|
||||
|
||||
fun finish() {
|
||||
popupWindowRef.get()?.dismiss()
|
||||
cleanup()
|
||||
}
|
||||
}
|
|
@ -1,380 +0,0 @@
|
|||
package com.anytypeio.anytype.ui.menu
|
||||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.Point
|
||||
import android.graphics.Rect
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.text.Editable
|
||||
import android.text.Spanned
|
||||
import android.util.AttributeSet
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.*
|
||||
import com.anytypeio.anytype.R
|
||||
import com.anytypeio.anytype.core_ui.common.Span
|
||||
import com.anytypeio.anytype.core_ui.menu.ContextMenuType
|
||||
import com.anytypeio.anytype.core_utils.ext.invisible
|
||||
import com.anytypeio.anytype.core_utils.ext.visible
|
||||
import com.anytypeio.anytype.ext.isSpanInRange
|
||||
|
||||
class ContextPopupWindow @JvmOverloads constructor(
|
||||
type: ContextMenuType,
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyle: Int = 0,
|
||||
defStyleRes: Int = 0,
|
||||
onDismissListener: OnDismissListener,
|
||||
onTouchInterceptor: View.OnTouchListener,
|
||||
editable: Editable,
|
||||
textRange: IntRange,
|
||||
private val onContextMenuButtonClicked: (ContextMenuButtonClick) -> Unit,
|
||||
private val gravity: Int = Gravity.NO_GRAVITY,
|
||||
private val tintColor: ColorStateList,
|
||||
private val textDefaultColor: Int
|
||||
) : PopupWindow(context, attrs, defStyle, defStyleRes) {
|
||||
|
||||
companion object {
|
||||
val HEADER = listOf(
|
||||
R.id.btnCopy,
|
||||
R.id.btnCut,
|
||||
R.id.btnPaste,
|
||||
R.id.btnItalic,
|
||||
R.id.btnLink,
|
||||
R.id.btnCode,
|
||||
R.id.btnColor,
|
||||
R.id.btnStroke,
|
||||
R.id.btnBackground
|
||||
)
|
||||
val HIGHLIGHT = listOf(
|
||||
R.id.btnCopy,
|
||||
R.id.btnCut,
|
||||
R.id.btnPaste,
|
||||
R.id.btnBold,
|
||||
R.id.btnLink,
|
||||
R.id.btnCode,
|
||||
R.id.btnColor,
|
||||
R.id.btnStroke,
|
||||
R.id.btnBackground
|
||||
)
|
||||
val DEFAULT = listOf(
|
||||
R.id.btnCopy,
|
||||
R.id.btnCut,
|
||||
R.id.btnPaste,
|
||||
R.id.btnBold,
|
||||
R.id.btnItalic,
|
||||
R.id.btnLink,
|
||||
R.id.btnCode,
|
||||
R.id.btnColor,
|
||||
R.id.btnStroke,
|
||||
R.id.btnBackground
|
||||
)
|
||||
}
|
||||
|
||||
private var popupHeight: Int
|
||||
private var popupMargin: Int
|
||||
private var mShowAnimation: AnimatorSet?
|
||||
|
||||
init {
|
||||
contentView = LayoutInflater.from(context).inflate(R.layout.popup_context_menu, null)
|
||||
width = ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
height = ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
isOutsideTouchable = true
|
||||
isTouchable = true
|
||||
isClippingEnabled = false
|
||||
isFocusable = false
|
||||
setOnDismissListener(onDismissListener)
|
||||
setTouchInterceptor(onTouchInterceptor)
|
||||
popupHeight = context.resources
|
||||
.getDimensionPixelSize(R.dimen.popup_context_menu_height)
|
||||
popupMargin = context.resources
|
||||
.getDimensionPixelSize(R.dimen.popup_context_menu_margin)
|
||||
mShowAnimation = createEnterAnimation(contentView)
|
||||
when (type) {
|
||||
ContextMenuType.TEXT -> init(contentView, DEFAULT, editable, textRange)
|
||||
ContextMenuType.HEADER -> init(contentView, HEADER, editable, textRange)
|
||||
ContextMenuType.HIGHLIGHT -> init(contentView, HIGHLIGHT, editable, textRange)
|
||||
}
|
||||
}
|
||||
|
||||
private fun init(view: View, ids: List<Int>, editable: Editable, textRange: IntRange) {
|
||||
view.findViewById<View>(R.id.btnCopy).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divCopy).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Copy)
|
||||
}
|
||||
}
|
||||
view.findViewById<View>(R.id.btnCut).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divCut).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Cut)
|
||||
}
|
||||
}
|
||||
view.findViewById<View>(R.id.btnPaste).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divPaste).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Paste)
|
||||
}
|
||||
}
|
||||
view.findViewById<ImageView>(R.id.btnBold).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divBold).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Bold)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Bold::class.java
|
||||
)
|
||||
) {
|
||||
imageTintList = tintColor
|
||||
}
|
||||
}
|
||||
view.findViewById<ImageView>(R.id.btnItalic).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divItalic).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Italic)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Italic::class.java
|
||||
)
|
||||
) {
|
||||
imageTintList = tintColor
|
||||
}
|
||||
}
|
||||
view.findViewById<ImageView>(R.id.btnStroke).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divStroke).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Stroke)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Strikethrough::class.java
|
||||
)
|
||||
) {
|
||||
imageTintList = tintColor
|
||||
}
|
||||
}
|
||||
view.findViewById<ImageView>(R.id.btnCode).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divCode).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Code)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Keyboard::class.java
|
||||
)
|
||||
) {
|
||||
imageTintList = tintColor
|
||||
}
|
||||
}
|
||||
view.findViewById<ImageView>(R.id.btnLink).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divLink).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Link)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Url::class.java
|
||||
)
|
||||
) {
|
||||
imageTintList = tintColor
|
||||
}
|
||||
}
|
||||
view.findViewById<TextView>(R.id.btnColor).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
view.findViewById<View>(R.id.divColor).visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Color)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.TextColor::class.java
|
||||
)
|
||||
) {
|
||||
setTextColor(tintColor)
|
||||
}
|
||||
}
|
||||
view.findViewById<TextView>(R.id.btnBackground).apply {
|
||||
if (this.id in ids) {
|
||||
visible()
|
||||
}
|
||||
setOnClickListener {
|
||||
onContextMenuButtonClicked(ContextMenuButtonClick.Background)
|
||||
}
|
||||
if (editable.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Highlight::class.java
|
||||
)
|
||||
) {
|
||||
setTextColor(tintColor)
|
||||
}
|
||||
}
|
||||
|
||||
val arrowRight = view.findViewById<FrameLayout>(R.id.arrowRightContainer)
|
||||
arrowRight.setOnClickListener {
|
||||
view.findViewById<HorizontalScrollView>(R.id.scrollContainer)
|
||||
.fullScroll(HorizontalScrollView.FOCUS_RIGHT)
|
||||
}
|
||||
view.findViewById<HorizontalScrollView>(R.id.scrollContainer)
|
||||
.setOnScrollChangeListener { _, scrollX, _, oldScrollX, _ ->
|
||||
if (scrollX != oldScrollX) {
|
||||
if (scrollX == 0) arrowRight.visible() else arrowRight.invisible()
|
||||
} else {
|
||||
arrowRight.visible()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createEnterAnimation(view: View): AnimatorSet? {
|
||||
val animation = AnimatorSet()
|
||||
animation.playTogether(
|
||||
ObjectAnimator.ofFloat(view, View.ALPHA, 0f, 1f)
|
||||
.setDuration(200)
|
||||
)
|
||||
return animation
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the coordinates of this popup for positioning on the screen..
|
||||
*
|
||||
* @param viewPortOnScreen portion of screen we can draw in.
|
||||
* @param selectedContentBounds This is the area of the interesting content that this popup
|
||||
* should avoid obstructing
|
||||
* @param windowLeftOnScreen parent window X margins
|
||||
* @param windowTopOnScreen parent window Y margins
|
||||
*
|
||||
* @return x and y coordinates of popup window
|
||||
*/
|
||||
fun refreshCoordinates(
|
||||
viewPortOnScreen: Rect,
|
||||
selectedContentBounds: Rect,
|
||||
windowLeftOnScreen: Int,
|
||||
windowTopOnScreen: Int
|
||||
): Point {
|
||||
|
||||
val availableHeightAboveContent = selectedContentBounds.top - viewPortOnScreen.top
|
||||
val availableHeightBelowContent = viewPortOnScreen.bottom - selectedContentBounds.bottom
|
||||
val margin = popupMargin * 2
|
||||
val toolbarHeightWithVerticalMargin = popupHeight + margin
|
||||
|
||||
val y = if (availableHeightAboveContent >= toolbarHeightWithVerticalMargin) {
|
||||
// There is enough space at the top of the content.
|
||||
selectedContentBounds.top - toolbarHeightWithVerticalMargin
|
||||
} else if (availableHeightBelowContent >= toolbarHeightWithVerticalMargin) {
|
||||
// There is enough space at the bottom of the content.
|
||||
selectedContentBounds.bottom
|
||||
} else if (availableHeightBelowContent >= popupHeight) {
|
||||
// Just enough space to fit the toolbar with no vertical margins.
|
||||
selectedContentBounds.bottom - popupMargin
|
||||
} else {
|
||||
// Not enough space. Prefer to position as high as possible.
|
||||
viewPortOnScreen.top.coerceAtLeast(selectedContentBounds.top - toolbarHeightWithVerticalMargin)
|
||||
}
|
||||
return Point(0, 0.coerceAtLeast(y - windowTopOnScreen))
|
||||
}
|
||||
|
||||
fun runShowAnimation() {
|
||||
mShowAnimation?.start()
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates buttons state, when markup changed in text
|
||||
*/
|
||||
fun updateMarkupButtons(textRange: IntRange, spanned: Spanned) {
|
||||
contentView.findViewById<ImageView>(R.id.btnBold).apply {
|
||||
imageTintList = if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Bold::class.java
|
||||
)
|
||||
) tintColor else null
|
||||
}
|
||||
contentView.findViewById<ImageView>(R.id.btnItalic).apply {
|
||||
imageTintList = if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Italic::class.java
|
||||
)
|
||||
) tintColor else null
|
||||
}
|
||||
contentView.findViewById<ImageView>(R.id.btnStroke).apply {
|
||||
imageTintList = if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Strikethrough::class.java
|
||||
)
|
||||
) tintColor else null
|
||||
}
|
||||
contentView.findViewById<ImageView>(R.id.btnCode).apply {
|
||||
imageTintList = if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Keyboard::class.java
|
||||
)
|
||||
) tintColor else null
|
||||
}
|
||||
contentView.findViewById<ImageView>(R.id.btnLink).apply {
|
||||
imageTintList = if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Url::class.java
|
||||
)
|
||||
) tintColor else null
|
||||
}
|
||||
contentView.findViewById<TextView>(R.id.btnColor).apply {
|
||||
if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.TextColor::class.java
|
||||
)
|
||||
) setTextColor(tintColor) else setTextColor(textDefaultColor)
|
||||
}
|
||||
contentView.findViewById<TextView>(R.id.btnBackground).apply {
|
||||
if (spanned.isSpanInRange(
|
||||
textRange = textRange,
|
||||
type = Span.Highlight::class.java
|
||||
)
|
||||
) setTextColor(tintColor) else setTextColor(textDefaultColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sealed class ContextMenuButtonClick {
|
||||
object Copy : ContextMenuButtonClick()
|
||||
object Cut : ContextMenuButtonClick()
|
||||
object Paste : ContextMenuButtonClick()
|
||||
object Bold : ContextMenuButtonClick()
|
||||
object Italic : ContextMenuButtonClick()
|
||||
object Stroke : ContextMenuButtonClick()
|
||||
object Code : ContextMenuButtonClick()
|
||||
object Color : ContextMenuButtonClick()
|
||||
object Background : ContextMenuButtonClick()
|
||||
object Link : ContextMenuButtonClick()
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
package com.anytypeio.anytype.ui.profile
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_utils.ui.ViewType
|
||||
import com.anytypeio.anytype.databinding.ItemSelectProfileAddProfileBinding
|
||||
import com.anytypeio.anytype.databinding.ItemSelectProfileProfileBinding
|
||||
|
||||
class SelectProfileAdapter(
|
||||
private val models: MutableList<Model>,
|
||||
private val onAddProfileClicked: () -> Unit,
|
||||
private val onProfileClicked: (Model.Profile) -> Unit
|
||||
) : RecyclerView.Adapter<SelectProfileAdapter.ViewHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
return LayoutInflater.from(parent.context).let { inflater ->
|
||||
when (viewType) {
|
||||
PROFILE_HOLDER -> {
|
||||
ViewHolder.ProfileViewHolder(
|
||||
ItemSelectProfileProfileBinding.inflate(
|
||||
inflater, parent, false
|
||||
)
|
||||
)
|
||||
}
|
||||
ADD_PROFILE_HOLDER -> {
|
||||
ViewHolder.AddProfileViewHolder(
|
||||
ItemSelectProfileAddProfileBinding.inflate(
|
||||
inflater, parent, false
|
||||
)
|
||||
)
|
||||
}
|
||||
else -> throw IllegalStateException("Unexpected type: $viewType")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int) = models[position].getViewType()
|
||||
override fun getItemCount(): Int = models.size
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
when (holder) {
|
||||
is ViewHolder.ProfileViewHolder -> holder.bind(
|
||||
model = models[position],
|
||||
onClick = onProfileClicked
|
||||
)
|
||||
is ViewHolder.AddProfileViewHolder -> holder.bind(
|
||||
onClick = onAddProfileClicked
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun update(update: List<Model>) {
|
||||
models.apply {
|
||||
clear()
|
||||
addAll(update)
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
sealed class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
class ProfileViewHolder(val binding: ItemSelectProfileProfileBinding) :
|
||||
ViewHolder(binding.root) {
|
||||
|
||||
fun bind(
|
||||
model: Model,
|
||||
onClick: (Model.Profile) -> Unit
|
||||
) {
|
||||
check(model is Model.Profile)
|
||||
binding.apply {
|
||||
root.isSelected = model.active
|
||||
name.text = model.name
|
||||
status.text = model.status
|
||||
root.setOnClickListener { onClick(model) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AddProfileViewHolder(val binding: ItemSelectProfileAddProfileBinding) :
|
||||
ViewHolder(binding.root) {
|
||||
fun bind(onClick: () -> Unit) {
|
||||
itemView.setOnClickListener { onClick() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sealed class Model : ViewType {
|
||||
data class Profile(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val status: String,
|
||||
val active: Boolean = false
|
||||
) : Model() {
|
||||
override fun getViewType() = PROFILE_HOLDER
|
||||
}
|
||||
|
||||
object AddProfile : Model() {
|
||||
override fun getViewType() = ADD_PROFILE_HOLDER
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val PROFILE_HOLDER = 0
|
||||
const val ADD_PROFILE_HOLDER = 1
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package com.anytypeio.anytype.ui.profile
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.anytypeio.anytype.core_utils.ui.BaseBottomSheetFragment
|
||||
import com.anytypeio.anytype.databinding.DialogSelectProfileBinding
|
||||
|
||||
class SelectProfileDialog : BaseBottomSheetFragment<DialogSelectProfileBinding>() {
|
||||
|
||||
private val selectProfileAdapter by lazy {
|
||||
SelectProfileAdapter(
|
||||
models = mutableListOf(
|
||||
SelectProfileAdapter.Model.Profile(
|
||||
name = "Konstantin Ivanov",
|
||||
id = "id",
|
||||
status = "20/100 peers",
|
||||
active = true
|
||||
),
|
||||
SelectProfileAdapter.Model.Profile(
|
||||
name = "Evgenii Kozlov",
|
||||
id = "id",
|
||||
status = "20/100 peers"
|
||||
),
|
||||
SelectProfileAdapter.Model.AddProfile
|
||||
),
|
||||
onProfileClicked = {},
|
||||
onAddProfileClicked = {}
|
||||
)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
binding.selectProfileRecycler.apply {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
adapter = selectProfileAdapter
|
||||
}
|
||||
}
|
||||
|
||||
override fun injectDependencies() {}
|
||||
override fun releaseDependencies() {}
|
||||
|
||||
override fun inflateBinding(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?
|
||||
): DialogSelectProfileBinding = DialogSelectProfileBinding.inflate(
|
||||
inflater, container, false
|
||||
)
|
||||
}
|
|
@ -4,20 +4,20 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/dashboard_background"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.settings.system.SettingsActivity">
|
||||
|
||||
<TextView
|
||||
style="@style/DashboardGreetingTextStyle"
|
||||
style="@style/TextView.ContentStyle.Headline.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="@string/settings_screen"
|
||||
android:textColor="@color/text_primary" />
|
||||
android:padding="@dimen/dp_16"
|
||||
android:gravity="center"
|
||||
android:text="@string/settings_screen" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment"
|
||||
android:name="com.anytypeio.anytype.ui.settings.system.PreferenceFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:context=".ui.settings.system.SettingsActivity" />
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
|
@ -19,6 +19,5 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
tools:listitem="@layout/item_select_profile_profile" />
|
||||
android:layout_marginEnd="10dp" />
|
||||
</LinearLayout>
|
|
@ -1,67 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/default_dashboard_background_color">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/sheet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
app:behavior_hideable="true"
|
||||
app:behavior_skipCollapsed="true"
|
||||
app:layout_behavior="@string/bottom_sheet_behavior">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/select"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:translationY="-48dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectText"
|
||||
style="@style/EditorMultiSelectSelectAllButtonTextStyle"
|
||||
android:text="@string/select_all" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.anytypeio.anytype.core_ui.widgets.toolbar.ObjectTopToolbar
|
||||
android:id="@+id/topToolbar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/default_toolbar_height"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="@dimen/editor_recycler_bottom_padding"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.anytypeio.anytype.core_ui.widgets.toolbar.ArchiveToolbarWidget
|
||||
android:id="@+id/bottomMenu"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -51,10 +51,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:alpha="0.5"
|
||||
android:text="@string/do_it_later"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
|
|
@ -40,9 +40,6 @@
|
|||
android:gravity="center"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_add_photo"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
|
@ -1,313 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/dashboardRoot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutDescription="@xml/fragment_dashboard_scene">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widgets"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:visibility="visible"
|
||||
android:text="[Go to Widgets]"
|
||||
android:stateListAnimator="@animator/scale_shrink"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="monospace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSettings"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSettings"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSettings" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formerDashboardWidgetsBin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:visibility="visible"
|
||||
android:text="[Bin]"
|
||||
android:stateListAnimator="@animator/scale_shrink"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="monospace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSettings"
|
||||
app:layout_constraintEnd_toStartOf="@+id/widgets"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSettings" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formerDashboardWidgetsSets"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:visibility="visible"
|
||||
android:text="[Set]"
|
||||
android:stateListAnimator="@animator/scale_shrink"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="monospace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSettings"
|
||||
app:layout_constraintEnd_toStartOf="@+id/formerDashboardWidgetsBin"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSettings" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formerDashboardWidgetsFavorites"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:visibility="visible"
|
||||
android:text="[Fav]"
|
||||
android:stateListAnimator="@animator/scale_shrink"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="monospace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSettings"
|
||||
app:layout_constraintEnd_toStartOf="@+id/formerDashboardWidgetsSets"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSettings" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/formerDashboardWidgetsRecent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:visibility="visible"
|
||||
android:text="[Rec]"
|
||||
android:stateListAnimator="@animator/scale_shrink"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:fontFamily="monospace"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ivSettings"
|
||||
app:layout_constraintEnd_toStartOf="@+id/formerDashboardWidgetsFavorites"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivSettings" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGreeting"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="70dp"
|
||||
android:text="@string/greet_user"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
style="@style/DashboardGreetingTextStyle" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:src="@drawable/ic_dashboard_settings"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.anytypeio.anytype.core_ui.widgets.AvatarWidget
|
||||
android:id="@+id/avatarContainer"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/avatar_ripple"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvGreeting"
|
||||
app:text_size="44sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btnSearch"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@drawable/background_dashboard_button"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btnLibrary"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatarContainer">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_dashboard_search" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btnLibrary"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:background="@drawable/background_dashboard_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatarContainer">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_dashboard_library" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btnAddDoc"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:background="@drawable/background_dashboard_button"
|
||||
app:layout_constraintStart_toEndOf="@+id/btnLibrary"
|
||||
app:layout_constraintTop_toBottomOf="@+id/avatarContainer">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_dashboard_add_doc" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomSheet"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="58dp"
|
||||
android:background="@drawable/background_desktop_bottom_sheet"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btnLibrary">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/topToolbarContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="72dp">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@null"
|
||||
android:layout_marginStart="10dp"
|
||||
app:tabIndicator="@null"
|
||||
app:tabMinWidth="10dp"
|
||||
app:tabPaddingBottom="@dimen/dp_12"
|
||||
app:tabPaddingEnd="10dp"
|
||||
app:tabPaddingStart="10dp"
|
||||
app:tabPaddingTop="@dimen/dp_12"
|
||||
app:tabRippleColor="@null"
|
||||
app:tabSelectedTextColor="@color/text_primary"
|
||||
app:tabTextAppearance="@style/DashboardTabTextStyle"
|
||||
app:tabTextColor="@color/dashboard_card_background" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/selectionTopToolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectAll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/select_all"
|
||||
android:textColor="@color/black"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSelectedCount"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="end|center_vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/black"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:textSize="17sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/dashboardPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/selectionBottomToolbar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/default_toolbar_height"
|
||||
android:orientation="horizontal"
|
||||
android:background="@color/dashboard_background"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDelete"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:background="@drawable/default_ripple"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/delete"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRestore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/default_ripple"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/fragment_dashboard_restore"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.anytypeio.anytype.core_ui.widgets.ObjectRemovalProgressWidget
|
||||
android:id="@+id/objectRemovalProgressBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
|
@ -27,11 +27,11 @@
|
|||
android:paddingBottom="16dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:text="Choose"
|
||||
android:textColor="#ACA996" />
|
||||
android:text="@string/choose"
|
||||
android:textColor="@color/glyph_active" />
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -7,39 +7,31 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:text="Debug settings"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
<com.anytypeio.anytype.core_ui.views.ButtonSecondaryMedium
|
||||
android:id="@+id/btnSync"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@color/white"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:text="Debug Sync"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView2" />
|
||||
|
||||
<Button
|
||||
<com.anytypeio.anytype.core_ui.views.ButtonSecondaryMedium
|
||||
android:id="@+id/btnLocalStore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@color/white"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:text="Debug Local Store"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btnSync" />
|
||||
|
@ -61,11 +53,10 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvSync"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:padding="@dimen/dp_8"
|
||||
android:textColor="@color/black" />
|
||||
android:padding="@dimen/dp_8" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
|
|
@ -62,16 +62,15 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/btnUnsplash"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:text="@string/unsplash"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/glyph_active"
|
||||
android:textSize="17sp" />
|
||||
android:textColor="@color/glyph_active" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnUpload"
|
||||
|
|
|
@ -79,11 +79,10 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/txtEmptyState"
|
||||
style="@style/TextView.UXStyle.Body.Callout.Regular"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:textSize="15sp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/glyph_active"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:text="@string/filter_empty_state" />
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#9BB0B7">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#9BB0B7"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/pagePreviewContainer"
|
||||
layout="@layout/view_link_to_object_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_tab_layout">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
style="@style/DefaultTabLayoutStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/white"
|
||||
app:tabBackground="@drawable/default_tab_indicator"
|
||||
app:tabTextAppearance="@style/DefaultTabTextStyle" />
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/white"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<include
|
||||
android:id="@+id/pagePreviewSmall"
|
||||
layout="@layout/view_link_to_object_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/filterContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="#FFB522" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -67,15 +67,13 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvScreenStateMessage"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="176dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -84,15 +82,14 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvScreenStateSubMessage"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:text="@string/search_no_results_try"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="17sp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
android:paddingBottom="@dimen/dp_16"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="10"
|
||||
tools:listitem="@layout/item_list_base" />
|
||||
tools:listitem="@layout/item_list_object" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
|
@ -46,19 +46,17 @@
|
|||
|
||||
<EditText
|
||||
android:id="@+id/searchObjectTypeInput"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/search"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:textCursorDrawable="@drawable/cursor"
|
||||
android:textSize="15sp"
|
||||
tools:text="Search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -77,20 +77,18 @@
|
|||
|
||||
<EditText
|
||||
android:id="@+id/filterInputField"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:hint="@string/page_icon_picker_emoji_filter"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_tertiary"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/clearSearchText"
|
||||
app:layout_constraintStart_toEndOf="@+id/searchIcon"
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#9BB0B7">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBarLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#9BB0B7"
|
||||
android:elevation="0dp"
|
||||
app:elevation="0dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/pagePreviewContainer"
|
||||
layout="@layout/view_page_preview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_tab_layout">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
style="@style/DefaultTabLayoutStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@color/white"
|
||||
app:tabBackground="@drawable/default_tab_indicator"
|
||||
app:tabTextAppearance="@style/DefaultTabTextStyle" />
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/white"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<include
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/pagePreviewSmall"
|
||||
layout="@layout/view_page_navigation_open_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/filterContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="#FFB522" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -72,8 +72,6 @@
|
|||
android:drawablePadding="26dp"
|
||||
android:text="@string/add_profile"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
android:paddingBottom="@dimen/dp_16"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="10"
|
||||
tools:listitem="@layout/item_list_base" />
|
||||
tools:listitem="@layout/item_list_object" />
|
||||
|
||||
</FrameLayout>
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvMigrationInProgress"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
|
@ -23,7 +24,6 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:text="@string/wait_a_bit_message"
|
||||
android:textColor="@color/text_white"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--typography, buttons 05.04-->
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -15,13 +14,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:fontFamily="monospace"
|
||||
android:textColor="#992AA7EE"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/palette_system_sky"
|
||||
tools:text="0.0.10-alpha" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
|
||||
<com.anytypeio.anytype.core_ui.views.ButtonSecondaryLarge
|
||||
android:id="@+id/signUpButton"
|
||||
style="@style/DefaultStrokeButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/auth_default_button_height"
|
||||
android:layout_marginStart="@dimen/auth_default_margin_start"
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/profileIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -44,8 +42,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_peers"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="15sp" />
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
<?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="68dp"
|
||||
android:background="@drawable/selector_profile_background"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/photo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_add_profile" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="vertical"
|
||||
android:text="@string/add_profile"
|
||||
android:fontFamily="@font/graphik_medium"
|
||||
android:textColor="#ACA996"
|
||||
android:textSize="17sp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -1,43 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
android:background="@drawable/selector_profile_background"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/photo"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/circle_red" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:fontFamily="@font/graphik_medium"
|
||||
android:textSize="17sp"
|
||||
tools:text="Konstantin Ivanov" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="32/129 peers" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,234 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardBackgroundColor="@color/black"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardCornerRadius="10dp">
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/scrollContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnCopy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/graphik_font"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:text="@string/menu_item_copy"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divCopy"
|
||||
android:layout_width="1dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnCut"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/graphik_font"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:text="@string/menu_item_cut"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divCut"
|
||||
android:layout_width="1dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnPaste"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fontFamily="@font/graphik_font"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:text="@string/menu_item_paste"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divPaste"
|
||||
android:layout_width="1dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnBold"
|
||||
style="@style/ActionModePopupButton"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@drawable/ic_menu_bold" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divBold"
|
||||
android:layout_width="1dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnItalic"
|
||||
style="@style/ActionModePopupButton"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@drawable/ic_menu_italic" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divItalic"
|
||||
android:layout_width="1dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnStroke"
|
||||
style="@style/ActionModePopupButton"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@drawable/ic_menu_strike_through" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divStroke"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnCode"
|
||||
style="@style/ActionModePopupButton"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@drawable/ic_menu_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divCode"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnLink"
|
||||
style="@style/ActionModePopupButton"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:src="@drawable/ic_menu_link" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divLink"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/graphik_font"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:text="@string/menu_item_color"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divColor"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:background="#6C6A5F" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnBackground"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/graphik_font"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:text="@string/menu_item_background"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/arrowRightContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/arrow_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:src="@drawable/ic_menu_arrow_right" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="44dp"
|
||||
android:background="#6C6A5F" />
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</FrameLayout>
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/bg_page_nav_filter"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatarSmall"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="18dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/pageTitleSmall"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pageTitleSmall"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitleSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnLinkToObjectSmall"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btnLinkToObjectSmall"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatarSmall"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnLinkToObjectSmall"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture " />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLinkToObjectSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="@string/link"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_page_preview_layout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLinkToThisObject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:text="@string/link_to_this_page"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageSubtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageSubtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:lineSpacingMultiplier="1.21"
|
||||
android:maxLines="3"
|
||||
android:textColor="#6C6A5F"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageTitle"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture characterized by curving faсt"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/documentIconContainer"
|
||||
tools:text="Zaha Hadid" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/documentIconContainer"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@drawable/rectangle_default_page_logo_background"
|
||||
android:transitionName="@string/logo_transition"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/emojiIcon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageIcon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnLinkToThisObject"
|
||||
app:layout_constraintStart_toStartOf="@+id/btnLinkToThisObject"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnLinkToThisObject"
|
||||
app:srcCompat="@drawable/ic_open_as_page" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/bg_page_nav_filter"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatarSmall"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="18dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/pageTitleSmall"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pageTitleSmall"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitleSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnMoveToSmall"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btnMoveToSmall"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatarSmall"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnMoveToSmall"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture " />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnMoveToSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="@string/move_into"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_page_preview_layout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnMoveTo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:text="@string/move_into_this_page"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageSubtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageSubtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:lineSpacingMultiplier="1.21"
|
||||
android:maxLines="3"
|
||||
android:textColor="#6C6A5F"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageTitle"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture characterized by curving faсt"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/documentIconContainer"
|
||||
tools:text="Zaha Hadid" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/documentIconContainer"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@drawable/rectangle_default_page_logo_background"
|
||||
android:transitionName="@string/logo_transition"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/emojiIcon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageIcon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnMoveTo"
|
||||
app:layout_constraintStart_toStartOf="@+id/btnMoveTo"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnMoveTo"
|
||||
app:srcCompat="@drawable/ic_open_as_page" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:animateLayoutChanges="true"
|
||||
android:background="@drawable/bg_page_nav_filter"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatarSmall"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="18dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/pageTitleSmall"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pageTitleSmall"
|
||||
tools:srcCompat="@tools:sample/avatars" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitleSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnOpenPageSmall"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btnOpenPageSmall"
|
||||
app:layout_constraintStart_toEndOf="@+id/avatarSmall"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnOpenPageSmall"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture " />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnOpenPageSmall"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="@string/btn_nav_open"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_page_preview_layout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnOpenPage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/rounded_button_nav_open"
|
||||
android:drawablePadding="0dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="center"
|
||||
android:paddingTop="7dp"
|
||||
android:paddingBottom="7dp"
|
||||
android:text="@string/nav_open_page"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageSubtitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageSubtitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:lineSpacingMultiplier="1.21"
|
||||
android:maxLines="3"
|
||||
android:textColor="#6C6A5F"
|
||||
android:textSize="15sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvPageTitle"
|
||||
tools:text="The Iraqi-British Zaha Hadid became famous for her intensely futuristic architecture characterized by curving faсt"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPageTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:textColor="#2C2B27"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/documentIconContainer"
|
||||
tools:text="Zaha Hadid" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/documentIconContainer"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@drawable/rectangle_default_page_logo_background"
|
||||
android:transitionName="@string/logo_transition"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/emojiIcon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageIcon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btnOpenPage"
|
||||
app:layout_constraintStart_toStartOf="@+id/btnOpenPage"
|
||||
app:layout_constraintTop_toTopOf="@+id/btnOpenPage"
|
||||
app:srcCompat="@drawable/ic_open_as_page" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -461,16 +461,6 @@
|
|||
android:name="com.anytypeio.anytype.ui.settings.DebugSettingsFragment"
|
||||
android:label="DebugSettingsFragment"
|
||||
tools:layout="@layout/fragment_debug_settings" />
|
||||
<fragment
|
||||
android:id="@+id/pageNavigationFragment"
|
||||
android:name="com.anytypeio.anytype.ui.navigation.PageNavigationFragment"
|
||||
android:label="PageNavigationFragment"
|
||||
tools:layout="@layout/fragment_page_navigation">
|
||||
<argument
|
||||
android:name="ID_KEY"
|
||||
android:defaultValue='""'
|
||||
app:argType="string" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/pageSearchFragment"
|
||||
android:name="com.anytypeio.anytype.ui.search.ObjectSearchFragment"
|
||||
|
@ -572,10 +562,6 @@
|
|||
app:argType="boolean" />
|
||||
</dialog>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/archiveFragment"
|
||||
android:name="com.anytypeio.anytype.ui.archive.ArchiveFragment"
|
||||
android:label="ArchiveFragment" />
|
||||
<fragment
|
||||
android:id="@+id/fullScreenImageFragment"
|
||||
android:name="com.anytypeio.anytype.ui.editor.gallery.FullScreenPictureFragment"
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthHeaderStyle">
|
||||
<item name="android:fontFamily">@font/inter_bold</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textSize">22sp</item>
|
||||
<style name="AuthHeaderStyle" parent="TextView.ContentStyle.Headline.Heading">
|
||||
</style>
|
||||
|
||||
<style name="PinCodeKeyboardNumber">
|
||||
<style name="PinCodeKeyboardNumber" parent="TextView.ContentStyle.Headline.Title">
|
||||
<item name="android:stateListAnimator">@animator/scale_shrink</item>
|
||||
<item name="android:clickable">true</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:background">@drawable/selector_pin_code_keyboard</item>
|
||||
</style>
|
||||
|
||||
|
@ -25,91 +19,6 @@
|
|||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="ProfileItem">
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ProfileItemDivider">
|
||||
<item name="android:background">@color/shape_primary</item>
|
||||
<item name="android:layout_marginStart">20dp</item>
|
||||
<item name="android:layout_marginEnd">20dp</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultTabLayoutStyle" parent="Widget.MaterialComponents.TabLayout.Colored">
|
||||
<item name="tabTextColor">#ACA996</item>
|
||||
<item name="tabSelectedTextColor">#E89D00</item>
|
||||
<item name="tabIndicatorColor">#FFB522</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultTabTextStyle" parent="TextAppearance.Design.Tab">
|
||||
<item name="textAllCaps">false</item>
|
||||
<item name="android:textAllCaps">false</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="fontFamily">@font/inter_medium</item>
|
||||
</style>
|
||||
|
||||
<style name="SearchViewStyle" parent="Widget.AppCompat.SearchView">
|
||||
<item name="android:textColorHint">#ACA996</item>
|
||||
</style>
|
||||
|
||||
<style name="HomeDashboardGreetingStyle">
|
||||
<item name="android:fontFamily">@font/graphik_semibold</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">34sp</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardDocumentTitleStyle">
|
||||
<item name="android:fontFamily">@font/inter_medium</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="singleLine">true</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardDocAlternativeTitleStyle">
|
||||
<item name="android:fontFamily">@font/inter_medium</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textColorHint">@color/text_tertiary</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:maxLines">3</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardDocumentSubtitleStyle">
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="singleLine">true</item>
|
||||
<item name="android:textColor">@color/text_secondary</item>
|
||||
<item name="android:textColorHint">@color/text_tertiary</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="KeychainDialogTitleStyle">
|
||||
<item name="fontFamily">@font/inter_bold</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:textSize">22sp</item>
|
||||
</style>
|
||||
|
||||
<style name="KeychainDialogSubtitleStyle">
|
||||
<item name="fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:lineSpacingExtra">4sp</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
</style>
|
||||
|
||||
<style name="KeychainDialogKeychainStyle">
|
||||
<item name="android:background">@drawable/keychain_ripple</item>
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:lineSpacingExtra">2sp</item>
|
||||
<item name="android:textColor">@color/keychain_text_color</item>
|
||||
<item name="android:textIsSelectable">true</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TopRoundedCardView" parent="@style/Widget.MaterialComponents.CardView">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.MaterialCardView.Cut</item>
|
||||
</style>
|
||||
|
@ -122,84 +31,6 @@
|
|||
<item name="cornerSizeBottomLeft">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="DocMenuOptionTextStyle">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="CreateViewerViewerNameStyle">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="EditViewerViewerNameStyle">
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:fontFamily">@font/inter_medium</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultOrangeTextButtonStyle">
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">#E89D00</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultGrayTextButtonStyle">
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">#ACA996</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultDataViewModalHeaderStyle">
|
||||
<item name="android:fontFamily">@font/inter_semibold</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="RelationValueActionHeaderStyle">
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:gravity">start|center_vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="DataViewComingSoonStyle">
|
||||
<item name="android:textColor">#CBC9BD</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
</style>
|
||||
|
||||
<style name="FilterConditionTextStyle">
|
||||
<item name="android:drawablePadding">2dp</item>
|
||||
<item name="android:fontFamily">@font/inter_regular</item>
|
||||
<item name="android:textColor">#6C6A5F</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultCellRelationHeaderStyle">
|
||||
<item name="android:textSize">17sp</item>
|
||||
<item name="android:fontFamily">@font/inter_semibold</item>
|
||||
<item name="android:letterSpacing">-0.01</item>
|
||||
<item name="android:textColor">@color/text_primary</item>
|
||||
<item name="android:layout_gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectRelationValueCounterStyle">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:fontFamily">@font/inter_medium</item>
|
||||
<item name="android:backgroundTint">#E89D00</item>
|
||||
<item name="android:background">@drawable/circle_solid_default</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardTabTextStyle">
|
||||
<item name="android:fontFamily">@font/inter_bold</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
</style>
|
||||
|
||||
<style name="dataViewTextErrorStyle" parent="TextView.UXStyle.Captions.2.Regular">
|
||||
<item name="android:padding">32dp</item>
|
||||
<item name="android:textAlignment">center</item>
|
||||
|
@ -211,22 +42,4 @@
|
|||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:textColor">@color/text_tertiary</item>
|
||||
</style>
|
||||
|
||||
<style name="DefaultTextViewErrorStyle">
|
||||
<item name="lineHeight">18dp</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:fontFamily">monospace</item>
|
||||
<item name="android:textColor">@color/palette_dark_red</item>
|
||||
<item name="maxLines">4</item>
|
||||
</style>
|
||||
|
||||
<style name="DashboardGreetingTextStyle">
|
||||
<item name="android:fontFamily">@font/inter_bold</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
<item name="android:ellipsize">end</item>
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:textColor">@color/text_white</item>
|
||||
<item name="android:textSize">28sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -1,25 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.dataview
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import com.anytypeio.anytype.core_ui.common.AbstractAdapter
|
||||
import com.anytypeio.anytype.core_ui.common.AbstractViewHolder
|
||||
import com.anytypeio.anytype.core_ui.databinding.ItemViewerGridBinding
|
||||
|
||||
class ViewerListAdapter(items: List<String> = emptyList()) : AbstractAdapter<String>(items) {
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
): AbstractViewHolder<String> = Holder(
|
||||
ItemViewerGridBinding.inflate(
|
||||
LayoutInflater.from(parent.context), parent, false
|
||||
)
|
||||
)
|
||||
|
||||
class Holder(val binding: ItemViewerGridBinding) : AbstractViewHolder<String>(binding.root) {
|
||||
override fun bind(item: String) {
|
||||
binding.tvTitle.text = item
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.dataview
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.core_ui.databinding.ItemDvViewerTabBinding
|
||||
import com.anytypeio.anytype.presentation.sets.model.ViewerTabView
|
||||
|
||||
@Deprecated("Outdated.")
|
||||
class ViewerTabItemAdapter(
|
||||
private var tabs: List<ViewerTabView> = emptyList(),
|
||||
private val onViewerTabClicked: (String) -> Unit,
|
||||
private val onAddNewViewerClicked: () -> Unit
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
override fun getItemCount(): Int = tabs.size + 1
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return if (position >= tabs.size)
|
||||
PLUS_TYPE
|
||||
else
|
||||
TAB_TYPE
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if (holder is TabHolder) holder.bind(tabs[position])
|
||||
}
|
||||
|
||||
fun update(update: List<ViewerTabView>) {
|
||||
tabs = update
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
parent: ViewGroup, viewType: Int
|
||||
): RecyclerView.ViewHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
return when (viewType) {
|
||||
TAB_TYPE -> {
|
||||
TabHolder(ItemDvViewerTabBinding.inflate(inflater, parent, false)).apply {
|
||||
itemView.setOnClickListener {
|
||||
val pos = bindingAdapterPosition
|
||||
if (pos != RecyclerView.NO_POSITION) {
|
||||
onViewerTabClicked(tabs[pos].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PLUS_TYPE -> {
|
||||
val view = inflater.inflate(R.layout.item_dv_viewer_tab_plus, parent, false)
|
||||
NewTabHolder(view).apply {
|
||||
itemView.setOnClickListener {
|
||||
onAddNewViewerClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> throw IllegalStateException("Unexpected view type: $viewType")
|
||||
}
|
||||
}
|
||||
|
||||
class TabHolder(val binding: ItemDvViewerTabBinding) : RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
private val title = binding.tvTabTitle
|
||||
|
||||
fun bind(item: ViewerTabView) {
|
||||
title.text = item.name
|
||||
title.isActivated = item.isActive
|
||||
}
|
||||
}
|
||||
|
||||
class NewTabHolder(view: View) : RecyclerView.ViewHolder(view)
|
||||
|
||||
companion object {
|
||||
const val TAB_TYPE = 0
|
||||
const val PLUS_TYPE = 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.dataview
|
||||
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.core_ui.common.AbstractAdapter
|
||||
import com.anytypeio.anytype.core_ui.common.AbstractViewHolder
|
||||
|
||||
class ViewerTitleAdapter(items: List<String> = listOf()) : AbstractAdapter<String>(items) {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AbstractViewHolder<String> {
|
||||
return Holder(view = inflate(parent, R.layout.item_viewer_title))
|
||||
}
|
||||
|
||||
class Holder(view: View) : AbstractViewHolder<String>(view) {
|
||||
override fun bind(item: String) {
|
||||
itemView.findViewById<TextView>(R.id.tvTitle).text = item
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,138 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.dataview
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.HorizontalScrollView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.children
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.presentation.sets.model.Viewer
|
||||
import timber.log.Timber
|
||||
|
||||
class ViewerTypeAdapter(
|
||||
private var items: List<Viewer> = emptyList(),
|
||||
private val gridAdapter: ViewerGridAdapter,
|
||||
private val gridHeaderAdapter: ViewerGridHeaderAdapter,
|
||||
private val listAdapter: ViewerListAdapter
|
||||
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private val pool = RecyclerView.RecycledViewPool()
|
||||
|
||||
init {
|
||||
setHasStableIds(true)
|
||||
}
|
||||
|
||||
fun update(viewer: Viewer) {
|
||||
Timber.d("Updating adapter")
|
||||
items = listOf(viewer)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun getItemViewType(position: Int): Int = when (val item = items[position]) {
|
||||
is Viewer.GridView -> HOLDER_GRID
|
||||
is Viewer.ListView -> HOLDER_LIST
|
||||
else -> throw IllegalStateException("Unsupported type: $item")
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
Timber.d("onCreateViewHolder")
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
val view = inflater.inflate(R.layout.item_viewer_container, parent, false)
|
||||
return when (viewType) {
|
||||
HOLDER_GRID -> GridHolder(view).apply {
|
||||
rows.setRecycledViewPool(pool)
|
||||
}
|
||||
HOLDER_LIST -> ListHolder(view)
|
||||
else -> throw RuntimeException("Unknown adapter type")
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
Timber.d("onBindViewHolder")
|
||||
when (holder) {
|
||||
is GridHolder -> holder.bind(
|
||||
viewer = items[position] as Viewer.GridView,
|
||||
gridAdapter = gridAdapter,
|
||||
headerAdapter = gridHeaderAdapter
|
||||
)
|
||||
is ListHolder -> holder.bind(listAdapter)
|
||||
}
|
||||
}
|
||||
|
||||
class GridHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
val columns: RecyclerView = itemView.findViewById(R.id.rvHeader)
|
||||
val rows: RecyclerView = itemView.findViewById(R.id.rvRows)
|
||||
|
||||
private val horizontalDivider =
|
||||
ContextCompat.getDrawable(view.context, R.drawable.divider_dv_horizontal)
|
||||
private val verticalDivider =
|
||||
ContextCompat.getDrawable(view.context, R.drawable.divider_dv_grid)
|
||||
|
||||
init {
|
||||
rows.setItemViewCacheSize(20)
|
||||
columns.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
itemView.context,
|
||||
DividerItemDecoration.HORIZONTAL
|
||||
).apply {
|
||||
if (horizontalDivider != null) setDrawable(horizontalDivider)
|
||||
}
|
||||
)
|
||||
rows.addItemDecoration(
|
||||
DividerItemDecoration(
|
||||
itemView.context,
|
||||
DividerItemDecoration.VERTICAL
|
||||
).apply {
|
||||
if (verticalDivider != null) setDrawable(verticalDivider)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun bind(
|
||||
viewer: Viewer.GridView,
|
||||
gridAdapter: ViewerGridAdapter,
|
||||
headerAdapter: ViewerGridHeaderAdapter
|
||||
) {
|
||||
Timber.d("Binding grid")
|
||||
|
||||
if (columns.adapter == null) {
|
||||
Timber.d("Setting columns adapter")
|
||||
columns.adapter = headerAdapter
|
||||
}
|
||||
if (rows.adapter == null) {
|
||||
Timber.d("Setting rows adapter")
|
||||
rows.adapter = gridAdapter
|
||||
}
|
||||
|
||||
headerAdapter.submitList(viewer.columns)
|
||||
gridAdapter.submitList(viewer.rows)
|
||||
|
||||
itemView.findViewById<HorizontalScrollView>(R.id.horizontalScrollView)
|
||||
.setOnScrollChangeListener { _, scrollX, _, _, _ ->
|
||||
val translationX = scrollX.toFloat()
|
||||
gridAdapter.recordNamePositionX = translationX
|
||||
rows.children.forEach { view ->
|
||||
view.findViewById<ViewGroup>(R.id.headerContainer).translationX =
|
||||
translationX
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ListHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
fun bind(adapter: ViewerListAdapter) {
|
||||
itemView.findViewById<RecyclerView>(R.id.rvRows).adapter = adapter
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val HOLDER_GRID = 1
|
||||
const val HOLDER_LIST = 2
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.dataview.modals
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.presentation.sets.model.TagValue
|
||||
|
||||
class TagAdapter(private val tags: List<TagValue>) : RecyclerView.Adapter<TagAdapter.TagHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TagHolder {
|
||||
return TagHolder(
|
||||
LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.modal_item_filter_tag_value, parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TagHolder, position: Int) {
|
||||
holder.bind(tags[position])
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = tags.size
|
||||
|
||||
inner class TagHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
fun bind(tag: TagValue) {
|
||||
itemView.findViewById<TextView>(R.id.tagTitle).text = tag.text
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.navigation
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.databinding.ViewPageLinksFilterBinding
|
||||
import com.anytypeio.anytype.core_utils.ext.invisible
|
||||
import com.anytypeio.anytype.core_utils.ext.toast
|
||||
import com.anytypeio.anytype.core_utils.ext.visible
|
||||
import com.anytypeio.anytype.presentation.navigation.ObjectView
|
||||
import com.anytypeio.anytype.presentation.navigation.filterBy
|
||||
|
||||
class FilterView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
private val recycler: RecyclerView
|
||||
private val cancel: TextView
|
||||
private val sorting: View
|
||||
private var links: MutableList<ObjectView> = mutableListOf()
|
||||
|
||||
|
||||
val binding = ViewPageLinksFilterBinding.inflate(
|
||||
LayoutInflater.from(context), this, true
|
||||
)
|
||||
|
||||
val inputField: EditText get() = binding.searchWidget.filterInputField
|
||||
|
||||
var cancelClicked: (() -> Unit)? = null
|
||||
var pageClicked: ((String) -> Unit)? = null
|
||||
|
||||
init {
|
||||
recycler = binding.recyclerView
|
||||
cancel = binding.btnCancel
|
||||
sorting = binding.icSorting
|
||||
recycler.layoutManager = LinearLayoutManager(context)
|
||||
cancel.setOnClickListener { cancelClicked?.invoke() }
|
||||
sorting.setOnClickListener { context.toast("Not implemented yet") }
|
||||
binding.searchWidget.clearSearchText.setOnClickListener {
|
||||
binding.searchWidget.filterInputField.setText(EMPTY_FILTER_TEXT)
|
||||
binding.searchWidget.clearSearchText.invisible()
|
||||
}
|
||||
binding.searchWidget.filterInputField.doAfterTextChanged { newText ->
|
||||
if (newText != null && recycler.adapter != null) {
|
||||
(recycler.adapter as PageLinksAdapter).let {
|
||||
val filtered = links.filterBy(newText.toString())
|
||||
it.updateLinks(filtered)
|
||||
}
|
||||
}
|
||||
if (newText.isNullOrEmpty()) {
|
||||
binding.searchWidget.clearSearchText.invisible()
|
||||
} else {
|
||||
binding.searchWidget.clearSearchText.visible()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun bind(links: MutableList<ObjectView>) {
|
||||
this.links.clear()
|
||||
this.links.addAll(links)
|
||||
if (recycler.adapter == null) {
|
||||
recycler.adapter = PageLinksAdapter(
|
||||
data = links,
|
||||
onClick = { obj, layout -> pageClicked?.invoke(obj) }
|
||||
)
|
||||
} else {
|
||||
(recycler.adapter as PageLinksAdapter).updateLinks(links)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val EMPTY_FILTER_TEXT = ""
|
||||
}
|
||||
}
|
|
@ -7,76 +7,15 @@ import android.widget.TextView
|
|||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_models.Id
|
||||
import com.anytypeio.anytype.core_models.ObjectType
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.core_ui.databinding.ItemListObjectBinding
|
||||
import com.anytypeio.anytype.core_ui.widgets.ObjectIconWidget
|
||||
import com.anytypeio.anytype.core_utils.ext.gone
|
||||
import com.anytypeio.anytype.core_utils.ext.visible
|
||||
import com.anytypeio.anytype.presentation.navigation.DefaultObjectView
|
||||
import com.anytypeio.anytype.presentation.navigation.DefaultSearchItem
|
||||
import com.anytypeio.anytype.presentation.navigation.ObjectView
|
||||
import com.anytypeio.anytype.presentation.objects.ObjectIcon
|
||||
import com.anytypeio.anytype.presentation.search.ObjectSearchSection
|
||||
import com.anytypeio.anytype.presentation.widgets.source.BundledWidgetSourceView
|
||||
|
||||
@Deprecated("LEGACY SUSPECT")
|
||||
class PageLinksAdapter(
|
||||
private var data: List<ObjectView>,
|
||||
private val onClick: (Id, ObjectType.Layout?) -> Unit
|
||||
) : RecyclerView.Adapter<PageLinksAdapter.PageLinkHolder>() {
|
||||
|
||||
fun updateLinks(links: List<ObjectView>) {
|
||||
data = links
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
): PageLinkHolder = PageLinkHolder(
|
||||
binding = ItemListObjectBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
).apply {
|
||||
itemView.setOnClickListener {
|
||||
val pos = bindingAdapterPosition
|
||||
if (pos != RecyclerView.NO_POSITION) {
|
||||
onClick(data[pos].id, data[pos].layout)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = data.size
|
||||
|
||||
override fun onBindViewHolder(holderLink: PageLinkHolder, position: Int) {
|
||||
holderLink.bind(data[position])
|
||||
}
|
||||
|
||||
class PageLinkHolder(val binding: ItemListObjectBinding) :
|
||||
RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
private val untitled = itemView.resources.getString(R.string.untitled)
|
||||
private val title = binding.tvTitle
|
||||
private val subtitle = binding.tvSubtitle
|
||||
private val icon = binding.ivIcon
|
||||
|
||||
fun bind(link: ObjectView) {
|
||||
title.text = link.title.ifEmpty { untitled }
|
||||
if (link.subtitle.isBlank()) {
|
||||
subtitle.gone()
|
||||
} else {
|
||||
subtitle.visible()
|
||||
subtitle.text = link.subtitle
|
||||
}
|
||||
icon.setIcon(link.icon)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DefaultObjectViewAdapter(
|
||||
private val onDefaultObjectClicked: (DefaultObjectView) -> Unit,
|
||||
private val onBundledWidgetSourceClicked: (BundledWidgetSourceView) -> Unit = {}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.navigation
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.core_ui.databinding.ItemPageLinkListBinding
|
||||
import com.anytypeio.anytype.core_ui.extensions.toast
|
||||
import com.anytypeio.anytype.core_utils.ui.BottomOffsetDecoration
|
||||
import com.anytypeio.anytype.presentation.navigation.ObjectView
|
||||
|
||||
@Deprecated("Maybe legacy?")
|
||||
class PageLinksListHolder(
|
||||
val binding: ItemPageLinkListBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
|
||||
private val recycler = binding.recyclerView
|
||||
private val searchView = binding.searchView
|
||||
private val sorting = binding.icSorting
|
||||
|
||||
fun bind(
|
||||
links: List<ObjectView>,
|
||||
onClick: (String) -> Unit,
|
||||
onSearchClick: () -> Unit
|
||||
) {
|
||||
sorting.setOnClickListener { recycler.context.toast("Not implemented yet") }
|
||||
searchView.setOnClickListener { onSearchClick() }
|
||||
with(recycler) {
|
||||
if (layoutManager == null) {
|
||||
layoutManager = LinearLayoutManager(context)
|
||||
val offset =
|
||||
context.resources.getDimensionPixelOffset(R.dimen.default_page_links_bottom_offset)
|
||||
addItemDecoration(BottomOffsetDecoration(offset))
|
||||
}
|
||||
if (adapter == null) {
|
||||
adapter = PageLinksAdapter(links.toMutableList()) { obj, _ ->
|
||||
onClick(obj)
|
||||
}
|
||||
} else {
|
||||
(adapter as PageLinksAdapter).updateLinks(links)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.navigation
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.databinding.ItemPageLinkListBinding
|
||||
import com.anytypeio.anytype.presentation.navigation.ObjectView
|
||||
|
||||
class PageNavigationAdapter(
|
||||
private val onClick: (String) -> Unit,
|
||||
private val onSearchClick: (MutableList<ObjectView>) -> Unit
|
||||
) : RecyclerView.Adapter<PageLinksListHolder>() {
|
||||
|
||||
private var inbound = mutableListOf<ObjectView>()
|
||||
private var outbound = mutableListOf<ObjectView>()
|
||||
|
||||
fun setPageLinks(inbound: List<ObjectView>, outbound: List<ObjectView>) {
|
||||
this.inbound.clear()
|
||||
this.inbound.addAll(inbound)
|
||||
this.outbound.clear()
|
||||
this.outbound.addAll(outbound)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: PageLinksListHolder, position: Int) {
|
||||
if (position == 0) {
|
||||
holder.bind(inbound, onClick, { onSearchClick.invoke(inbound) })
|
||||
} else {
|
||||
holder.bind(outbound, onClick, { onSearchClick.invoke(outbound) })
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): PageLinksListHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
return PageLinksListHolder(
|
||||
binding = ItemPageLinkListBinding.inflate(
|
||||
inflater, parent, false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = 2
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.navigation
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
|
||||
class PageNavigationLinksFragment : Fragment(R.layout.item_page_link_list) {
|
||||
|
||||
companion object {
|
||||
|
||||
val ARG_TYPE = "arg.navigation.fragment.type"
|
||||
|
||||
fun newInstance(type: Int): PageNavigationLinksFragment =
|
||||
PageNavigationLinksFragment()
|
||||
.apply {
|
||||
val bundle = Bundle().apply {
|
||||
putInt(ARG_TYPE, type)
|
||||
}
|
||||
arguments = bundle
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.features.sets
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
|
||||
class CreateSetHeaderAdapter(
|
||||
private val onCreateNewObjectTypeClicked: () -> Unit
|
||||
) : RecyclerView.Adapter<CreateSetHeaderAdapter.ViewHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
return ViewHolder(
|
||||
view = inflater.inflate(
|
||||
R.layout.item_create_set_header,
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
holder.bind(onCreateNewObjectTypeClicked)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = 1
|
||||
|
||||
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
|
||||
val container: ConstraintLayout = itemView.findViewById(R.id.createNewContainer)
|
||||
|
||||
fun bind(onCreateNewObjectTypeClicked: () -> Unit) {
|
||||
container.setOnClickListener {
|
||||
onCreateNewObjectTypeClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,10 +18,10 @@ class ButtonPrimaryNumber @JvmOverloads constructor(
|
|||
val binding = DsButtonNumberBinding.inflate(LayoutInflater.from(context), this)
|
||||
|
||||
init {
|
||||
context.obtainStyledAttributes(attrs, R.styleable.ButtonPrimaryNumber).use {
|
||||
val text = it.getString(R.styleable.ButtonPrimaryNumber_buttonTitle)
|
||||
binding.button.text = text
|
||||
}
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ButtonPrimaryNumber)
|
||||
val text = typedArray.getString(R.styleable.ButtonPrimaryNumber_buttonTitle)
|
||||
binding.button.text = text
|
||||
typedArray.recycle()
|
||||
}
|
||||
|
||||
fun setNumber(num: String) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.graphics.Color
|
|||
import android.text.TextUtils
|
||||
import android.util.AttributeSet
|
||||
import android.util.TypedValue
|
||||
import android.view.ContextThemeWrapper
|
||||
import android.view.Gravity
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
|
@ -37,6 +38,8 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
private var defaultBottomMargin = resources.getDimension(R.dimen.dp_1).toInt()
|
||||
private var defaultTextSize = 0f
|
||||
|
||||
private val style = R.style.GalleryViewContentWidgetStyle
|
||||
private val themeWrapper = ContextThemeWrapper(context, style)
|
||||
private val defaultTextColor = context.getColor(R.color.text_secondary)
|
||||
|
||||
init {
|
||||
|
@ -58,14 +61,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
when (relation) {
|
||||
is DefaultObjectRelationValueView.Text -> {
|
||||
if (!relation.text.isNullOrEmpty()) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = relation.text
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -77,14 +78,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
is DefaultObjectRelationValueView.Url -> {
|
||||
if (!relation.url.isNullOrEmpty()) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = relation.url
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -96,14 +95,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
is DefaultObjectRelationValueView.Email -> {
|
||||
if (!relation.email.isNullOrEmpty()) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = relation.email
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -115,14 +112,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
is DefaultObjectRelationValueView.Number -> {
|
||||
if (relation.number != null) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = relation.number
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -134,14 +129,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
is DefaultObjectRelationValueView.Phone -> {
|
||||
if (relation.phone != null) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = relation.phone
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -153,7 +146,7 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
is DefaultObjectRelationValueView.Date -> {
|
||||
if (relation.timeInMillis != null) {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
|
@ -162,8 +155,6 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
isMillis = true,
|
||||
format = relation.dateFormat
|
||||
)
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -178,12 +169,11 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
if (status != null) {
|
||||
val color = ThemeColor.values().find { v -> v.code == status.color }
|
||||
val defaultTextColor = resources.getColor(R.color.text_primary, null)
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
text = status.status
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
if (color != null) {
|
||||
setTextColor(resources.dark(color, defaultTextColor))
|
||||
|
@ -272,7 +262,7 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
.into(image)
|
||||
}
|
||||
is ObjectIcon.Profile.Avatar -> {
|
||||
val avatar = TextView(context).apply {
|
||||
val avatar = TextView(themeWrapper).apply {
|
||||
gravity = Gravity.CENTER
|
||||
isAllCaps = true
|
||||
setBackgroundResource(R.drawable.circle_default_avatar_background)
|
||||
|
@ -342,15 +332,13 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
|
||||
val noIcon = obj.icon == ObjectIcon.None || obj.icon is ObjectIcon.Basic.Avatar
|
||||
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
setHint(R.string.untitled)
|
||||
text = obj.name
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
}
|
||||
group.addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
@ -376,13 +364,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
val color = ThemeColor.values().find { v -> v.code == tag.color }
|
||||
val defaultTextColor = resources.getColor(R.color.text_primary, null)
|
||||
val defaultBackground = resources.getColor(R.color.shape_primary, null)
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = tag.tag
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
if (color != null) {
|
||||
setTextColor(resources.dark(color, defaultTextColor))
|
||||
setBackgroundResource(R.drawable.rect_dv_cell_tag_item)
|
||||
|
@ -417,14 +404,12 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
relation.files.forEachIndexed { idx, file ->
|
||||
val filename = file.name + "." + file.ext
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
isSingleLine = true
|
||||
maxLines = 1
|
||||
ellipsize = TextUtils.TruncateAt.END
|
||||
text = filename
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
setTextColor(defaultTextColor)
|
||||
setHint(R.string.untitled)
|
||||
}
|
||||
group.addView(view)
|
||||
|
@ -444,10 +429,9 @@ class GalleryViewContentWidget @JvmOverloads constructor(
|
|||
}
|
||||
}
|
||||
else -> {
|
||||
val view = TextView(context).apply {
|
||||
val view = TextView(themeWrapper).apply {
|
||||
id = generateViewId()
|
||||
text = relation::class.java.simpleName
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, defaultTextSize)
|
||||
}
|
||||
addView(view)
|
||||
view.updateLayoutParams<LayoutParams> {
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
package com.anytypeio.anytype.core_ui.widgets.toolbar
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.anytypeio.anytype.core_ui.R
|
||||
import com.anytypeio.anytype.core_ui.databinding.WidgetArchiveToolbarBinding
|
||||
import com.anytypeio.anytype.core_ui.extensions.color
|
||||
|
||||
class ArchiveToolbarWidget @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
val binding = WidgetArchiveToolbarBinding.inflate(
|
||||
LayoutInflater.from(context), this, true
|
||||
)
|
||||
|
||||
fun update(count: Int) = with(binding) {
|
||||
tvSelect.text = resources.getQuantityString(R.plurals.page_selected, count, count)
|
||||
val color = if (count == 0) {
|
||||
R.color.toolbar_archive_button_disable
|
||||
} else {
|
||||
R.color.black
|
||||
}
|
||||
btnRestore.setTextColor(context.color(color))
|
||||
}
|
||||
}
|
|
@ -15,13 +15,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/percentText"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="Loading, please wait..."
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="21sp" />
|
||||
android:text="Loading, please wait..." />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/mProgressBar"
|
||||
|
@ -33,7 +32,7 @@
|
|||
android:progressDrawable="@drawable/progressbar" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<com.anytypeio.anytype.core_ui.views.ButtonSecondaryMedium
|
||||
android:id="@+id/btnCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -108,15 +108,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/loadBookmarkPictureError"
|
||||
style="@style/TextView.UXStyle.Captions.2.Regular"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.5"
|
||||
android:fontFamily="monospace"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text="@string/error_while_loading_picture"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/bookmarkImage"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/errorMessage"
|
||||
style="@style/UploadMediaTextStyle"
|
||||
style="@style/UploadMediaInActiveTextStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/editUrl"
|
||||
style="@style/UploadMediaTextStyle"
|
||||
style="@style/UploadMediaInActiveTextStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvPlaceholder"
|
||||
style="@style/RelationPlaceholderTextStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="@string/set_new_relation"
|
||||
android:textColor="@color/palette_dark_grey" />
|
||||
android:text="@string/set_new_relation" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -36,12 +36,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/imageText"
|
||||
style="@style/TextView.ContentStyle.Initials"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="64sp"
|
||||
tools:text="S" />
|
||||
|
||||
|
@ -51,6 +50,7 @@
|
|||
|
||||
<com.anytypeio.anytype.core_ui.widgets.text.TextInputWidget
|
||||
android:id="@+id/title"
|
||||
style="@style/BlockTitleContentStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
|
@ -59,11 +59,7 @@
|
|||
android:layout_marginBottom="13dp"
|
||||
android:background="@null"
|
||||
android:textAlignment="center"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:hint="@string/untitled"
|
||||
android:textColorHint="@color/editor_default_hint_text_color"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="28sp"
|
||||
app:ignoreDragAndDrop="true"
|
||||
app:onlyPasteAsPlaneText="true"
|
||||
tools:text="Title" />
|
||||
|
|
|
@ -71,10 +71,7 @@
|
|||
android:layout_marginStart="36dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:hint="@string/untitled"
|
||||
android:includeFontPadding="false"
|
||||
android:letterSpacing="-0.02"
|
||||
android:paddingTop="0dp"
|
||||
android:textColorHint="@color/editor_default_hint_text_color"
|
||||
app:ignoreDragAndDrop="true"
|
||||
app:layout_constraintStart_toEndOf="@id/todoTitleCheckbox"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:clickable="false"
|
||||
android:longClickable="false"
|
||||
android:text="Add headings to create a table of contents"
|
||||
android:textColor="@color/editor_default_hint_text_color" />
|
||||
android:textColor="@color/text_tertiary" />
|
||||
|
||||
<View
|
||||
android:id="@+id/selected"
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textSize="17sp"
|
||||
android:text="@string/empty_tap_to_create_new_block"
|
||||
android:textColor="@color/text_tertiary"
|
||||
style="@style/TextView.ContentStyle.Body.Regular"
|
||||
app:layout_constraintEnd_toEndOf="@+id/toggleContent"
|
||||
app:layout_constraintStart_toStartOf="@+id/toggleContent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toggleContent" />
|
||||
|
|
|
@ -26,12 +26,11 @@
|
|||
android:layout_marginTop="5dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
style="@style/TextView.ContentStyle.Body.Regular"
|
||||
android:id="@+id/tvUnsupportedBlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:text="@string/unsupported_block"
|
||||
android:textColor="@color/text_tertiary"
|
||||
android:textSize="15sp" />
|
||||
android:textColor="@color/text_tertiary" />
|
||||
|
||||
</LinearLayout>
|
|
@ -36,14 +36,13 @@
|
|||
app:srcCompat="@drawable/ic_video" />
|
||||
|
||||
<TextView
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:id="@+id/tvError"
|
||||
style="@style/UploadMediaInActiveTextStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:text="@string/error_while_loading"
|
||||
android:textColor="@color/text_tertiary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icVideo"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icVideo"
|
||||
|
|
|
@ -32,13 +32,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/editUrl"
|
||||
style="@style/BlockVideoStyle"
|
||||
style="@style/UploadMediaInActiveTextStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/loading_wait"
|
||||
android:textColor="@color/glyph_active"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icVideo"
|
||||
app:layout_constraintStart_toEndOf="@+id/icVideo"
|
||||
app:layout_constraintTop_toTopOf="@+id/icVideo" />
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/default_toolbar_option_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:stateListAnimator="@animator/scale_shrink">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="@dimen/default_toolbar_option_width"
|
||||
android:layout_height="@dimen/default_toolbar_option_height"
|
||||
android:background="@drawable/rectangle_default_bottom_toolbar_option_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pic"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/content_description_option_picture" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/default_bottom_toolbar_option_text_size"
|
||||
tools:text="Text" />
|
||||
|
||||
</LinearLayout>
|
|
@ -14,12 +14,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
style="@style/TextView.ContentStyle.Relations.3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:textColor="@color/white"
|
||||
tools:text="Yves Klein" />
|
||||
|
||||
|
|
|
@ -7,15 +7,13 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvCheckbox"
|
||||
style="@style/TextView.ContentStyle.Body.Regular"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="start|center_vertical"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/dv_filter_checkbox_checked" />
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvDateTitle"
|
||||
style="@style/TextView.ContentStyle.Body.Regular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="17sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvDate"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -24,12 +22,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvDate"
|
||||
style="@style/TextView.ContentStyle.Body.Regular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="#ACA996"
|
||||
android:textSize="17sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iconChecked"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
|
|
@ -7,17 +7,15 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvObjectName"
|
||||
style="@style/TextView.ContentStyle.PreviewTitles.2.Medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:gravity="start|center_vertical"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSelectObjectIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/objectIconWidget"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -49,17 +47,16 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvObjectType"
|
||||
style="@style/TextView.ContentStyle.Relations.2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="start|center_vertical"
|
||||
android:maxLines="1"
|
||||
android:hint="@string/unknown_object_type"
|
||||
android:textColor="#6C6A5F"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivSelectObjectIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/objectIconWidget"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvObjectName"
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<FrameLayout
|
||||
android:background="@drawable/rectangle_default_page_logo_background"
|
||||
android:transitionName="@string/logo_transition"
|
||||
android:id="@+id/documentIconContainer"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageIcon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/ic_set_big"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:fontFamily="@font/graphik_semibold"
|
||||
style="@style/BlockTitleContentStyle"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/new_set"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="#ACA996"
|
||||
android:textSize="15sp"
|
||||
android:text="@string/choose_a_object_type_for_this_set" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/createNewContainer"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/item_block_multi_select_mode_selector"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/pageGuideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/linkEmoji"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_plus"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/pageGuideline"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</ImageView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitle"
|
||||
style="@style/BlockPageContentStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linkEmoji"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:text="@string/create_new_object_type"
|
||||
tools:text="Partnership terms" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/item_block_multi_select_mode_selector"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/pageGuideline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="0dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/linkEmoji"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/pageGuideline"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</ImageView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pageTitle"
|
||||
style="@style/BlockPageContentStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linkEmoji"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Partnership terms" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -7,8 +7,7 @@
|
|||
<TextView
|
||||
android:id="@+id/tvSectionName"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:textSize="13sp"
|
||||
style="@style/TextView.UXStyle.Captions.1.Medium"
|
||||
android:layout_marginTop="26dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvHeader"
|
||||
style="@style/TextView.UXStyle.Captions.1.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:layout_marginTop="18dp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="13sp"
|
||||
tools:text="Color solid" />
|
||||
|
||||
</FrameLayout>
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -9,12 +10,10 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvCondition"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="17sp"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_gravity="center_vertical"/>
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dv_viewer_filter_value_tag_height"
|
||||
android:layout_marginStart="4dp"
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:text="..."
|
||||
app:chipMinTouchTargetSize="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/chip2"
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:fontFamily="@font/inter_bold"
|
||||
android:paddingStart="0dp"
|
||||
android:layout_gravity="center"
|
||||
tools:text="All"
|
||||
android:textSize="17sp"
|
||||
android:paddingEnd="20dp"
|
||||
android:textColor="@color/selector_viewer_tab_text_color"
|
||||
android:id="@+id/tvTabTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</FrameLayout>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tvCurrentViewerName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="8dp"
|
||||
android:src="@drawable/ic_dv_add_new_view" />
|
||||
</FrameLayout>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCondition"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="false"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_16"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
tools:text="Contains" />
|
||||
|
||||
</FrameLayout>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
tools:text="AND"
|
||||
android:clickable="false"
|
||||
android:padding="@dimen/dp_16"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</FrameLayout>
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/item_viewer_list_selected"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/viewer_base_item_list_height">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_phone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
style="@style/ViewerModalItemStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_goneMarginStart="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/icon"
|
||||
tools:text="@string/detail_phone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
@ -31,11 +32,8 @@
|
|||
android:layout_marginEnd="12dp"
|
||||
android:layout_weight="1.0"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
tools:text="We need to render the bottom sheet layout with possibilities" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
|
|
@ -24,10 +24,9 @@
|
|||
android:id="@+id/tvActionTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/TextView.UXStyle.Captions.2.Regular"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="5dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="11sp"
|
||||
tools:text="Undo/Redo" />
|
||||
</LinearLayout>
|
|
@ -14,6 +14,7 @@
|
|||
<TextView
|
||||
android:id="@+id/relName"
|
||||
android:text="@string/name"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
|
@ -21,11 +22,8 @@
|
|||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
tools:text="We need to render the " />
|
||||
|
||||
</RelativeLayout>
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/relName"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
@ -24,11 +25,8 @@
|
|||
android:layout_weight="1.0"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/description"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
tools:text="We need to render the " />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/section"
|
||||
style="@style/TextView.UXStyle.Captions.1.Regular"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="26dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:text="@string/relations"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:gravity="start|center_vertical"
|
||||
tools:text="Relations"/>
|
||||
|
|
|
@ -6,25 +6,22 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/settingName"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
tools:text="Card size" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settingValue"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="17sp"
|
||||
tools:text="Large" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -9,19 +9,16 @@
|
|||
|
||||
<EditText
|
||||
android:id="@+id/textInputField"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="start|center_vertical"
|
||||
android:hint="@string/dv_cell_description_hint"
|
||||
android:imeOptions="actionDone"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_tertiary"
|
||||
android:textCursorDrawable="@drawable/cursor"
|
||||
android:textSize="17sp"
|
||||
app:layout_goneMarginEnd="@dimen/dp_20"
|
||||
tools:text="Anytype is a next generation software that breaks down barriers between applications, gives back privacy and data ownership to users."
|
||||
tools:visibility="visible" />
|
||||
|
|
|
@ -15,25 +15,22 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:maxLines="5"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="17sp"
|
||||
tools:text="There is no type named..." />
|
||||
|
||||
<TextView
|
||||
android:id="@id/tvTitle"
|
||||
style="@style/TextView.UXStyle.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:gravity="center"
|
||||
android:text="@string/try_to_create_new_one_or_search_for_something_else"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="17sp" />
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
android:layout_marginEnd="12dp"
|
||||
android:hint="@string/untitled"
|
||||
android:textColorHint="@color/text_tertiary"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:lineHeight="20sp"
|
||||
android:letterSpacing="-0.02"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvSubtitle"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ic_selected"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -42,7 +39,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvSubtitle"
|
||||
style="@style/ObjectTypeNameStyle"
|
||||
style="@style/SlashWidgetStyleItemSubTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
|
|
|
@ -24,19 +24,17 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
style="@style/TextView.ContentStyle.PreviewTitles.2.Medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:hint="@string/untitled"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_tertiary"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvSubtitle"
|
||||
app:layout_constraintEnd_toStartOf="@+id/objectSelectionIndex"
|
||||
app:layout_constraintStart_toEndOf="@+id/iconWidget"
|
||||
|
@ -47,16 +45,15 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvSubtitle"
|
||||
style="@style/TextView.ContentStyle.Relations.2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="#6C6A5F"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
app:layout_constraintEnd_toStartOf="@+id/objectSelectionIndex"
|
||||
app:layout_constraintStart_toEndOf="@+id/iconWidget"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTitle"
|
||||
|
|
|
@ -23,18 +23,16 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
style="@style/TextView.ContentStyle.PreviewTitles.2.Medium"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:hint="@string/untitled"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_tertiary"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/objectSelectionIndex"
|
||||
app:layout_constraintStart_toEndOf="@+id/iconWidget"
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
style="@style/ObjectTypeNameSmallStyle"
|
||||
style="@style/TextView.UXStyle.Captions.2.Regular"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="16dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/searchView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@drawable/bg_page_nav_filter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icSorting"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_search" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:fontFamily="@font/inter_regular"
|
||||
android:text="@string/filter_view_filter_hint"
|
||||
android:textColor="#ACA996"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/icSearch"
|
||||
app:layout_constraintStart_toEndOf="@+id/icSearch"
|
||||
app:layout_constraintTop_toTopOf="@+id/icSearch" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/icSorting"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_page_nav_filter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="center"
|
||||
app:srcCompat="@drawable/ic_sorting_descending" />
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvTitle" />
|
||||
|
||||
</LinearLayout>
|
|
@ -5,14 +5,13 @@
|
|||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<TextView
|
||||
style="@style/TextView.UXStyle.Body.Callout.Regular"
|
||||
android:background="@drawable/default_ripple"
|
||||
android:gravity="center"
|
||||
tools:text="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/tvNumber"
|
||||
android:textSize="15sp"
|
||||
android:textColor="@color/selector_paginator_number_color"
|
||||
android:fontFamily="@font/inter_medium"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue