mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 06:42:21 -04:00
Rearrange toolbar icons
This commit is contained in:
parent
fefb12abe8
commit
69e640d139
@ -8,8 +8,8 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
|
||||||
classpath 'com.testdroid:gradle:1.5.0'
|
classpath "com.testdroid:gradle:$testdroidGradlePluginVersion"
|
||||||
classpath 'org.apache.httpcomponents:httpclient-android:4.3.3'
|
classpath 'org.apache.httpcomponents:httpclient-android:4.3.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,27 +48,27 @@ dependencies {
|
|||||||
implementation "com.android.support:support-v4:$supportLibraryVersion"
|
implementation "com.android.support:support-v4:$supportLibraryVersion"
|
||||||
implementation "com.android.support:design:$supportLibraryVersion"
|
implementation "com.android.support:design:$supportLibraryVersion"
|
||||||
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
|
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
|
||||||
implementation 'com.android.support:multidex:1.0.2'
|
implementation "com.android.support:multidex:$multidexVersion"
|
||||||
|
|
||||||
implementation "com.android.support.constraint:constraint-layout:$constraintLayoutVersion"
|
implementation "com.android.support.constraint:constraint-layout:$constraintLayoutVersion"
|
||||||
|
|
||||||
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
|
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
|
||||||
|
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1', {
|
androidTestImplementation("com.android.support.test.espresso:espresso-core:$espressoVersion") {
|
||||||
exclude group: 'com.android.support', module: 'support-annotations'
|
exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
}
|
}
|
||||||
|
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-web:3.0.1'
|
androidTestImplementation "com.android.support.test.espresso:espresso-web:$espressoVersion"
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.1'
|
androidTestImplementation "com.android.support.test.espresso:espresso-intents:$espressoVersion"
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.1'
|
androidTestImplementation "com.android.support.test.espresso:espresso-idling-resource:$espressoVersion"
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.0', {
|
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:$espressoVersion") {
|
||||||
exclude group: 'com.android.support', module: 'support-v4'
|
exclude group: 'com.android.support', module: 'support-v4'
|
||||||
exclude group: 'com.android.support', module: 'appcompat-v7'
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
||||||
exclude group: 'com.android.support', module: 'design'
|
exclude group: 'com.android.support', module: 'design'
|
||||||
exclude group: 'com.android.support', module: 'recyclerview-v7'
|
exclude group: 'com.android.support', module: 'recyclerview-v7'
|
||||||
}
|
}
|
||||||
|
|
||||||
androidTestCompile('com.schibsted.spain:barista:2.4.0') {
|
androidTestImplementation('com.schibsted.spain:barista:2.4.0') {
|
||||||
exclude group: 'com.android.support'
|
exclude group: 'com.android.support'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ dependencies {
|
|||||||
annotationProcessor 'com.yahoo.squidb:squidb-processor:2.0.0'
|
annotationProcessor 'com.yahoo.squidb:squidb-processor:2.0.0'
|
||||||
|
|
||||||
// Apache
|
// Apache
|
||||||
implementation 'commons-io:commons-io:2.5'
|
androidTestImplementation "commons-io:commons-io:$apacheCommonsVersion"
|
||||||
|
|
||||||
// Square
|
// Square
|
||||||
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
||||||
@ -111,9 +111,9 @@ dependencies {
|
|||||||
}
|
}
|
||||||
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
|
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
|
||||||
|
|
||||||
// Butterknife
|
// ButterKnife
|
||||||
implementation 'com.jakewharton:butterknife:8.0.1'
|
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
|
||||||
annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
|
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
|
||||||
|
|
||||||
// RxJava
|
// RxJava
|
||||||
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
|
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
|
||||||
@ -156,7 +156,7 @@ if (project.hasProperty('customDir')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set up flavours for each custom app in the directory
|
// Set up flavours for each custom app in the directory
|
||||||
if(custom.listFiles()) {
|
if (custom.listFiles()) {
|
||||||
custom.eachFile() { file ->
|
custom.eachFile() { file ->
|
||||||
|
|
||||||
def fileName = file.getName()
|
def fileName = file.getName()
|
||||||
@ -285,15 +285,15 @@ android {
|
|||||||
sourceFile = file(directory + "/" + parsedJson.zim_file)
|
sourceFile = file(directory + "/" + parsedJson.zim_file)
|
||||||
}
|
}
|
||||||
if (parsedJson.embed_zim) {
|
if (parsedJson.embed_zim) {
|
||||||
// Place content in each lib directory for embeded zims
|
// Place content in each lib directory for embeded zims
|
||||||
for (String archName : archs) {
|
for (String archName : archs) {
|
||||||
copy {
|
copy {
|
||||||
from sourceFile
|
from sourceFile
|
||||||
into file(directory + "/jniLibs/" + archName)
|
into file(directory + "/jniLibs/" + archName)
|
||||||
rename { String filename -> "libcontent.so" }
|
rename { String filename -> "libcontent.so" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parsedJson.zim_file = "libcontent.so"
|
parsedJson.zim_file = "libcontent.so"
|
||||||
}
|
}
|
||||||
// Set custom config from json
|
// Set custom config from json
|
||||||
applicationId "$parsedJson.package"
|
applicationId "$parsedJson.package"
|
||||||
@ -329,7 +329,7 @@ android {
|
|||||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$content_version_code"
|
buildConfigField "int", "CONTENT_VERSION_CODE", "$content_version_code"
|
||||||
} else if (parsedJson.content_version_code != null) {
|
} else if (parsedJson.content_version_code != null) {
|
||||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$parsedJson.content_version_code"
|
buildConfigField "int", "CONTENT_VERSION_CODE", "$parsedJson.content_version_code"
|
||||||
} else if (project.hasProperty('version_code')) {
|
} else if (project.hasProperty('version_code')) {
|
||||||
def version_code = project.property('version_code')
|
def version_code = project.property('version_code')
|
||||||
buildConfigField "int", "CONTENT_VERSION_CODE", "$version_code"
|
buildConfigField "int", "CONTENT_VERSION_CODE", "$version_code"
|
||||||
} else if (parsedJson.version_code != null) {
|
} else if (parsedJson.version_code != null) {
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
app:cardCornerRadius="0dp"
|
||||||
app:cardElevation="8dp"
|
app:cardElevation="8dp"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
@ -118,53 +119,68 @@
|
|||||||
android:background="@color/primary">
|
android:background="@color/primary">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/bottom_toolbar_arrow_back"
|
android:id="@+id/bottom_toolbar_bookmark"
|
||||||
android:layout_width="24dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@string/menu_bookmarks"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_arrow_forward"
|
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_arrow_back"
|
||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_keyboard_arrow_left_24dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bottom_toolbar_arrow_forward"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_home"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_arrow_back"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_keyboard_arrow_right_24dp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bottom_toolbar_home"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_bookmark"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_arrow_forward"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/action_home" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/bottom_toolbar_bookmark"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_toc"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_home"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_bookmark_border_24dp" />
|
app:srcCompat="@drawable/ic_bookmark_border_24dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/bottom_toolbar_arrow_back"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@string/go_to_previous_page"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_home"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_bookmark"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_keyboard_arrow_left_24dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/bottom_toolbar_home"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@string/menu_home"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_arrow_forward"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_arrow_back"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/action_home" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/bottom_toolbar_arrow_forward"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@string/go_to_next_page"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/bottom_toolbar_toc"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_home"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_keyboard_arrow_right_24dp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/bottom_toolbar_toc"
|
android:id="@+id/bottom_toolbar_toc"
|
||||||
android:layout_width="24dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="0dp"
|
||||||
|
android:contentDescription="@string/table_of_contents"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:paddingTop="12dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_bookmark"
|
app:layout_constraintStart_toEndOf="@id/bottom_toolbar_arrow_forward"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_toc_24dp" />
|
app:srcCompat="@drawable/ic_toc_24dp" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
@ -198,4 +198,7 @@
|
|||||||
<string name="save_books_offline">Save books offline</string>
|
<string name="save_books_offline">Save books offline</string>
|
||||||
<string name="download_books_message">Download books and read wherever you are.</string>
|
<string name="download_books_message">Download books and read wherever you are.</string>
|
||||||
<string name="unable_to_add_to_bookmarks">Unable to add to bookmarks</string>
|
<string name="unable_to_add_to_bookmarks">Unable to add to bookmarks</string>
|
||||||
|
<string name="go_to_previous_page">Go to previous page</string>
|
||||||
|
<string name="go_to_next_page">Go to next page</string>
|
||||||
|
<string name="table_of_contents">Table of contents</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
34
build.gradle
34
build.gradle
@ -1,12 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
classpath "com.android.tools.build:gradle:3.1.3"
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@ -14,24 +12,30 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
androidGradlePluginVersion = '3.1.3'
|
||||||
|
testdroidGradlePluginVersion = '2.49.1'
|
||||||
supportLibraryVersion = '27.1.1'
|
supportLibraryVersion = '27.1.1'
|
||||||
rxJavaVersion = '2.1.9'
|
rxJavaVersion = '2.1.9'
|
||||||
rxAndroidVersion = '2.0.2'
|
rxAndroidVersion = '2.0.2'
|
||||||
okHttpVersion = '3.9.1'
|
okHttpVersion = '3.9.1'
|
||||||
retrofitVersion = '2.3.0'
|
retrofitVersion = '2.3.0'
|
||||||
javaxAnnotationVersion = '1.3.2'
|
javaxAnnotationVersion = '1.3.2'
|
||||||
daggerVersion = '2.15'
|
daggerVersion = '2.16'
|
||||||
inkPageIndicatorVersion = '1.3.0'
|
inkPageIndicatorVersion = '1.3.0'
|
||||||
constraintLayoutVersion = '1.1.0'
|
constraintLayoutVersion = '1.1.0'
|
||||||
|
butterKnifeVersion = '8.8.1'
|
||||||
|
espressoVersion = '3.0.2'
|
||||||
|
apacheCommonsVersion = '2.6'
|
||||||
|
multidexVersion = '1.0.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user