#1301 reuse AppBar and Toolbar to avoid duplication

This commit is contained in:
Sean Mac Gillicuddy 2019-11-28 15:28:32 +00:00
parent f1e5e7a7ce
commit 25a077c658
19 changed files with 98 additions and 202 deletions

View File

@ -29,7 +29,6 @@ import androidx.recyclerview.widget.RecyclerView
import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.CompositeDisposable
import kotlinx.android.synthetic.main.activity_language.language_progressbar import kotlinx.android.synthetic.main.activity_language.language_progressbar
import kotlinx.android.synthetic.main.activity_language.language_recycler_view import kotlinx.android.synthetic.main.activity_language.language_recycler_view
import kotlinx.android.synthetic.main.activity_language.toolbar
import org.kiwix.kiwixmobile.R import org.kiwix.kiwixmobile.R
import org.kiwix.kiwixmobile.core.base.BaseActivity import org.kiwix.kiwixmobile.core.base.BaseActivity
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.viewModel import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.viewModel
@ -69,7 +68,7 @@ class LanguageActivity : BaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_language) setContentView(R.layout.activity_language)
setSupportActionBar(toolbar) setSupportActionBar(findViewById(R.id.toolbar))
supportActionBar?.let { supportActionBar?.let {
it.setDisplayHomeAsUpEnabled(true) it.setDisplayHomeAsUpEnabled(true)

View File

@ -85,7 +85,7 @@ public class LocalFileTransferActivity extends BaseActivity implements
@Inject WifiDirectManager wifiDirectManager; @Inject WifiDirectManager wifiDirectManager;
@Inject LocationManager locationManager; @Inject LocationManager locationManager;
@BindView(R.id.toolbar_local_file_transfer) Toolbar actionBar; @BindView(R.id.toolbar) Toolbar actionBar;
@BindView(R.id.text_view_device_name) TextView deviceName; @BindView(R.id.text_view_device_name) TextView deviceName;
@BindView(R.id.progress_bar_searching_peers) ProgressBar searchingPeersProgressBar; @BindView(R.id.progress_bar_searching_peers) ProgressBar searchingPeersProgressBar;
@BindView(R.id.list_peer_devices) ListView listViewPeerDevices; @BindView(R.id.list_peer_devices) ListView listViewPeerDevices;

View File

@ -23,10 +23,10 @@ import android.provider.Settings.System
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import androidx.appcompat.widget.SearchView import androidx.appcompat.widget.SearchView
import androidx.appcompat.widget.Toolbar
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import kotlinx.android.synthetic.main.zim_manager.manageViewPager import kotlinx.android.synthetic.main.zim_manager.manageViewPager
import kotlinx.android.synthetic.main.zim_manager.tabs import kotlinx.android.synthetic.main.zim_manager.tabs
import kotlinx.android.synthetic.main.zim_manager.toolbar
import org.kiwix.kiwixmobile.R import org.kiwix.kiwixmobile.R
import org.kiwix.kiwixmobile.core.base.BaseActivity import org.kiwix.kiwixmobile.core.base.BaseActivity
import org.kiwix.kiwixmobile.core.dao.NewLanguagesDao import org.kiwix.kiwixmobile.core.dao.NewLanguagesDao
@ -93,6 +93,7 @@ class ZimManageActivity : BaseActivity() {
} }
private fun setUpToolbar() { private fun setUpToolbar() {
val toolbar = findViewById<Toolbar>(R.id.toolbar)
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
supportActionBar!!.setHomeButtonEnabled(true) supportActionBar!!.setHomeButtonEnabled(true)
supportActionBar!!.setDisplayHomeAsUpEnabled(true) supportActionBar!!.setDisplayHomeAsUpEnabled(true)

View File

@ -5,17 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar"/>
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/language_recycler_view" android:id="@+id/language_recycler_view"
@ -25,7 +15,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar" /> app:layout_constraintTop_toBottomOf="@id/app_bar" />
<androidx.core.widget.ContentLoadingProgressBar <androidx.core.widget.ContentLoadingProgressBar
android:id="@+id/language_progressbar" android:id="@+id/language_progressbar"
@ -35,5 +25,5 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar" /> app:layout_constraintTop_toBottomOf="@id/app_bar" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -4,36 +4,19 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="@android:color/transparent" android:background="@android:color/transparent"
tools:context="org.kiwix.kiwixmobile.local_file_transfer.LocalFileTransferActivity" android:fitsSystemWindows="true"
> tools:context="org.kiwix.kiwixmobile.local_file_transfer.LocalFileTransferActivity">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/app_bar_local_file_transfer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_local_file_transfer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:titleTextColor="#FFFFFF"
app:title="@string/local_zim_sharing"
></androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<TextView <TextView
android:id="@+id/text_view_your_device" android:id="@+id/text_view_your_device"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:background="@android:color/transparent"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingTop="5dp" android:paddingTop="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
@ -41,137 +24,126 @@
android:text="@string/your_device" android:text="@string/your_device"
android:textSize="13sp" android:textSize="13sp"
android:textStyle="italic" android:textStyle="italic"
android:background="@android:color/transparent"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar_local_file_transfer" app:layout_constraintTop_toBottomOf="@+id/app_bar" />
/>
<TextView <TextView
android:id="@+id/text_view_device_name" android:id="@+id/text_view_device_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
tools:hint="Device Name"
android:textIsSelectable="true"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintTop_toBottomOf="@id/text_view_your_device"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:textStyle="bold"
android:background="@android:color/transparent"
android:textSize="17sp"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginLeft="15dp"
android:background="@android:color/transparent"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:paddingBottom="5dp" android:paddingBottom="5dp"
/> android:textIsSelectable="true"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_view_your_device"
tools:hint="Device Name" />
<View <View
android:id="@+id/view_device_list_boundary" android:id="@+id/view_device_list_boundary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="2dp" android:layout_height="2dp"
android:background="@color/accent"
app:layout_constraintTop_toBottomOf="@id/text_view_device_name"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
/> android:background="@color/accent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_view_device_name" />
<TextView <TextView
android:id="@+id/text_view_available_device" android:id="@+id/text_view_available_device"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/nearby_devices" android:background="@android:color/transparent"
android:gravity="center" android:gravity="center"
android:paddingTop="5dp"
android:text="@string/nearby_devices"
android:textSize="16sp" android:textSize="16sp"
app:fontFamily="monospace" app:fontFamily="monospace"
android:background="@android:color/transparent"
app:layout_constraintTop_toBottomOf="@id/view_device_list_boundary"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
android:paddingTop="5dp" app:layout_constraintTop_toBottomOf="@id/view_device_list_boundary" />
/>
<ListView <ListView
android:id="@+id/list_peer_devices" android:id="@+id/list_peer_devices"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" android:visibility="invisible"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintVertical_bias="0.0" app:layout_constraintTop_toBottomOf="@id/text_view_available_device"
android:visibility="invisible" app:layout_constraintVertical_bias="0.0" />
/>
<TextView <TextView
android:id="@+id/text_view_empty_peer_list" android:id="@+id/text_view_empty_peer_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/no_devices_found"
android:gravity="center"
android:background="@android:color/transparent"
android:layout_margin="50dp" android:layout_margin="50dp"
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" android:background="@android:color/transparent"
android:gravity="center"
android:text="@string/no_devices_found"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
/> app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
<ProgressBar <ProgressBar
android:id="@+id/progress_bar_searching_peers" android:id="@+id/progress_bar_searching_peers"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:indeterminate="true"
android:background="@android:color/transparent"
android:layout_margin="50dp" android:layout_margin="50dp"
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" android:background="@android:color/transparent"
android:indeterminate="true"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
android:visibility="gone" app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
/>
<View <View
android:id="@+id/view_file_list_boundary" android:id="@+id/view_file_list_boundary"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/accent" android:layout_marginLeft="5dp"
android:layout_marginTop="200dp" android:layout_marginTop="200dp"
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" android:layout_marginRight="5dp"
android:background="@color/accent"
app:layout_constraintBottom_toTopOf="@+id/text_view_files_for_transfer"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@+id/text_view_files_for_transfer" app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
/>
<TextView <TextView
android:id="@+id/text_view_files_for_transfer" android:id="@+id/text_view_files_for_transfer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/files_for_transfer"
android:textSize="16sp"
app:fontFamily="monospace"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:gravity="center" android:gravity="center"
android:paddingTop="10dp" android:paddingTop="10dp"
app:layout_constraintTop_toBottomOf="@id/view_file_list_boundary" android:text="@string/files_for_transfer"
android:textSize="16sp"
app:fontFamily="monospace"
app:layout_constraintBottom_toTopOf="@id/recycler_view_transfer_files"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@id/recycler_view_transfer_files" app:layout_constraintTop_toBottomOf="@id/view_file_list_boundary" />
/>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_transfer_files" android:id="@+id/recycler_view_transfer_files"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer" />
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -8,17 +8,10 @@
tools:context="org.kiwix.kiwixmobile.zim_manager.ZimManageActivity"> tools:context="org.kiwix.kiwixmobile.zim_manager.ZimManageActivity">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar <include layout="@layout/layout_toolbar" />
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
android:id="@+id/tabs" android:id="@+id/tabs"

View File

@ -38,7 +38,7 @@ public class HelpActivity extends BaseActivity {
private final HashMap<String, String> titleDescriptionMap = new HashMap<>(); private final HashMap<String, String> titleDescriptionMap = new HashMap<>();
@BindView(R2.id.activity_help_toolbar) @BindView(R2.id.toolbar)
Toolbar toolbar; Toolbar toolbar;
@BindView(R2.id.activity_help_recycler_view) @BindView(R2.id.activity_help_recycler_view)
RecyclerView recyclerView; RecyclerView recyclerView;

View File

@ -75,7 +75,7 @@ public class AddNoteDialog extends DialogFragment
Environment.getExternalStorageDirectory() + "/Kiwix/Notes/"; Environment.getExternalStorageDirectory() + "/Kiwix/Notes/";
public static final String TAG = "AddNoteDialog"; public static final String TAG = "AddNoteDialog";
@BindView(R2.id.add_note_toolbar) @BindView(R2.id.toolbar)
Toolbar toolbar; // Displays options for the note dialog Toolbar toolbar; // Displays options for the note dialog
@BindView(R2.id.add_note_text_view) @BindView(R2.id.add_note_text_view)
TextView addNoteTextView; // Displays article title TextView addNoteTextView; // Displays article title

View File

@ -161,7 +161,7 @@ public abstract class CoreMainActivity extends BaseActivity implements WebViewCa
protected final List<KiwixWebView> webViewList = new ArrayList<>(); protected final List<KiwixWebView> webViewList = new ArrayList<>();
@BindView(R2.id.activity_main_root) @BindView(R2.id.activity_main_root)
ConstraintLayout root; ConstraintLayout root;
@BindView(R2.id.activity_main_toolbar) @BindView(R2.id.toolbar)
Toolbar toolbar; Toolbar toolbar;
@BindView(R2.id.activity_main_back_to_top_fab) @BindView(R2.id.activity_main_back_to_top_fab)
FloatingActionButton backToTopButton; FloatingActionButton backToTopButton;

View File

@ -5,19 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
@ -27,6 +15,6 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar" /> app:layout_constraintTop_toBottomOf="@id/app_bar" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -7,19 +7,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
tools:context=".help.HelpActivity"> tools:context=".help.HelpActivity">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/activity_help_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/activity_help_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</com.google.android.material.appbar.AppBarLayout>
<ImageView <ImageView
android:id="@+id/activity_help_feedback_image_view" android:id="@+id/activity_help_feedback_image_view"
@ -28,7 +16,7 @@
android:contentDescription="@string/send_feedback" android:contentDescription="@string/send_feedback"
android:padding="@dimen/activity_horizontal_margin" android:padding="@dimen/activity_horizontal_margin"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/activity_help_appbar" app:layout_constraintTop_toBottomOf="@+id/app_bar"
app:srcCompat="@drawable/ic_feedback_blue_24dp" /> app:srcCompat="@drawable/ic_feedback_blue_24dp" />
<TextView <TextView

View File

@ -5,19 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
@ -27,6 +15,6 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appbar" /> app:layout_constraintTop_toBottomOf="@id/app_bar" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -7,19 +7,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
tools:context=".webserver.ZimHostActivity"> tools:context=".webserver.ZimHostActivity">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/zimHostAppBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</com.google.android.material.appbar.AppBarLayout>
<TextView <TextView
android:id="@+id/server_textView" android:id="@+id/server_textView"
@ -30,7 +18,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/server_textview_default_message" android:text="@string/server_textview_default_message"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/zimHostAppBarLayout" /> app:layout_constraintTop_toBottomOf="@+id/app_bar" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_zim_host" android:id="@+id/recycler_view_zim_host"

View File

@ -5,20 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@android:color/transparent"> android:background="@android:color/transparent">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:id="@+id/app_bar_add_note_dialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/add_note_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"></androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<ScrollView <ScrollView
android:layout_width="0dp" android:layout_width="0dp"
@ -26,7 +13,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar_add_note_dialog"> app:layout_constraintTop_toBottomOf="@+id/app_bar">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.appbar.AppBarLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
tools:showIn="@layout/activity_help">
<include layout="@layout/layout_toolbar" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<merge>
<androidx.appcompat.widget.Toolbar 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:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"
tools:showIn="@layout/search" />
</merge>

View File

@ -17,14 +17,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar <include layout="@layout/layout_toolbar" />
android:id="@+id/activity_main_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
<org.kiwix.kiwixmobile.core.main.AnimatedProgressBar <org.kiwix.kiwixmobile.core.main.AnimatedProgressBar
android:id="@+id/activity_main_progress_view" android:id="@+id/activity_main_progress_view"
@ -32,7 +25,7 @@
android:layout_height="@dimen/progress_view_height" android:layout_height="@dimen/progress_view_height"
app:backgroundColor="?colorOnSurface" app:backgroundColor="?colorOnSurface"
app:bidirectionalAnimate="false" app:bidirectionalAnimate="false"
app:layout_constraintBottom_toBottomOf="@id/activity_main_toolbar" app:layout_constraintBottom_toBottomOf="@+id/toolbar"
app:progressColor="@color/accent" /> app:progressColor="@color/accent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>

View File

@ -15,12 +15,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"> android:layout_height="?android:attr/actionBarSize">
<androidx.appcompat.widget.Toolbar <include layout="@layout/layout_toolbar" />
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</RelativeLayout> </RelativeLayout>
<ListView <ListView

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
@ -10,18 +9,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout <include layout="@layout/layout_standard_app_bar" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:popupTheme="@style/KiwixTheme"
app:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar" />
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout <FrameLayout
android:id="@+id/content_frame" android:id="@+id/content_frame"