mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
add pandora lib
This commit is contained in:
parent
f92fb31691
commit
d422fcd074
@ -174,6 +174,8 @@ dependencies {
|
||||
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
|
||||
implementation 'com.airbnb.android:lottie:3.0.7'
|
||||
implementation 'com.firebase:firebase-jobdispatcher:0.8.2'
|
||||
debugImplementation 'com.github.whataa:pandora:2.0.6'
|
||||
releaseImplementation 'com.github.whataa:pandora-no-op:2.0.3'
|
||||
|
||||
compileOnly "org.projectlombok:lombok:${lombokVersion}"
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.HttpException;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
||||
import tech.linjiang.pandora.Pandora;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 08 Feb 2017, 8:37 PM
|
||||
@ -79,6 +80,7 @@ public class RestProvider {
|
||||
client.addInterceptor(new AuthenticationInterceptor());
|
||||
client.addInterceptor(new PaginationInterceptor());
|
||||
client.addInterceptor(new ContentTypeInterceptor());
|
||||
client.addInterceptor(Pandora.get().getInterceptor());
|
||||
okHttpClient = client.build();
|
||||
}
|
||||
return okHttpClient;
|
||||
|
||||
@ -11,6 +11,7 @@ import okhttp3.logging.HttpLoggingInterceptor;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
|
||||
import retrofit2.converter.scalars.ScalarsConverterFactory;
|
||||
import tech.linjiang.pandora.Pandora;
|
||||
|
||||
/**
|
||||
* Created by Kosh on 02 Jun 2017, 12:47 PM
|
||||
@ -27,6 +28,7 @@ public class JsoupProvider {
|
||||
client.addInterceptor(new HttpLoggingInterceptor()
|
||||
.setLevel(HttpLoggingInterceptor.Level.BODY));
|
||||
}
|
||||
client.addInterceptor(Pandora.get().getInterceptor());
|
||||
client.addInterceptor(new AuthenticationInterceptor(true));
|
||||
okHttpClient = client.build();
|
||||
}
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/drawer"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.drawerlayout.widget.DrawerLayout 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/drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
@ -20,15 +19,13 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
<com.google.android.material.appbar.AppBarLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/appbar"
|
||||
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="wrap_content"
|
||||
android:theme="?android:toolbarStyle">
|
||||
|
||||
<include layout="@layout/title_header_layout"/>
|
||||
<include layout="@layout/title_header_layout" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
@ -44,18 +41,7 @@
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/pinned"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_pin"/>
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|end"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/edit"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:visibility="gone"/>
|
||||
android:src="@drawable/ic_pin" />
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/browser"
|
||||
@ -65,7 +51,7 @@
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/open_in_browser"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_brower"/>
|
||||
android:src="@drawable/ic_brower" />
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/startGist"
|
||||
@ -77,7 +63,7 @@
|
||||
android:contentDescription="@string/star"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
|
||||
android:src="@drawable/ic_star"/>
|
||||
android:src="@drawable/ic_star" />
|
||||
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/forkGist"
|
||||
@ -88,8 +74,19 @@
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/fork"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_fork" />
|
||||
|
||||
android:src="@drawable/ic_fork"/>
|
||||
<com.fastaccess.ui.widgets.ForegroundImageView
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|end"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/edit"
|
||||
android:padding="@dimen/spacing_micro"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
@ -98,14 +95,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorPrimary"
|
||||
app:tabSelectedTextColor="?colorAccent"
|
||||
app:tabTextColor="?android:textColorTertiary"/>
|
||||
app:tabTextColor="?android:textColorTertiary" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.fastaccess.ui.widgets.ViewPagerView
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/scroll_behavior"/>
|
||||
app:layout_behavior="@string/scroll_behavior" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
@ -115,7 +112,7 @@
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:src="@drawable/ic_comment"
|
||||
android:tint="@color/white"
|
||||
app:fabSize="auto"/>
|
||||
app:fabSize="auto" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@ -124,9 +121,9 @@
|
||||
android:name="com.fastaccess.ui.modules.editor.comment.CommentEditorFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout="@layout/comment_box_layout"/>
|
||||
tools:layout="@layout/comment_box_layout" />
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/nav_menu_layout"/>
|
||||
<include layout="@layout/nav_menu_layout" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
Loading…
x
Reference in New Issue
Block a user