mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 14:52:13 -04:00
#1301 reuse AppBar and Toolbar to avoid duplication
This commit is contained in:
parent
f1e5e7a7ce
commit
25a077c658
@ -29,7 +29,6 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
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.toolbar
|
||||
import org.kiwix.kiwixmobile.R
|
||||
import org.kiwix.kiwixmobile.core.base.BaseActivity
|
||||
import org.kiwix.kiwixmobile.core.extensions.ActivityExtensions.viewModel
|
||||
@ -69,7 +68,7 @@ class LanguageActivity : BaseActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_language)
|
||||
setSupportActionBar(toolbar)
|
||||
setSupportActionBar(findViewById(R.id.toolbar))
|
||||
|
||||
supportActionBar?.let {
|
||||
it.setDisplayHomeAsUpEnabled(true)
|
||||
|
@ -85,7 +85,7 @@ public class LocalFileTransferActivity extends BaseActivity implements
|
||||
@Inject WifiDirectManager wifiDirectManager;
|
||||
@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.progress_bar_searching_peers) ProgressBar searchingPeersProgressBar;
|
||||
@BindView(R.id.list_peer_devices) ListView listViewPeerDevices;
|
||||
|
@ -23,10 +23,10 @@ import android.provider.Settings.System
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.widget.SearchView
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import kotlinx.android.synthetic.main.zim_manager.manageViewPager
|
||||
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.core.base.BaseActivity
|
||||
import org.kiwix.kiwixmobile.core.dao.NewLanguagesDao
|
||||
@ -93,6 +93,7 @@ class ZimManageActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun setUpToolbar() {
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
supportActionBar!!.setHomeButtonEnabled(true)
|
||||
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
||||
|
@ -5,17 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/language_recycler_view"
|
||||
@ -25,7 +15,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar" />
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
android:id="@+id/language_progressbar"
|
||||
@ -35,5 +25,5 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -4,36 +4,19 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
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
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view_your_device"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="5dp"
|
||||
@ -41,137 +24,126 @@
|
||||
android:text="@string/your_device"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="italic"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar_local_file_transfer"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view_device_name"
|
||||
android:layout_width="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_marginLeft="15dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="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
|
||||
android:id="@+id/view_device_list_boundary"
|
||||
android:layout_width="match_parent"
|
||||
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_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
|
||||
android:id="@+id/text_view_available_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nearby_devices"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center"
|
||||
android:paddingTop="5dp"
|
||||
android:text="@string/nearby_devices"
|
||||
android:textSize="16sp"
|
||||
app:fontFamily="monospace"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_device_list_boundary"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:paddingTop="5dp"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/view_device_list_boundary" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list_peer_devices"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
android:visibility="invisible"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view_empty_peer_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_devices_found"
|
||||
android:gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_searching_peers"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
android:background="@android:color/transparent"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_file_list_boundary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/accent"
|
||||
android:layout_marginLeft="5dp"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/text_view_files_for_transfer"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_available_device" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_view_files_for_transfer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/files_for_transfer"
|
||||
android:textSize="16sp"
|
||||
app:fontFamily="monospace"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center"
|
||||
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_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
|
||||
android:id="@+id/recycler_view_transfer_files"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
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_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
app:layout_constraintTop_toBottomOf="@id/text_view_files_for_transfer" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -8,17 +8,10 @@
|
||||
tools:context="org.kiwix.kiwixmobile.zim_manager.ZimManageActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.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" />
|
||||
<include layout="@layout/layout_toolbar" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
|
@ -38,7 +38,7 @@ public class HelpActivity extends BaseActivity {
|
||||
|
||||
private final HashMap<String, String> titleDescriptionMap = new HashMap<>();
|
||||
|
||||
@BindView(R2.id.activity_help_toolbar)
|
||||
@BindView(R2.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
@BindView(R2.id.activity_help_recycler_view)
|
||||
RecyclerView recyclerView;
|
||||
|
@ -75,7 +75,7 @@ public class AddNoteDialog extends DialogFragment
|
||||
Environment.getExternalStorageDirectory() + "/Kiwix/Notes/";
|
||||
public static final String TAG = "AddNoteDialog";
|
||||
|
||||
@BindView(R2.id.add_note_toolbar)
|
||||
@BindView(R2.id.toolbar)
|
||||
Toolbar toolbar; // Displays options for the note dialog
|
||||
@BindView(R2.id.add_note_text_view)
|
||||
TextView addNoteTextView; // Displays article title
|
||||
|
@ -161,7 +161,7 @@ public abstract class CoreMainActivity extends BaseActivity implements WebViewCa
|
||||
protected final List<KiwixWebView> webViewList = new ArrayList<>();
|
||||
@BindView(R2.id.activity_main_root)
|
||||
ConstraintLayout root;
|
||||
@BindView(R2.id.activity_main_toolbar)
|
||||
@BindView(R2.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
@BindView(R2.id.activity_main_back_to_top_fab)
|
||||
FloatingActionButton backToTopButton;
|
||||
|
@ -5,19 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
@ -27,6 +15,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -7,19 +7,7 @@
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".help.HelpActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/activity_help_feedback_image_view"
|
||||
@ -28,7 +16,7 @@
|
||||
android:contentDescription="@string/send_feedback"
|
||||
android:padding="@dimen/activity_horizontal_margin"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
|
@ -5,19 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
@ -27,6 +15,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/appbar" />
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -7,19 +7,7 @@
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".webserver.ZimHostActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/server_textView"
|
||||
@ -30,7 +18,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/server_textview_default_message"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/zimHostAppBarLayout" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_zim_host"
|
||||
|
@ -5,20 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="0dp"
|
||||
@ -26,7 +13,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar_add_note_dialog">
|
||||
app:layout_constraintTop_toBottomOf="@+id/app_bar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
13
core/src/main/res/layout/layout_standard_app_bar.xml
Normal file
13
core/src/main/res/layout/layout_standard_app_bar.xml
Normal 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>
|
13
core/src/main/res/layout/layout_toolbar.xml
Normal file
13
core/src/main/res/layout/layout_toolbar.xml
Normal 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>
|
@ -17,14 +17,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.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" />
|
||||
<include layout="@layout/layout_toolbar" />
|
||||
|
||||
<org.kiwix.kiwixmobile.core.main.AnimatedProgressBar
|
||||
android:id="@+id/activity_main_progress_view"
|
||||
@ -32,7 +25,7 @@
|
||||
android:layout_height="@dimen/progress_view_height"
|
||||
app:backgroundColor="?colorOnSurface"
|
||||
app:bidirectionalAnimate="false"
|
||||
app:layout_constraintBottom_toBottomOf="@id/activity_main_toolbar"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
|
||||
app:progressColor="@color/accent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
@ -15,12 +15,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize">
|
||||
|
||||
<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" />
|
||||
<include layout="@layout/layout_toolbar" />
|
||||
</RelativeLayout>
|
||||
|
||||
<ListView
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
@ -10,18 +9,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
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>
|
||||
<include layout="@layout/layout_standard_app_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
|
Loading…
x
Reference in New Issue
Block a user