mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 12:03:09 -04:00
Add host books menu
Add start server item Inflate menu in StartServer activity
This commit is contained in:
parent
0265800170
commit
0eb8d3d3f9
@ -1,5 +1,6 @@
|
||||
package org.kiwix.kiwixmobile.webserver;
|
||||
|
||||
import android.view.Menu;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
@ -31,4 +32,9 @@ public class StartServer extends AppCompatActivity {
|
||||
|
||||
toolbar.setNavigationOnClickListener(v -> onBackPressed());
|
||||
}
|
||||
|
||||
@Override public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.menu_host_books, menu);
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
}
|
||||
}
|
||||
|
9
app/src/main/res/menu/menu_host_books.xml
Normal file
9
app/src/main/res/menu/menu_host_books.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/menu_start_server"
|
||||
android:title="@string/menu_start_server"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
</menu>
|
@ -16,6 +16,7 @@
|
||||
<string name="menu_support_kiwix">Support Kiwix</string>
|
||||
<string name="menu_wifi_hotspot">Wifi Hotspot</string>
|
||||
<string name="menu_host_books">Host Books</string>
|
||||
<string name="menu_start_server">Start server</string>
|
||||
<string name="save_media">Save Media</string>
|
||||
<string name="save_media_error">An error occurred when trying to save the media!</string>
|
||||
<string name="save_media_saved">Saved media as %s to Android/media/org.kiwix…/</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user