Refactoring

This commit is contained in:
M66B 2021-08-13 07:37:56 +02:00
parent f50dd5276b
commit 2fe70cd971
2 changed files with 9 additions and 6 deletions

View File

@ -111,7 +111,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
private ImageButton ibHide; private ImageButton ibHide;
private ImageButton ibSettings; private ImageButton ibSettings;
private ImageButton ibFetchMore; private ImageButton ibFetchMore;
private ImageButton ibSync; private ImageButton ibForceSync;
private View vSeparatorOptions; private View vSeparatorOptions;
private ImageButton ibExpanderAccount; private ImageButton ibExpanderAccount;
private RecyclerView rvAccount; private RecyclerView rvAccount;
@ -220,6 +220,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
content_separator = findViewById(R.id.content_separator); content_separator = findViewById(R.id.content_separator);
content_pane = findViewById(R.id.content_pane); content_pane = findViewById(R.id.content_pane);
// Special: Surface Duo
boolean duo = Helper.isSurfaceDuo(); boolean duo = Helper.isSurfaceDuo();
if (duo && content_pane != null) { if (duo && content_pane != null) {
View content_frame = findViewById(R.id.content_frame); View content_frame = findViewById(R.id.content_frame);
@ -283,7 +284,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
ibHide = drawerContainer.findViewById(R.id.ibHide); ibHide = drawerContainer.findViewById(R.id.ibHide);
ibSettings = drawerContainer.findViewById(R.id.ibSettings); ibSettings = drawerContainer.findViewById(R.id.ibSettings);
ibFetchMore = drawerContainer.findViewById(R.id.ibFetchMore); ibFetchMore = drawerContainer.findViewById(R.id.ibFetchMore);
ibSync = drawerContainer.findViewById(R.id.ibSync); ibForceSync = drawerContainer.findViewById(R.id.ibForceSync);
vSeparatorOptions = drawerContainer.findViewById(R.id.vSeparatorOptions); vSeparatorOptions = drawerContainer.findViewById(R.id.vSeparatorOptions);
grpOptions = drawerContainer.findViewById(R.id.grpOptions); grpOptions = drawerContainer.findViewById(R.id.grpOptions);
ibExpanderAccount = drawerContainer.findViewById(R.id.ibExpanderAccount); ibExpanderAccount = drawerContainer.findViewById(R.id.ibExpanderAccount);
@ -374,6 +375,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
}); });
// Fetch more messages
ibFetchMore.setOnClickListener(new View.OnClickListener() { ibFetchMore.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -386,7 +388,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
}); });
ibSync.setOnClickListener(new View.OnClickListener() { // Force sync
ibForceSync.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
ServiceSynchronize.reload(ActivityView.this, null, true, "nav:sync"); ServiceSynchronize.reload(ActivityView.this, null, true, "nav:sync");

View File

@ -66,13 +66,13 @@
android:contentDescription="@string/title_synchronize_more" android:contentDescription="@string/title_synchronize_more"
android:padding="6dp" android:padding="6dp"
android:tooltipText="@string/title_synchronize_more" android:tooltipText="@string/title_synchronize_more"
app:layout_constraintEnd_toStartOf="@+id/ibSync" app:layout_constraintEnd_toStartOf="@+id/ibForceSync"
app:layout_constraintStart_toEndOf="@id/ibSettings" app:layout_constraintStart_toEndOf="@id/ibSettings"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/twotone_get_app_24" /> app:srcCompat="@drawable/twotone_get_app_24" />
<ImageButton <ImageButton
android:id="@+id/ibSync" android:id="@+id/ibForceSync"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
@ -87,7 +87,7 @@
android:id="@+id/grpOptions" android:id="@+id/grpOptions"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:constraint_referenced_ids="ibPin,ibHide,ibSettings,ibFetchMore,ibSync" /> app:constraint_referenced_ids="ibPin,ibHide,ibSettings,ibFetchMore,ibForceSync" />
<View <View
android:id="@+id/vSeparatorOptions" android:id="@+id/vSeparatorOptions"