File tree 6 files changed +16
-14
lines changed
6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
1
* Beachte selbst-signierte Zertifikate beim Laden von devStateIcons
2
2
* Füge Hinweis für "column" Attribut bei der Konfiguration der Gerätetyp-Reihenfolge hinzu
3
- * Migriere als generische Geräte: OWDevice, Remotecontrol
3
+ * Migriere als generische Geräte: OWDevice, Remotecontrol
4
+ * Beachte alias beim Klicken auf Geräte in der Navigationsleiste (nur Tablets)
Original file line number Diff line number Diff line change 1
1
* Consider self-signed certificates when loading devStateIcons
2
2
* Add note for "column" attribute in device functionality order preference
3
- * Migrate as generic devices: OWDevice, remotecontrol
3
+ * Migrate as generic devices: OWDevice, remotecontrol
4
+ * Consider alias when clicking on devices within the navigation bar (tables only)
Original file line number Diff line number Diff line change @@ -158,13 +158,9 @@ class DeviceDetailFragment : BaseFragment() {
158
158
159
159
private fun findScrollView (): ScrollView ? = view!! .findViewById(R .id.deviceDetailView)
160
160
161
- override fun getTitle (context : Context ): CharSequence? {
162
- var name = arguments?.getString(DEVICE_DISPLAY_NAME )
163
- if (name == null ) {
164
- name = arguments?.getString(DEVICE_NAME )
165
- }
166
- return name
167
- }
161
+ override fun getTitle (context : Context ): CharSequence? =
162
+ arguments?.getString(DEVICE_DISPLAY_NAME )
163
+ ? : arguments?.getString(DEVICE_NAME )
168
164
169
165
override fun onCreateOptionsMenu (menu : Menu ? , inflater : MenuInflater ? ) {
170
166
super .onCreateOptionsMenu(menu, inflater)
Original file line number Diff line number Diff line change @@ -133,10 +133,6 @@ private void parseEventMap(String content) {
133
133
eventMap = EventMapParser .INSTANCE .parseEventMap (content );
134
134
}
135
135
136
- protected void putEventToEventMap (String key , String value ) {
137
- eventMap = eventMap .put (key , value );
138
- }
139
-
140
136
@ ShowField (description = ResourceIdMapper .deviceName , showAfter = ShowField .FIRST )
141
137
public String getAliasOrName () {
142
138
String andFHEMAlias = getAndFHEMAlias ();
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ abstract class DeviceNameListFragment : BaseFragment() {
137
137
}
138
138
}
139
139
140
- protected fun deviceListReceived (elements : List <ViewableElementsCalculator .Element >) {
140
+ private fun deviceListReceived (elements : List <ViewableElementsCalculator .Element >) {
141
141
val devicesView = view?.devices ? : return
142
142
devicesView.adapter = DeviceGroupAdapter (elements, DeviceGroupAdapter .Configuration (
143
143
deviceResourceId = if (isNavigation) R .layout.device_name_selection_navigation else R .layout.device_name_selection,
@@ -148,11 +148,18 @@ abstract class DeviceNameListFragment : BaseFragment() {
148
148
true -> R .color.android_green
149
149
else -> android.R .color.transparent
150
150
})
151
+ view.tag = device.name
151
152
}
152
153
))
153
154
devicesView.layoutManager = StaggeredGridLayoutManager (getNumberOfColumns(), StaggeredGridLayoutManager .VERTICAL )
154
155
view?.invalidate()
155
156
157
+ val childViewToSelect = elements.indexOfFirst {
158
+ it is ViewableElementsCalculator .Element .Device
159
+ && it.device.name == deviceName
160
+ }
161
+ devicesView.scrollToPosition(childViewToSelect)
162
+
156
163
if (elements.isNotEmpty()) {
157
164
hideEmptyView()
158
165
} else {
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class DeviceNameListNavigationFragment : DeviceNameListFragment() {
48
48
activity?.sendBroadcast(Intent (Actions .SHOW_FRAGMENT )
49
49
.putExtra(FRAGMENT , FragmentType .DEVICE_DETAIL )
50
50
.putExtra(DEVICE_NAME , child.name)
51
+ .putExtra(DEVICE_DISPLAY_NAME , child.aliasOrName)
51
52
.putExtra(CALLING_FRAGMENT , arguments?.getSerializable(CALLING_FRAGMENT ))
52
53
.putExtra(ROOM_NAME , roomName))
53
54
}
You can’t perform that action at this time.
0 commit comments