カラム一覧のカラムヘッダ色の表示範囲を調整
This commit is contained in:
parent
c6b92c4c11
commit
587b505ae2
|
@ -185,7 +185,7 @@ class ActAppSetting : AppCompatActivity(), ColorPickerDialogListener, View.OnCli
|
|||
private fun initUi() {
|
||||
setContentView(views.root)
|
||||
|
||||
fixHorizontalPadding0(views.llContent)
|
||||
fixHorizontalPadding(views.llContent, 0f)
|
||||
|
||||
views.lvList.layoutManager = LinearLayoutManager(this)
|
||||
views.lvList.adapter = adapter
|
||||
|
|
|
@ -97,7 +97,7 @@ class ActColumnList : AppCompatActivity() {
|
|||
setContentView(views.root)
|
||||
setSupportActionBar(views.toolbar)
|
||||
setNavigationBack(views.toolbar)
|
||||
fixHorizontalMargin(views.llContent)
|
||||
fixHorizontalMargin(views.listView)
|
||||
|
||||
// ハンドル部分をドラッグで並べ替えできるRecyclerView
|
||||
views.listView.setLayoutManager(androidx.recyclerview.widget.LinearLayoutManager(this))
|
||||
|
@ -258,6 +258,8 @@ class ActColumnList : AppCompatActivity() {
|
|||
views.tvColumnName.textColor = columnColorFg
|
||||
views.ivColumnIcon.setImageResource(item.type.iconId(item.acct))
|
||||
views.ivColumnIcon.imageTintList = ColorStateList.valueOf(columnColorFg)
|
||||
views.ivSelected.imageTintList = ColorStateList.valueOf(columnColorFg)
|
||||
|
||||
// 背景色がテーマ次第なので、カラム設定の色を反映するとアイコンが見えなくなる可能性がある
|
||||
// よってアイコンやテキストにカラム設定の色を反映しない
|
||||
}
|
||||
|
@ -286,6 +288,7 @@ class ActColumnList : AppCompatActivity() {
|
|||
textColor = columnColorFg
|
||||
}
|
||||
dragViews.ivColumnIcon.imageTintList = ColorStateList.valueOf(columnColorFg)
|
||||
dragViews.ivSelected.imageTintList = ColorStateList.valueOf(columnColorFg)
|
||||
dragViews.llColumn.backgroundColor = item.columnColorBg
|
||||
dragViews.ivColumnIcon.setImageResource(item.type.iconId(item.acct))
|
||||
dragViews.ivSelected.visibility = clickViews.ivSelected.visibility
|
||||
|
|
|
@ -315,6 +315,7 @@ fun fixHorizontalPadding(v: View, dpDelta: Float = 12f) {
|
|||
v.setPaddingRelative(padLr + dm.widthPixels / 2, padT, padLr, padB)
|
||||
return
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -322,8 +323,6 @@ fun fixHorizontalPadding(v: View, dpDelta: Float = 12f) {
|
|||
v.setPaddingRelative(padLr, padT, padLr, padB)
|
||||
}
|
||||
|
||||
fun fixHorizontalPadding0(v: View) = fixHorizontalPadding(v, 0f)
|
||||
|
||||
fun fixHorizontalMargin(v: View) {
|
||||
val lp = v.layoutParams
|
||||
if (lp is ViewGroup.MarginLayoutParams) {
|
||||
|
|
|
@ -48,9 +48,11 @@
|
|||
android:clipToPadding="false"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="0dp"
|
||||
android:fadeScrollbars="false"
|
||||
android:paddingBottom="128dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="12dp"
|
||||
android:scrollbarStyle="outsideOverlay" />
|
||||
android:scrollbarStyle="outsideOverlay"
|
||||
android:scrollbars="vertical" />
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?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"
|
||||
|
@ -15,30 +14,19 @@
|
|||
android:elevation="4dp"
|
||||
app:navigationIcon="?attr/homeAsUpIndicator" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llContent"
|
||||
<com.woxthebox.draglistview.DragListView
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<!-- Need to wrap DragListView in another layout for wrap_content to work for some reason -->
|
||||
<com.woxthebox.draglistview.DragListView
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/column_list_desc"
|
||||
android:textSize="12sp"
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/column_list_desc"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
|
@ -16,11 +16,11 @@
|
|||
android:layout_alignTop="@+id/item_layout"
|
||||
android:background="#0088ff"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:text="@string/app_name"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20sp" />
|
||||
android:textSize="20sp"
|
||||
tools:text="item_left" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_right"
|
||||
|
@ -30,14 +30,14 @@
|
|||
android:layout_alignTop="@+id/item_layout"
|
||||
android:background="?attr/colorColumnListDeleteBackground"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="12dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:text="@string/delete"
|
||||
android:textColor="?attr/colorColumnListDeleteText"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
<!-- item view has contents and divider -->
|
||||
<FrameLayout
|
||||
android:id="@id/item_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -46,14 +46,16 @@
|
|||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llColumn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="3dp">
|
||||
android:paddingVertical="3dp"
|
||||
tools:background="#ff0">
|
||||
|
||||
<!-- minHeight の代わりにViewで賄う -->
|
||||
<View
|
||||
|
@ -64,8 +66,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="NestedWeights">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAccess"
|
||||
|
@ -73,12 +74,12 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="start|center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="2dp"
|
||||
android:textColor="?attr/colorColumnListItemText"
|
||||
android:textSize="14sp"
|
||||
tools:text="user@acct" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llColumn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
|
@ -101,6 +102,7 @@
|
|||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="2dp"
|
||||
android:textSize="18sp"
|
||||
tools:text="name 名前 " />
|
||||
|
||||
|
@ -115,7 +117,7 @@
|
|||
android:layout_marginStart="4dp"
|
||||
android:contentDescription="@string/last_selection"
|
||||
android:src="@drawable/ic_eye"
|
||||
app:tint="?attr/colorTextContent" />
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDragHandle"
|
||||
|
@ -132,6 +134,7 @@
|
|||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorSettingDivider" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</com.woxthebox.draglistview.swipe.ListSwipeItem>
|
||||
|
|
Loading…
Reference in New Issue