Showing preview only (453K chars total). Download the full file or copy to clipboard to get everything.
Repository: LRH1993/LiveCircle
Branch: master
Commit: 00da5281795f
Files: 172
Total size: 385.8 KB
Directory structure:
gitextract_6rcgjzff/
├── LiveCircle/
│ ├── .gitignore
│ ├── .idea/
│ │ ├── compiler.xml
│ │ ├── copyright/
│ │ │ └── profiles_settings.xml
│ │ ├── encodings.xml
│ │ ├── gradle.xml
│ │ ├── inspectionProfiles/
│ │ │ ├── Project_Default.xml
│ │ │ └── profiles_settings.xml
│ │ ├── misc.xml
│ │ ├── modules.xml
│ │ └── runConfigurations.xml
│ ├── app/
│ │ ├── .gitignore
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── androidTest/
│ │ │ └── java/
│ │ │ └── com/
│ │ │ └── lvr/
│ │ │ └── livecircle/
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── lvr/
│ │ │ │ └── livecircle/
│ │ │ │ ├── adapter/
│ │ │ │ │ ├── CardAdapter.java
│ │ │ │ │ ├── HomeViewPagerAdapter.java
│ │ │ │ │ ├── NewsChannelAdapter.java
│ │ │ │ │ ├── NewsChannelGridAdapter.java
│ │ │ │ │ ├── NewsListAdapter.java
│ │ │ │ │ ├── OnNewsChannelListener.java
│ │ │ │ │ └── PhotoListAdapter.java
│ │ │ │ ├── api/
│ │ │ │ │ ├── ApiConstants.java
│ │ │ │ │ ├── ApiService.java
│ │ │ │ │ └── HostType.java
│ │ │ │ ├── app/
│ │ │ │ │ ├── AppApplication.java
│ │ │ │ │ ├── AppConstant.java
│ │ │ │ │ └── AppManager.java
│ │ │ │ ├── base/
│ │ │ │ │ ├── BaseActivity.java
│ │ │ │ │ ├── BaseApplication.java
│ │ │ │ │ ├── BaseFragment.java
│ │ │ │ │ └── BaseFragmentAdapter.java
│ │ │ │ ├── bean/
│ │ │ │ │ ├── ChannelBean.java
│ │ │ │ │ ├── FabScrollBean.java
│ │ │ │ │ ├── HeaderBean.java
│ │ │ │ │ └── NewsInfo.java
│ │ │ │ ├── client/
│ │ │ │ │ ├── BaseApiService.java
│ │ │ │ │ ├── BaseInterceptor.java
│ │ │ │ │ ├── BaseObserver.java
│ │ │ │ │ ├── BaseResponse.java
│ │ │ │ │ ├── CaheInterceptor.java
│ │ │ │ │ ├── ExceptionHandle.java
│ │ │ │ │ ├── IpResult.java
│ │ │ │ │ ├── NetworkUtil.java
│ │ │ │ │ ├── RetrofitClient.java
│ │ │ │ │ └── RxDisposeManager.java
│ │ │ │ ├── find/
│ │ │ │ │ └── FindFragment.java
│ │ │ │ ├── home/
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── SplashActivity.java
│ │ │ │ ├── meitu/
│ │ │ │ │ ├── MeiTuFragment.java
│ │ │ │ │ ├── model/
│ │ │ │ │ │ ├── PhotoModel.java
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── GirlData.java
│ │ │ │ │ │ │ └── PhotoGirl.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ └── PhotoModelImpl.java
│ │ │ │ │ ├── presenter/
│ │ │ │ │ │ ├── PhotoPresenter.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ └── PhotoPresenterImpl.java
│ │ │ │ │ └── view/
│ │ │ │ │ └── PhotoView.java
│ │ │ │ ├── music/
│ │ │ │ │ └── MusicFragment.java
│ │ │ │ ├── nearby/
│ │ │ │ │ └── NearByFragment.java
│ │ │ │ ├── news/
│ │ │ │ │ ├── activity/
│ │ │ │ │ │ ├── NewsChannelActivity.java
│ │ │ │ │ │ ├── NewsDetailActivity.java
│ │ │ │ │ │ └── NewsPhotoDetailActivity.java
│ │ │ │ │ ├── db/
│ │ │ │ │ │ └── NewsChannelTableManager.java
│ │ │ │ │ ├── fragment/
│ │ │ │ │ │ └── NewsFragment.java
│ │ │ │ │ ├── model/
│ │ │ │ │ │ ├── NewsChannelModel.java
│ │ │ │ │ │ ├── NewsDetailModel.java
│ │ │ │ │ │ ├── NewsModel.java
│ │ │ │ │ │ ├── bean/
│ │ │ │ │ │ │ ├── NewsChannelTable.java
│ │ │ │ │ │ │ ├── NewsDetail.java
│ │ │ │ │ │ │ └── NewsPhotoDetail.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ ├── NewsChannelModelImpl.java
│ │ │ │ │ │ ├── NewsDetailModelImpl.java
│ │ │ │ │ │ └── NewsModelImpl.java
│ │ │ │ │ ├── presenter/
│ │ │ │ │ │ ├── NewPresenter.java
│ │ │ │ │ │ ├── NewsChannelPresenter.java
│ │ │ │ │ │ ├── NewsDetailPresenter.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ ├── NewsChannelPresenterImpl.java
│ │ │ │ │ │ ├── NewsDetailPresenterImpl.java
│ │ │ │ │ │ └── NewsPresenterImpl.java
│ │ │ │ │ └── view/
│ │ │ │ │ ├── NewsChannelView.java
│ │ │ │ │ ├── NewsDetailView.java
│ │ │ │ │ └── NewsView.java
│ │ │ │ ├── recommend/
│ │ │ │ │ └── RecommendFragment.java
│ │ │ │ ├── recycleviewcardgallery/
│ │ │ │ │ ├── CardAdapterHelper.java
│ │ │ │ │ ├── CardLinearSnapHelper.java
│ │ │ │ │ ├── CardScaleHelper.java
│ │ │ │ │ └── SpeedRecyclerView.java
│ │ │ │ ├── utils/
│ │ │ │ │ ├── ACache.java
│ │ │ │ │ ├── CollectionUtils.java
│ │ │ │ │ ├── DisplayUtil.java
│ │ │ │ │ ├── GlideRoundTransformUtil.java
│ │ │ │ │ ├── ImageLoaderUtils.java
│ │ │ │ │ ├── StatusBarSetting.java
│ │ │ │ │ ├── TUtil.java
│ │ │ │ │ ├── TimeUtil.java
│ │ │ │ │ └── ToastUitl.java
│ │ │ │ ├── video/
│ │ │ │ │ └── VideoFragment.java
│ │ │ │ └── widget/
│ │ │ │ ├── ClassicRefreshHeaderView.java
│ │ │ │ ├── ItemDragHelperCallback.java
│ │ │ │ ├── LoadMoreFooterView.java
│ │ │ │ ├── LoadingDialog.java
│ │ │ │ ├── LoadingTip.java
│ │ │ │ ├── ScrollAwareFABBehavior.java
│ │ │ │ ├── StatusBarView.java
│ │ │ │ └── URLImageGetter.java
│ │ │ └── res/
│ │ │ ├── anim/
│ │ │ │ ├── act_fade_in_center.xml
│ │ │ │ ├── act_fade_out_center.xml
│ │ │ │ ├── fade_in.xml
│ │ │ │ ├── fade_out.xml
│ │ │ │ ├── rotate_down.xml
│ │ │ │ ├── rotate_up.xml
│ │ │ │ ├── slide_in_left.xml
│ │ │ │ ├── slide_in_right.xml
│ │ │ │ ├── slide_out_left.xml
│ │ │ │ └── slide_out_right.xml
│ │ │ ├── drawable/
│ │ │ │ ├── loading_dialog_progressbar.xml
│ │ │ │ ├── selector_gray.xml
│ │ │ │ ├── shape_loading_dialog.xml
│ │ │ │ └── tv_rounded_corners.xml
│ │ │ ├── layout/
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_news_channel.xml
│ │ │ │ ├── activity_news_detail.xml
│ │ │ │ ├── activity_news_photo_detail.xml
│ │ │ │ ├── activty_splash.xml
│ │ │ │ ├── app_bar.xml
│ │ │ │ ├── dialog_loading.xml
│ │ │ │ ├── dialog_loading_tip.xml
│ │ │ │ ├── fragment_find.xml
│ │ │ │ ├── fragment_meitu.xml
│ │ │ │ ├── fragment_music.xml
│ │ │ │ ├── fragment_nearby.xml
│ │ │ │ ├── fragment_news.xml
│ │ │ │ ├── fragment_recommend.xml
│ │ │ │ ├── fragment_video.xml
│ │ │ │ ├── item_card_view.xml
│ │ │ │ ├── item_channel_card.xml
│ │ │ │ ├── item_content_news_detail.xml
│ │ │ │ ├── item_foot_view.xml
│ │ │ │ ├── item_grid_news_channel.xml
│ │ │ │ ├── item_header_view.xml
│ │ │ │ ├── item_news.xml
│ │ │ │ ├── item_news_header.xml
│ │ │ │ ├── item_news_photo.xml
│ │ │ │ ├── item_photo_girl.xml
│ │ │ │ ├── layout_irecyclerview_classic_refresh_header_view.xml
│ │ │ │ ├── layout_irecyclerview_load_more_footer.xml
│ │ │ │ ├── layout_irecyclerview_load_more_footer_error_view.xml
│ │ │ │ ├── layout_irecyclerview_load_more_footer_loading_view.xml
│ │ │ │ ├── layout_irecyclerview_load_more_footer_the_end_view.xml
│ │ │ │ ├── layout_irecyclerview_load_more_footer_view.xml
│ │ │ │ ├── layout_irecyclerview_refresh_header.xml
│ │ │ │ ├── toast_custom.xml
│ │ │ │ └── view_nav.xml
│ │ │ ├── menu/
│ │ │ │ ├── menu_nav.xml
│ │ │ │ └── menu_toolabr.xml
│ │ │ ├── values/
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── ids.xml
│ │ │ │ ├── news_channel_info.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── values-v19/
│ │ │ │ └── dimens.xml
│ │ │ └── values-w820dp/
│ │ │ └── dimens.xml
│ │ └── test/
│ │ └── java/
│ │ └── com/
│ │ └── lvr/
│ │ └── livecircle/
│ │ └── ExampleUnitTest.java
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: LiveCircle/.gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
================================================
FILE: LiveCircle/.idea/compiler.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
================================================
FILE: LiveCircle/.idea/copyright/profiles_settings.xml
================================================
<component name="CopyrightManager">
<settings default="" />
</component>
================================================
FILE: LiveCircle/.idea/encodings.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
================================================
FILE: LiveCircle/.idea/gradle.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
================================================
FILE: LiveCircle/.idea/inspectionProfiles/Project_Default.xml
================================================
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintGradleCompatible" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintNewApi" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
</profile>
</component>
================================================
FILE: LiveCircle/.idea/inspectionProfiles/profiles_settings.xml
================================================
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>
================================================
FILE: LiveCircle/.idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
================================================
FILE: LiveCircle/.idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/LiveCircle.iml" filepath="$PROJECT_DIR$/LiveCircle.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>
================================================
FILE: LiveCircle/.idea/runConfigurations.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
================================================
FILE: LiveCircle/app/.gitignore
================================================
/build
================================================
FILE: LiveCircle/app/build.gradle
================================================
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.lvr.livecircle"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.1.0'
//视图绑定 butterknife
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'de.greenrobot:eventbus:3.0.0-beta1'
//引入okhttp
compile 'com.squareup.okhttp3:okhttp:3.5.0'
//引入retrofit
compile 'com.squareup.retrofit2:retrofit:2.1.0'
//引入rxjava
compile 'io.reactivex.rxjava2:rxjava:2.0.4'
//引入Log拦截器,方便DEBUG模式输出log信息
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
//引入rxjava适配器,方便rxjava与retrofit的结合
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
//引入json转换器,方便将返回的数据转换为json格式
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//引入rxandroid
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.github.Aspsine:IRecyclerView:0.0.5'
}
================================================
FILE: LiveCircle/app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in E:\AndroidStudio\SDKinstallpackage/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
================================================
FILE: LiveCircle/app/src/androidTest/java/com/lvr/livecircle/ExampleInstrumentedTest.java
================================================
package com.lvr.livecircle;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.lvr.livecircle", appContext.getPackageName());
}
}
================================================
FILE: LiveCircle/app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lvr.livecircle">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<application
android:name=".app.AppApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:theme="@style/AppTheme.Launcher"
android:name=".home.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".home.MainActivity"></activity>
<activity android:name=".news.activity.NewsChannelActivity"></activity>
<activity android:name=".news.activity.NewsDetailActivity"></activity>
<activity android:name=".news.activity.NewsPhotoDetailActivity"></activity>
</application>
</manifest>
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/CardAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.news.model.bean.NewsPhotoDetail;
import com.lvr.livecircle.recycleviewcardgallery.CardAdapterHelper;
import com.lvr.livecircle.utils.ImageLoaderUtils;
import java.util.ArrayList;
import java.util.List;
/**
* Created by lvr on 2017/2/6.
*/
public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHolder> {
private List<NewsPhotoDetail.Picture> mList = new ArrayList<>();
private CardAdapterHelper mCardAdapterHelper = new CardAdapterHelper();
private Context mContext;
public CardAdapter(Context context,List<NewsPhotoDetail.Picture> mList) {
this.mList = mList;
this.mContext = context;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_card_view, parent, false);
mCardAdapterHelper.onCreateViewHolder(parent, itemView);
return new ViewHolder(itemView);
}
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
mCardAdapterHelper.onBindViewHolder(holder.itemView, position, getItemCount());
ImageLoaderUtils.displayBigPhoto(mContext,holder.mImageView,mList.get(position).getImgSrc());
}
@Override
public int getItemCount() {
return mList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public final ImageView mImageView;
public ViewHolder(final View itemView) {
super(itemView);
mImageView = (ImageView) itemView.findViewById(R.id.imageView);
}
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/HomeViewPagerAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import com.lvr.livecircle.base.BaseFragmentAdapter;
import java.util.List;
/**
* Created by lvr on 2017/2/6.
*/
public class HomeViewPagerAdapter extends BaseFragmentAdapter {
public HomeViewPagerAdapter(FragmentManager fm, List<Fragment> fragmentList, List<String> mTitles) {
super(fm, fragmentList, mTitles);
}
public HomeViewPagerAdapter(FragmentManager fm, List<Fragment> fragmentList) {
super(fm, fragmentList);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.content.Context;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.bean.ChannelBean;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import com.lvr.livecircle.widget.ItemDragHelperCallback;
import java.util.Collections;
import java.util.List;
import de.greenrobot.event.EventBus;
/**
* Created by lvr on 2017/2/14.
*/
public class NewsChannelAdapter extends RecyclerView.Adapter<NewsChannelAdapter.ChannelViewHolder> implements ItemDragHelperCallback.OnItemMoveListener {
private final Context context;
private final LayoutInflater inflater;
private List<NewsChannelTable> mTables;
private ItemDragHelperCallback mItemDragHelperCallback;
private OnItemClickListener mOnItemClickListener;
public NewsChannelAdapter(Context context, List<NewsChannelTable> tables) {
this.context = context;
this.mTables = tables;
this.inflater = LayoutInflater.from(context);
}
public void setItemDragHelperCallback(ItemDragHelperCallback itemDragHelperCallback) {
mItemDragHelperCallback = itemDragHelperCallback;
}
public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
mOnItemClickListener = onItemClickListener;
}
@Override
public ChannelViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ChannelViewHolder(inflater.inflate(R.layout.item_channel_card, parent, false));
}
@Override
public void onBindViewHolder(ChannelViewHolder holder, int position) {
NewsChannelTable table = mTables.get(position);
holder.mTextView.setText(table.getNewsChannelName());
holder.mImageView.setImageResource(table.getImgRes());
handleLongPress(holder, table);
handleOnClick(holder, table);
}
//处理点击事件
private void handleOnClick(final ChannelViewHolder holder, final NewsChannelTable table) {
if (mOnItemClickListener != null) {
holder.mLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!table.getNewsChannelFixed()) {
//对项目点击后增删操作的监听
mOnItemClickListener.onItemClick(view, holder.getLayoutPosition());
}
}
});
}
}
//处理长按事件 开启ItemDragHelperCallBack拖拽
private void handleLongPress(ChannelViewHolder holder, final NewsChannelTable table) {
if (mItemDragHelperCallback != null) {
holder.mLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
mItemDragHelperCallback.setLongPressEnabled(table.getNewsChannelIndex() == 0 ? false : true);
return false;
}
});
}
}
@Override
public int getItemCount() {
return mTables.size();
}
@Override
public boolean onItemMove(int fromPosition, int toPosition) {
if (isChannelFixed(fromPosition, toPosition)) {
return false;
}
//在我的频道子频道的移动
Collections.swap(getAdapterData(), fromPosition, toPosition);
notifyItemMoved(fromPosition, toPosition);
//通知顺序变换,存储,设置频道顺序,以及显示的顺序
System.out.println("发送移动的消息");
EventBus.getDefault().post(new ChannelBean(getAdapterData()));
return true;
}
//不能移动头条
private boolean isChannelFixed(int fromPosition, int toPosition) {
return fromPosition == 0 || toPosition == 0;
}
public class ChannelViewHolder extends RecyclerView.ViewHolder {
private TextView mTextView;
private ImageView mImageView;
private CardView mCardView;
private RelativeLayout mLayout;
public ChannelViewHolder(View itemView) {
super(itemView);
mImageView = (ImageView) itemView.findViewById(R.id.iv_channel_logo);
mTextView = (TextView) itemView.findViewById(R.id.tv_channel_name);
mCardView = (CardView) itemView.findViewById(R.id.cardView);
mLayout = (RelativeLayout) itemView.findViewById(R.id.rl_root);
}
}
public List<NewsChannelTable> getAdapterData() {
return mTables;
}
//Item点击事件的监听接口
public interface OnItemClickListener {
void onItemClick(View view, int position);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelGridAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.List;
/**
* Created by lvr on 2017/2/7.
*/
public class NewsChannelGridAdapter extends BaseAdapter {
private List<NewsChannelTable> mTables;
private Context mContext;
private LayoutInflater mInflater;
public NewsChannelGridAdapter(List<NewsChannelTable> mTables, Context context) {
this.mTables = mTables;
this.mContext = context;
mInflater = LayoutInflater.from(mContext);
}
@Override
public int getCount() {
return mTables.size();
}
@Override
public Object getItem(int i) {
return mTables.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int position, View convertView, ViewGroup group) {
View view = null;
ViewHolder viewHolder;
if(convertView==null){
viewHolder = new ViewHolder();
view = mInflater.inflate(R.layout.item_grid_news_channel,group,false);
viewHolder.mImageView = (ImageView) view.findViewById(R.id.iv_channel_logo);
viewHolder.mTextView= (TextView) view.findViewById(R.id.tv_channel_name);
view.setTag(viewHolder);
}else{
view = convertView;
viewHolder = (ViewHolder) view.getTag();
}
viewHolder.mImageView.setImageResource(mTables.get(position).getImgRes());
viewHolder.mTextView.setText(mTables.get(position).getNewsChannelName());
return view;
}
public static class ViewHolder {
ImageView mImageView;
TextView mTextView;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsListAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.bean.NewsInfo;
import com.lvr.livecircle.home.MainActivity;
import com.lvr.livecircle.news.activity.NewsChannelActivity;
import com.lvr.livecircle.news.activity.NewsDetailActivity;
import com.lvr.livecircle.news.activity.NewsPhotoDetailActivity;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import com.lvr.livecircle.news.model.bean.NewsPhotoDetail;
import com.lvr.livecircle.utils.DisplayUtil;
import com.lvr.livecircle.utils.ImageLoaderUtils;
import com.lvr.livecircle.utils.ToastUitl;
import java.util.ArrayList;
import java.util.List;
import static com.lvr.livecircle.R.id.news_summary_photo_iv_group;
/**
* Created by lvr on 2017/2/8.
*/
public class NewsListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private final Context context;
private final LayoutInflater inflater;
private List<NewsInfo> list ;
private List<NewsChannelTable> mTables;
//新闻模式
private static final int TYPE_SINGLE = 0;
//图集模式
private static final int TYPE_MULTI = 1;
//头布局模式
private static final int TYPE_HEADER = 2;
//尾布局模式
private static final int TYPE_FOOT = 3;
//新闻频道切换监听
private OnNewsChannelListener mNewsChannelListener;
public NewsListAdapter(Context context, List<NewsInfo> list, List<NewsChannelTable> tables) {
this.context = context;
this.list = list;
this.mTables = tables;
this.inflater = LayoutInflater.from(context);
}
@Override
public int getItemViewType(int position) {
NewsInfo info = list.get(position);
if(info.getTitle().endsWith("头布局")){
return TYPE_HEADER;
}
if (!TextUtils.isEmpty(info.getDigest()))
{
return TYPE_SINGLE;
}
return TYPE_MULTI;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
switch (viewType) {
case TYPE_SINGLE:
return new SingleViewHolder(inflater.inflate(R.layout.item_news, parent, false));
case TYPE_MULTI:
return new MultiViewHolder(inflater.inflate(R.layout.item_news_photo, parent, false));
case TYPE_HEADER:
return new HeaderViewHolder(inflater.inflate(R.layout.item_news_header,parent,false));
}
return null;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
//新闻模式
if (holder instanceof SingleViewHolder) {
setNormalItemValues((SingleViewHolder) holder,position);
}else if(holder instanceof MultiViewHolder){
setMultiItemValues((MultiViewHolder) holder,position);
}else if(holder instanceof HeaderViewHolder){
setHeaderItemValues((HeaderViewHolder) holder);
}
}
//设置头布局的值
private void setHeaderItemValues(HeaderViewHolder holder) {
NewsChannelGridAdapter mAdapter = new NewsChannelGridAdapter(mTables, context);
holder.mGridView.setAdapter(mAdapter);
//解决GridView只显示一行的原因 主动设置GridView的高度
ViewGroup.LayoutParams params = holder.mGridView.getLayoutParams();
View view = mAdapter.getView(0, null, holder.mGridView);
view.measure(0,0);
int height =view.getMeasuredHeight();
int totalHeight = holder.mGridView.getVerticalSpacing() * 2 + height * 2;
params.height = totalHeight;
holder.mGridView.setLayoutParams(params);
}
@Override
public int getItemCount() {
return list.size();
}
//新闻模式下item值的设置
private void setNormalItemValues(final SingleViewHolder holder, int position) {
final NewsInfo newsInfo = list.get(position);
String title = newsInfo.getTitle();
final String content = newsInfo.getDigest();
String time = newsInfo.getPtime();
String imgsrc = newsInfo.getImgsrc();
holder.mTitle.setText(title==null?"新闻头条":title);
holder.mContent.setText(content);
holder.mTime.setText(time);
ImageLoaderUtils.display(context,holder.mImageView,imgsrc);
holder.mLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NewsDetailActivity.startAction(context,holder.mImageView,newsInfo.getPostid(),newsInfo.getImgsrc());
}
});
}
//图集模式下item值的设置
private void setMultiItemValues(MultiViewHolder holder, int position) {
final NewsInfo newsInfo = list.get(position);
String title = newsInfo.getTitle();
String time = newsInfo.getPtime();
holder.mTitle.setText(title==null?"新闻头条":title);
holder.mTime.setText(time);
setImageView(holder,newsInfo);
holder.mRoot.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NewsPhotoDetailActivity.startAction(context,getPhotoDetail(newsInfo));
}
});
}
private NewsPhotoDetail getPhotoDetail(NewsInfo info) {
NewsPhotoDetail newsPhotoDetail = new NewsPhotoDetail();
newsPhotoDetail.setTitle(info.getTitle());
setPictures(info, newsPhotoDetail);
return newsPhotoDetail;
}
private void setPictures(NewsInfo info, NewsPhotoDetail detail) {
List<NewsPhotoDetail.Picture> pictureList = new ArrayList<>();
if (info.getAds() != null) {
for (NewsInfo.AdsBean entity : info.getAds()) {
setValuesAndAddToList(pictureList, entity.getTitle(), entity.getImgsrc());
}
} else if (info.getImgextra() != null) {
for (NewsInfo.ImgextraBean entity : info.getImgextra()) {
setValuesAndAddToList(pictureList, null, entity.getImgsrc());
}
} else {
setValuesAndAddToList(pictureList, null, info.getImgsrc());
}
detail.setPictures(pictureList);
}
private void setValuesAndAddToList(List<NewsPhotoDetail.Picture> list, String title, String imgsrc) {
NewsPhotoDetail.Picture picture = new NewsPhotoDetail.Picture();
if (title != null) {
picture.setTitle(title);
}
picture.setImgSrc(imgsrc);
list.add(picture);
}
//根据图片的张数设置不同的显示模式
private void setImageView(MultiViewHolder holder, NewsInfo newsInfo) {
//根据图片张数确定图片的高度
int PhotoThreeHeight = (int) DisplayUtil.dip2px(90);
int PhotoTwoHeight = (int) DisplayUtil.dip2px(120);
int PhotoOneHeight = (int) DisplayUtil.dip2px(150);
//存放图片url
String imgSrcLeft = null;
String imgSrcMiddle = null;
String imgSrcRight = null;
LinearLayout layout = holder.mLayout;
ViewGroup.LayoutParams params = layout.getLayoutParams();
//先从ads域中拿图片
if (newsInfo.getAds() != null) {
List<NewsInfo.AdsBean> adsBeanList = newsInfo.getAds();
int size = adsBeanList.size();
if (size >= 3) {
//图片数量大于3 只取前三个
imgSrcLeft = adsBeanList.get(0).getImgsrc();
imgSrcMiddle = adsBeanList.get(1).getImgsrc();
imgSrcRight = adsBeanList.get(2).getImgsrc();
params.height = PhotoThreeHeight;
} else if (size >= 2) {
//图片数量2个
imgSrcLeft = adsBeanList.get(0).getImgsrc();
imgSrcMiddle = adsBeanList.get(1).getImgsrc();
params.height = PhotoTwoHeight;
} else if (size >= 1) {
//图片数量1个
imgSrcLeft = adsBeanList.get(0).getImgsrc();
params.height = PhotoOneHeight;
}
//从imgextra域中拿图片
} else if (newsInfo.getImgextra() != null) {
int size = newsInfo.getImgextra().size();
if (size >= 3) {
imgSrcLeft = newsInfo.getImgextra().get(0).getImgsrc();
imgSrcMiddle = newsInfo.getImgextra().get(1).getImgsrc();
imgSrcRight = newsInfo.getImgextra().get(2).getImgsrc();
params.height = PhotoThreeHeight;
} else if (size >= 2) {
imgSrcLeft = newsInfo.getImgextra().get(0).getImgsrc();
imgSrcMiddle = newsInfo.getImgextra().get(1).getImgsrc();
params.height = PhotoTwoHeight;
} else if (size >= 1) {
imgSrcLeft = newsInfo.getImgextra().get(0).getImgsrc();
params.height = PhotoOneHeight;
}
} else {
//从imgsrc域中拿图片
imgSrcLeft = newsInfo.getImgsrc();
params.height = PhotoOneHeight;
}
layout.setLayoutParams(params);
setPhotoImageView(holder, imgSrcLeft, imgSrcMiddle, imgSrcRight);
}
//将拿到的图片加载显示
private void setPhotoImageView(MultiViewHolder holder, String left, String middle, String right) {
if (left != null) {
holder.mIvLeft.setVisibility(View.VISIBLE);
ImageLoaderUtils.display(context,holder.mIvLeft,left);
} else {
holder.mIvLeft.setVisibility(View.GONE);//设置为Gone不占位
}
if (middle != null) {
holder.mIvMiddle.setVisibility(View.VISIBLE);
ImageLoaderUtils.display(context,holder.mIvMiddle,middle);
} else {
holder.mIvMiddle.setVisibility(View.GONE);//设置为Gone不占位
}
if (right != null) {
holder.mIvRight.setVisibility(View.VISIBLE);
ImageLoaderUtils.display(context,holder.mIvRight,right);
} else {
holder.mIvRight.setVisibility(View.GONE);//设置为Gone不占位
}
}
public class SingleViewHolder extends RecyclerView.ViewHolder{
private ImageView mImageView;
private TextView mTitle;
private TextView mContent;
private TextView mTime;
private RelativeLayout mLayout;
public SingleViewHolder(View itemView) {
super(itemView);
mImageView = (ImageView) itemView.findViewById(R.id.news_summary_photo_iv);
mTitle = (TextView) itemView.findViewById(R.id.news_summary_title_tv);
mContent = (TextView) itemView.findViewById(R.id.news_summary_digest_tv);
mTime = (TextView) itemView.findViewById(R.id.news_summary_ptime_tv);
mLayout = (RelativeLayout) itemView.findViewById(R.id.rl_root);
}
}
public class MultiViewHolder extends RecyclerView.ViewHolder{
private LinearLayout mLayout;
private TextView mTitle;
private TextView mTime;
private ImageView mIvLeft;
private ImageView mIvMiddle;
private ImageView mIvRight;
private LinearLayout mRoot;
public MultiViewHolder(View itemView) {
super(itemView);
mLayout = (LinearLayout) itemView.findViewById(news_summary_photo_iv_group);
mTitle = (TextView) itemView.findViewById(R.id.news_summary_title_tv);
mTime = (TextView) itemView.findViewById(R.id.news_summary_ptime_tv);
mIvLeft = (ImageView) itemView.findViewById(R.id.news_summary_photo_iv_left);
mIvMiddle = (ImageView) itemView.findViewById(R.id.news_summary_photo_iv_middle);
mIvRight = (ImageView) itemView.findViewById(R.id.news_summary_photo_iv_right);
mRoot = (LinearLayout) itemView.findViewById(R.id.ll_root);
}
}
public class HeaderViewHolder extends RecyclerView.ViewHolder{
private GridView mGridView;
public HeaderViewHolder(View itemView) {
super(itemView);
mGridView = (GridView) itemView.findViewById(R.id.gv_news_channel);
mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
String name = mTables.get(position).getNewsChannelName();
if(name.contains("全部")){
ToastUitl.showShort("切换到新闻频道管理页面:"+name);
NewsChannelActivity.startAction((MainActivity) context);
}else{
ToastUitl.showShort("切换到新闻频道:"+name);
mNewsChannelListener.changeChannelListener(mTables.get(position));
}
}
});
}
}
public void setNewsChannelListener(OnNewsChannelListener listener){
mNewsChannelListener = listener;
}
public List<NewsInfo> getAdapterData(){
return list;
}
public void setTables(List<NewsChannelTable> list){
mTables = list;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/OnNewsChannelListener.java
================================================
package com.lvr.livecircle.adapter;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
/**
* Created by lvr on 2017/2/11.
*/
public interface OnNewsChannelListener {
void changeChannelListener(NewsChannelTable newsChannelTable);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/PhotoListAdapter.java
================================================
package com.lvr.livecircle.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import com.lvr.livecircle.utils.ImageLoaderUtils;
import java.util.List;
/**
* Created by lvr on 2017/2/20.
*/
public class PhotoListAdapter extends RecyclerView.Adapter<PhotoListAdapter.PhotoViewHolder> {
private Context mContext;
private List<PhotoGirl> mData;
private final LayoutInflater inflater;
public PhotoListAdapter(Context context, List<PhotoGirl> list) {
this.mContext = context;
this.inflater = LayoutInflater.from(context);
this.mData = list;
}
@Override
public PhotoListAdapter.PhotoViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new PhotoViewHolder(inflater.inflate(R.layout.item_photo_girl,parent,false));
}
@Override
public void onBindViewHolder(PhotoListAdapter.PhotoViewHolder holder, int position) {
ImageLoaderUtils.display(mContext,holder.mImageView,mData.get(position).getUrl());
}
@Override
public int getItemCount() {
return mData.size();
}
public class PhotoViewHolder extends RecyclerView.ViewHolder{
private ImageView mImageView;
public PhotoViewHolder(View itemView) {
super(itemView);
mImageView = (ImageView) itemView.findViewById(R.id.iv_photo);
}
}
public List<PhotoGirl> getAdapterData(){
return mData;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiConstants.java
================================================
/*
* Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.lvr.livecircle.api;
public class ApiConstants {
// 头条TYPE
public static final String HEADLINE_TYPE = "headline";
// 房产TYPE
public static final String HOUSE_TYPE = "house";
// 其他TYPE
public static final String OTHER_TYPE = "list";
// 头条id
public static final String HEADLINE_ID = "T1348647909107";
// 房产id
public static final String HOUSE_ID = "5YyX5Lqs";
/**
* 视频 http://c.3g.163.com/nc/video/list/V9LG4CHOR/n/10-10.html
*/
public static final String Video = "nc/video/list/";
public static final String VIDEO_CENTER = "/n/";
public static final String VIDEO_END_URL = "-10.html";
// 热点视频
public static final String VIDEO_HOT_ID = "V9LG4B3A0";
// 娱乐视频
public static final String VIDEO_ENTERTAINMENT_ID = "V9LG4CHOR";
// 搞笑视频
public static final String VIDEO_FUN_ID = "V9LG4E6VR";
// 精品视频
public static final String VIDEO_CHOICE_ID = "00850FRB";
/**
* 图片
* http://gank.io/api/data/福利/{size}/{page}
*/
public static final String PHOTO_HOST = "http://gank.io/api/";
/**
* 新闻id获取类型
*
* @param id 新闻id
* @return 新闻类型
*/
public static String getType(String id) {
switch (id) {
case HEADLINE_ID:
return HEADLINE_TYPE;
case HOUSE_ID:
return HOUSE_TYPE;
default:
break;
}
return OTHER_TYPE;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiService.java
================================================
package com.lvr.livecircle.api;
import com.lvr.livecircle.bean.NewsInfo;
import com.lvr.livecircle.meitu.model.bean.GirlData;
import com.lvr.livecircle.news.model.bean.NewsDetail;
import java.util.List;
import java.util.Map;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Url;
/**
* Created by lvr on 2017/2/8.
*/
public interface ApiService {
public static final String NEWS_BASE_URL = "http://c.m.163.com/nc/article/";
public static final String PHOTO_BASE_URL = "http://gank.io/api/data/福利/";
@GET("{type}/{id}/{startPage}-20.html")
Observable<Map<String, List<NewsInfo>>> getNewsList(
@Path("type") String type, @Path("id") String id,
@Path("startPage") int startPage);
@GET("{postId}/full.html")
Observable<Map<String, NewsDetail>> getNewDetail(
@Path("postId") String postId);
@GET
Observable<ResponseBody> getNewsBodyHtmlPhoto(
@Url String photoPath);
@GET("{size}/{page}")
Observable<GirlData> getPhotoList(@Path("size") int size, @Path("page") int page);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/HostType.java
================================================
/*
* Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.lvr.livecircle.api;
public class HostType {
/**
* 多少种Host类型
*/
public static final int TYPE_COUNT = 3;
/**
* 网易新闻视频的host
*/
public static final int NETEASE_NEWS_VIDEO = 1;
/**
* 新浪图片的host
*/
public static final int GANK_GIRL_PHOTO = 2;
/**
* 新闻详情html图片的host
*/
public static final int NEWS_DETAIL_HTML_PHOTO = 3;
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppApplication.java
================================================
package com.lvr.livecircle.app;
import com.lvr.livecircle.base.BaseApplication;
/**
* APPLICATION
*/
public class AppApplication extends BaseApplication {
@Override
public void onCreate() {
super.onCreate();
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppConstant.java
================================================
package com.lvr.livecircle.app;
public class AppConstant {
public static final String HOME_CURRENT_TAB_POSITION="HOME_CURRENT_TAB_POSITION";
public static final String MENU_SHOW_HIDE="MENU_SHOW_HIDE";
/* 新闻*/
public static final String NEWS_ID = "news_id";
public static final String NEWS_TYPE = "news_type";
public static final String CHANNEL_POSITION = "channel_position";
public static final String CHANNEL_MINE = "CHANNEL_MINE";
public static final String CHANNEL_MORE = "CHANNEL_MORE";
public static final String CHANNEL_SWAP = "CHANNEL_SWAP";
public static final String NEWS_CHANNEL_CHANGED = "NEWS_CHANNEL_CHANGED";
/* 视频*/
public static final String VIDEO_TYPE = "VIDEO_TYPE";
public static String NEWS_LIST_TO_TOP = "NEWS_LIST_TO_TOP";//列表返回顶部
public static String ZONE_PUBLISH_ADD = "ZONE_PUBLISH_ADD";//发布说说
public static String NEWS_POST_ID = "NEWS_POST_ID";//新闻详情id
public static String NEWS_LINK = "NEWS_LINK";
public static String NEWS_TITLE = "NEWS_TITLE";
public static final String PHOTO_DETAIL_IMGSRC = "photo_detail_imgsrc";
public static final String PHOTO_DETAIL = "photo_detail";
public static final String PHOTO_TAB_CLICK = "PHOTO_TAB_CLICK";
public static final String NEWS_IMG_RES = "news_img_res";
public static final String TRANSITION_ANIMATION_NEWS_PHOTOS = "transition_animation_news_photos";
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppManager.java
================================================
package com.lvr.livecircle.app;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import java.util.Stack;
/**
* activity管理
*/
public class AppManager {
private static Stack<Activity> activityStack;
private volatile static AppManager instance;
private AppManager() {
}
/**
* 单一实例
*/
public static AppManager getAppManager() {
if (instance == null) {
synchronized (AppManager.class){
if(instance==null){
instance = new AppManager();
instance.activityStack = new Stack();
}
}
}
return instance;
}
/**
* 添加Activity到堆栈
*/
public void addActivity(Activity activity) {
if (activityStack == null) {
activityStack = new Stack<Activity>();
}
activityStack.add(activity);
}
/**
* 获取当前Activity(堆栈中最后一个压入的)
*/
public Activity currentActivity() {
try {
Activity activity = activityStack.lastElement();
return activity;
} catch (Exception e) {
// e.printStackTrace();
return null;
}
}
/**
* 获取当前Activity的前一个Activity
*/
public Activity preActivity() {
int index = activityStack.size() - 2;
if (index < 0) {
return null;
}
Activity activity = activityStack.get(index);
return activity;
}
/**
* 结束当前Activity(堆栈中最后一个压入的)
*/
public void finishActivity() {
Activity activity = activityStack.lastElement();
finishActivity(activity);
}
/**
* 结束指定的Activity
*/
public void finishActivity(Activity activity) {
if (activity != null) {
activityStack.remove(activity);
activity.finish();
activity = null;
}
}
/**
* 移除指定的Activity
*/
public void removeActivity(Activity activity) {
if (activity != null) {
activityStack.remove(activity);
activity = null;
}
}
/**
* 结束指定类名的Activity
*/
public void finishActivity(Class<?> cls) {
try {
for (Activity activity : activityStack) {
if (activity.getClass().equals(cls)) {
finishActivity(activity);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 结束所有Activity
*/
public void finishAllActivity() {
for (int i = 0, size = activityStack.size(); i < size; i++) {
if (null != activityStack.get(i)) {
activityStack.get(i).finish();
}
}
activityStack.clear();
}
/**
* 返回到指定的activity
*
* @param cls
*/
public void returnToActivity(Class<?> cls) {
while (activityStack.size() != 0)
if (activityStack.peek().getClass() == cls) {
break;
} else {
finishActivity(activityStack.peek());
}
}
/**
* 是否已经打开指定的activity
* @param cls
* @return
*/
public boolean isOpenActivity(Class<?> cls) {
if (activityStack!=null){
for (int i = 0, size = activityStack.size(); i < size; i++) {
if (cls == activityStack.peek().getClass()) {
return true;
}
}
}
return false;
}
/**
* 退出应用程序
*
* @param context 上下文
* @param isBackground 是否开开启后台运行
*/
public void AppExit(Context context, Boolean isBackground) {
try {
finishAllActivity();
ActivityManager activityMgr = (ActivityManager) context
.getSystemService(Context.ACTIVITY_SERVICE);
activityMgr.restartPackage(context.getPackageName());
} catch (Exception e) {
} finally {
// 注意,如果您有后台程序运行,请不要支持此句子
if (!isBackground) {
System.exit(0);
}
}
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseActivity.java
================================================
package com.lvr.livecircle.base;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import com.lvr.livecircle.R;
import com.lvr.livecircle.app.AppManager;
import com.lvr.livecircle.utils.StatusBarSetting;
import com.lvr.livecircle.utils.ToastUitl;
import com.lvr.livecircle.widget.LoadingDialog;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* 基类
*/
public abstract class BaseActivity extends AppCompatActivity {
public Context mContext;
private Unbinder mUnbinder;
private int count;//记录开启进度条的情况 只能开一个
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
doBeforeSetcontentView();
setContentView(getLayoutId());
// 默认着色状态栏
SetStatusBarColor();
mUnbinder = ButterKnife.bind(this);
mContext = this;
this.initPresenter();
this.initView();
}
/**
* 设置layout前配置
*/
private void doBeforeSetcontentView() {
// 把actvity放到application栈中管理
AppManager.getAppManager().addActivity(this);
// 无标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
// 设置竖屏
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
/*********************
* 子类实现
*****************************/
//获取布局文件
public abstract int getLayoutId();
//简单页面无需mvp就不用管此方法即可,完美兼容各种实际场景的变通
public abstract void initPresenter();
//初始化view
public abstract void initView();
/**
* 着色状态栏(4.4以上系统有效)
*/
protected void SetStatusBarColor() {
StatusBarSetting.setColor(this, getResources().getColor(R.color.colorPrimary));
}
/**
* 着色状态栏(4.4以上系统有效)
*/
protected void SetStatusBarColor(int color) {
StatusBarSetting.setColor(this, color);
}
/**
* 沉浸状态栏(4.4以上系统有效)
*/
protected void SetTranslanteBar() {
StatusBarSetting.setTranslucent(this);
}
/**
* 通过Class跳转界面
**/
public void startActivity(Class<?> cls) {
startActivity(cls, null);
}
/**
* 通过Class跳转界面
**/
public void startActivityForResult(Class<?> cls, int requestCode) {
startActivityForResult(cls, null, requestCode);
}
/**
* 含有Bundle通过Class跳转界面
**/
public void startActivityForResult(Class<?> cls, Bundle bundle,
int requestCode) {
Intent intent = new Intent();
intent.setClass(this, cls);
if (bundle != null) {
intent.putExtras(bundle);
}
startActivityForResult(intent, requestCode);
}
/**
* 含有Bundle通过Class跳转界面
**/
public void startActivity(Class<?> cls, Bundle bundle) {
Intent intent = new Intent();
intent.setClass(this, cls);
if (bundle != null) {
intent.putExtras(bundle);
}
startActivity(intent);
}
/**
* 开启浮动加载进度条
*/
public void startProgressDialog() {
count++;
if(count==1){
LoadingDialog.showDialogForLoading(this);
}
}
/**
* 开启浮动加载进度条
*
* @param msg
*/
public void startProgressDialog(String msg) {
count++;
if(count==1){
LoadingDialog.showDialogForLoading(this, msg, true);
}
}
/**
* 停止浮动加载进度条
*/
public void stopProgressDialog() {
count--;
if(count==0){
LoadingDialog.cancelDialogForLoading();
}
}
/**
* 短暂显示Toast提示(来自String)
**/
public void showShortToast(String text) {
ToastUitl.showShort(text);
}
/**
* 短暂显示Toast提示(id)
**/
public void showShortToast(int resId) {
ToastUitl.showShort(resId);
}
/**
* 长时间显示Toast提示(来自res)
**/
public void showLongToast(int resId) {
ToastUitl.showLong(resId);
}
/**
* 长时间显示Toast提示(来自String)
**/
public void showLongToast(String text) {
ToastUitl.showLong(text);
}
/**
* 带图片的toast
*
* @param text
* @param res
*/
public void showToastWithImg(String text, int res) {
ToastUitl.showToastWithImg(text, res);
}
/**
* 网络访问错误提醒
*/
public void showNetErrorTip() {
ToastUitl.showToastWithImg(getText(R.string.net_error).toString(), R.drawable.ic_wifi_off);
}
public void showNetErrorTip(String error) {
ToastUitl.showToastWithImg(error, R.drawable.ic_wifi_off);
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
mUnbinder.unbind();
AppManager.getAppManager().finishActivity(this);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseApplication.java
================================================
package com.lvr.livecircle.base;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
/**
* APPLICATION
*/
public class BaseApplication extends Application {
private static BaseApplication baseApplication;
@Override
public void onCreate() {
super.onCreate();
baseApplication = this;
}
public static Context getAppContext() {
return baseApplication;
}
public static Resources getAppResources() {
return baseApplication.getResources();
}
@Override
public void onTerminate() {
super.onTerminate();
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragment.java
================================================
package com.lvr.livecircle.base;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.lvr.livecircle.utils.ToastUitl;
import com.lvr.livecircle.widget.LoadingDialog;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public abstract class BaseFragment extends Fragment {
protected View rootView;
private Unbinder mUnbinder;
private int count;//记录开启进度条的情况 只能开一个
//当前Fragment是否处于可见状态标志,防止因ViewPager的缓存机制而导致回调函数的触发
private boolean isFragmentVisible;
//是否是第一次开启网络加载
public boolean isFirst;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (rootView == null)
rootView = inflater.inflate(getLayoutResource(), container, false);
mUnbinder = ButterKnife.bind(this, rootView);
initView();
//可见,但是并没有加载过
if (isFragmentVisible && !isFirst) {
onFragmentVisibleChange(true);
}
return rootView;
}
//获取布局文件
protected abstract int getLayoutResource();
//初始化view
protected abstract void initView();
/**
* 通过Class跳转界面
**/
public void startActivity(Class<?> cls) {
startActivity(cls, null);
}
/**
* 通过Class跳转界面
**/
public void startActivityForResult(Class<?> cls, int requestCode) {
startActivityForResult(cls, null, requestCode);
}
/**
* 含有Bundle通过Class跳转界面
**/
public void startActivityForResult(Class<?> cls, Bundle bundle,
int requestCode) {
Intent intent = new Intent();
intent.setClass(getActivity(), cls);
if (bundle != null) {
intent.putExtras(bundle);
}
startActivityForResult(intent, requestCode);
}
/**
* 含有Bundle通过Class跳转界面
**/
public void startActivity(Class<?> cls, Bundle bundle) {
Intent intent = new Intent();
intent.setClass(getActivity(), cls);
if (bundle != null) {
intent.putExtras(bundle);
}
startActivity(intent);
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
isFragmentVisible = true;
}
if (rootView == null) {
return;
}
//可见,并且没有加载过
if (!isFirst&&isFragmentVisible) {
onFragmentVisibleChange(true);
return;
}
//由可见——>不可见 已经加载过
if (isFragmentVisible) {
onFragmentVisibleChange(false);
isFragmentVisible = false;
}
}
/**
* 开启加载进度条
*/
public void startProgressDialog() {
count++;
if (count == 1) {
LoadingDialog.showDialogForLoading(getActivity());
}
}
/**
* 开启加载进度条
*
* @param msg
*/
public void startProgressDialog(String msg) {
LoadingDialog.showDialogForLoading(getActivity(), msg, true);
}
/**
* 停止加载进度条
*/
public void stopProgressDialog() {
count--;
if (count == 0) {
LoadingDialog.cancelDialogForLoading();
}
}
/**
* 短暂显示Toast提示(来自String)
**/
public void showShortToast(String text) {
ToastUitl.showShort(text);
}
/**
* 短暂显示Toast提示(id)
**/
public void showShortToast(int resId) {
ToastUitl.showShort(resId);
}
/**
* 长时间显示Toast提示(来自res)
**/
public void showLongToast(int resId) {
ToastUitl.showLong(resId);
}
/**
* 长时间显示Toast提示(来自String)
**/
public void showLongToast(String text) {
ToastUitl.showLong(text);
}
public void showToastWithImg(String text, int res) {
ToastUitl.showToastWithImg(text, res);
}
/**
* 网络访问错误提醒
*/
public void showNetErrorTip() {
}
public void showNetErrorTip(String error) {
}
public void showLoading() {
}
public void stopLoading() {
}
@Override
public void onDestroyView() {
super.onDestroyView();
mUnbinder.unbind();
}
/**
* 当前fragment可见状态发生变化时会回调该方法
* 如果当前fragment是第一次加载,等待onCreateView后才会回调该方法,其它情况回调时机跟 {@link #setUserVisibleHint(boolean)}一致
* 在该回调方法中你可以做一些加载数据操作,甚至是控件的操作.
*
* @param isVisible true 不可见 -> 可见
* false 可见 -> 不可见
*/
protected void onFragmentVisibleChange(boolean isVisible) {
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragmentAdapter.java
================================================
package com.lvr.livecircle.base;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import com.lvr.livecircle.utils.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
public class BaseFragmentAdapter extends FragmentPagerAdapter {
List<Fragment> fragmentList = new ArrayList<Fragment>();
private List<String> mTitles;
public BaseFragmentAdapter(FragmentManager fm, List<Fragment> fragmentList) {
super(fm);
this.fragmentList = fragmentList;
}
public BaseFragmentAdapter(FragmentManager fm, List<Fragment> fragmentList, List<String> mTitles) {
super(fm);
this.fragmentList = fragmentList;
this.mTitles = mTitles;
}
@Override
public CharSequence getPageTitle(int position) {
return !CollectionUtils.isNullOrEmpty(mTitles) ? mTitles.get(position) : "";
}
@Override
public Fragment getItem(int position) {
return fragmentList.get(position);
}
@Override
public int getCount() {
return fragmentList.size();
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/ChannelBean.java
================================================
package com.lvr.livecircle.bean;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.List;
/**
* Created by lvr on 2017/2/14.
*/
//通知频道变换的Event类
public class ChannelBean {
public List<NewsChannelTable> mList;
public int fromPosition;
public int toPosition;
public ChannelBean(List<NewsChannelTable> list) {
mList = list;
}
public List<NewsChannelTable> getList() {
return mList;
}
public void setList(List<NewsChannelTable> list) {
mList = list;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/FabScrollBean.java
================================================
package com.lvr.livecircle.bean;
/**
* Created by lvr on 2017/2/12.
*/
public class FabScrollBean {
private String scrollMsg;
public int getPosition() {
return position;
}
public void setPosition(int position) {
this.position = position;
}
private int position;
public FabScrollBean(String scrollMsg,int position) {
this.scrollMsg = scrollMsg;
this.position = position;
}
public String getScrollMsg() {
return scrollMsg;
}
public void setScrollMsg(String scrollMsg) {
this.scrollMsg = scrollMsg;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/HeaderBean.java
================================================
package com.lvr.livecircle.bean;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.List;
/**
* Created by lvr on 2017/2/14.
*/
public class HeaderBean {
private List<NewsChannelTable> mList;
public HeaderBean(List<NewsChannelTable> list) {
mList = list;
}
public List<NewsChannelTable> getList() {
return mList;
}
public void setList(List<NewsChannelTable> list) {
mList = list;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/NewsInfo.java
================================================
package com.lvr.livecircle.bean;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.List;
/**
* Created by lvr on 2017/2/8.
*/
//使用GsonFormat插件 使用Parcelable插件
public class NewsInfo implements Parcelable {
/**
* postid : PHOT24589000100A
* hasCover : false
* hasHead : 1
* replyCount : 32056
* hasImg : 1
* digest :
* hasIcon : false
* docid : 9IG74V5H00963VRO_CCP0IVDUcaoruiupdateDoc
* title : 韩民众举"包青天"头像 抗议总统弹劾案
* order : 1
* priority : 354
* lmodify : 2017-02-08 16:14:08
* boardid : photoview_bbs
* ads : [{"title":"直击云南边境扫雷 地雷炮弹摆满地","tag":"photoset","imgsrc":"http://cms-bucket.nosdn.127.net/e4c85b6a0db74b139b0c40572181883a20170208163525.jpeg","subtitle":"","url":"00AP0001|2233612"},{"title":"特朗普任后首批被遣墨西哥移民回国","tag":"photoset","imgsrc":"http://cms-bucket.nosdn.127.net/40dd56cbd22043519fc7bdbb95cc954820170208164609.jpeg","subtitle":"","url":"00AO0001|2233614"},{"title":"巴西警察罢工引发骚乱 已致75人死亡","tag":"photoset","imgsrc":"http://cms-bucket.nosdn.127.net/0c27e0f72fab46c08c4399e6146cc4a120170208163826.jpeg","subtitle":"","url":"00AO0001|2233613"},{"title":"大圣驾车被交警拦下 车上坐一群\"妖怪\"","tag":"photoset","imgsrc":"http://cms-bucket.nosdn.127.net/376884a7cff14a95839f23a032c3f60620170208100814.jpeg","subtitle":"","url":"00AP0001|2233503"},{"title":"广东揭阳江中现观音像 村民打捞参拜","tag":"photoset","imgsrc":"http://cms-bucket.nosdn.127.net/f7fb6acf5e424a12aeaacb7b6192006320170208093602.jpeg","subtitle":"","url":"00AP0001|2233473"}]
* photosetID : 00AO0001|2233609
* imgsum : 4
* topic_background : http://img2.cache.netease.com/m/newsapp/reading/cover1/C1348646712614.jpg
* template : normal1
* votecount : 29790
* skipID : 00AO0001|2233609
* alias : Top News
* skipType : photoset
* cid : C1348646712614
* hasAD : 1
* imgextra : [{"imgsrc":"http://cms-bucket.nosdn.127.net/3e8167782a344c47886dd4b818274e3720170208161145.jpeg"},{"imgsrc":"http://cms-bucket.nosdn.127.net/1bef3f98431f4be780320ce58d7c68d920170208160645.jpeg"}]
* source : 网易原创
* ename : androidnews
* tname : 头条
* imgsrc : http://cms-bucket.nosdn.127.net/37148e8af39440be9b41606f72dc49d520170208161145.jpeg
* ptime : 2017-02-08 16:07:25
*/
private String postid;
private boolean hasCover;
private int hasHead;
private int replyCount;
private int hasImg;
private String digest;
private boolean hasIcon;
private String docid;
private String title;
private int order;
private int priority;
private String lmodify;
private String boardid;
private String photosetID;
private int imgsum;
private String topic_background;
private String template;
private int votecount;
private String skipID;
private String alias;
private String skipType;
private String cid;
private int hasAD;
private String source;
private String ename;
private String tname;
private String imgsrc;
private String ptime;
private List<AdsBean> ads;
private List<ImgextraBean> imgextra;
public String getPostid() {
return postid;
}
public void setPostid(String postid) {
this.postid = postid;
}
public boolean isHasCover() {
return hasCover;
}
public void setHasCover(boolean hasCover) {
this.hasCover = hasCover;
}
public int getHasHead() {
return hasHead;
}
public void setHasHead(int hasHead) {
this.hasHead = hasHead;
}
public int getReplyCount() {
return replyCount;
}
public void setReplyCount(int replyCount) {
this.replyCount = replyCount;
}
public int getHasImg() {
return hasImg;
}
public void setHasImg(int hasImg) {
this.hasImg = hasImg;
}
public String getDigest() {
return digest;
}
public void setDigest(String digest) {
this.digest = digest;
}
public boolean isHasIcon() {
return hasIcon;
}
public void setHasIcon(boolean hasIcon) {
this.hasIcon = hasIcon;
}
public String getDocid() {
return docid;
}
public void setDocid(String docid) {
this.docid = docid;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getOrder() {
return order;
}
public void setOrder(int order) {
this.order = order;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public String getLmodify() {
return lmodify;
}
public void setLmodify(String lmodify) {
this.lmodify = lmodify;
}
public String getBoardid() {
return boardid;
}
public void setBoardid(String boardid) {
this.boardid = boardid;
}
public String getPhotosetID() {
return photosetID;
}
public void setPhotosetID(String photosetID) {
this.photosetID = photosetID;
}
public int getImgsum() {
return imgsum;
}
public void setImgsum(int imgsum) {
this.imgsum = imgsum;
}
public String getTopic_background() {
return topic_background;
}
public void setTopic_background(String topic_background) {
this.topic_background = topic_background;
}
public String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
public int getVotecount() {
return votecount;
}
public void setVotecount(int votecount) {
this.votecount = votecount;
}
public String getSkipID() {
return skipID;
}
public void setSkipID(String skipID) {
this.skipID = skipID;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getSkipType() {
return skipType;
}
public void setSkipType(String skipType) {
this.skipType = skipType;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
public int getHasAD() {
return hasAD;
}
public void setHasAD(int hasAD) {
this.hasAD = hasAD;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getEname() {
return ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getImgsrc() {
return imgsrc;
}
public void setImgsrc(String imgsrc) {
this.imgsrc = imgsrc;
}
public String getPtime() {
return ptime;
}
public void setPtime(String ptime) {
this.ptime = ptime;
}
public List<AdsBean> getAds() {
return ads;
}
public void setAds(List<AdsBean> ads) {
this.ads = ads;
}
public List<ImgextraBean> getImgextra() {
return imgextra;
}
public void setImgextra(List<ImgextraBean> imgextra) {
this.imgextra = imgextra;
}
public static class AdsBean {
/**
* title : 直击云南边境扫雷 地雷炮弹摆满地
* tag : photoset
* imgsrc : http://cms-bucket.nosdn.127.net/e4c85b6a0db74b139b0c40572181883a20170208163525.jpeg
* subtitle :
* url : 00AP0001|2233612
*/
private String title;
private String tag;
private String imgsrc;
private String subtitle;
private String url;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public String getImgsrc() {
return imgsrc;
}
public void setImgsrc(String imgsrc) {
this.imgsrc = imgsrc;
}
public String getSubtitle() {
return subtitle;
}
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
public static class ImgextraBean {
/**
* imgsrc : http://cms-bucket.nosdn.127.net/3e8167782a344c47886dd4b818274e3720170208161145.jpeg
*/
private String imgsrc;
public String getImgsrc() {
return imgsrc;
}
public void setImgsrc(String imgsrc) {
this.imgsrc = imgsrc;
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.postid);
dest.writeByte(this.hasCover ? (byte) 1 : (byte) 0);
dest.writeInt(this.hasHead);
dest.writeInt(this.replyCount);
dest.writeInt(this.hasImg);
dest.writeString(this.digest);
dest.writeByte(this.hasIcon ? (byte) 1 : (byte) 0);
dest.writeString(this.docid);
dest.writeString(this.title);
dest.writeInt(this.order);
dest.writeInt(this.priority);
dest.writeString(this.lmodify);
dest.writeString(this.boardid);
dest.writeString(this.photosetID);
dest.writeInt(this.imgsum);
dest.writeString(this.topic_background);
dest.writeString(this.template);
dest.writeInt(this.votecount);
dest.writeString(this.skipID);
dest.writeString(this.alias);
dest.writeString(this.skipType);
dest.writeString(this.cid);
dest.writeInt(this.hasAD);
dest.writeString(this.source);
dest.writeString(this.ename);
dest.writeString(this.tname);
dest.writeString(this.imgsrc);
dest.writeString(this.ptime);
dest.writeList(this.ads);
dest.writeList(this.imgextra);
}
public NewsInfo() {
}
protected NewsInfo(Parcel in) {
this.postid = in.readString();
this.hasCover = in.readByte() != 0;
this.hasHead = in.readInt();
this.replyCount = in.readInt();
this.hasImg = in.readInt();
this.digest = in.readString();
this.hasIcon = in.readByte() != 0;
this.docid = in.readString();
this.title = in.readString();
this.order = in.readInt();
this.priority = in.readInt();
this.lmodify = in.readString();
this.boardid = in.readString();
this.photosetID = in.readString();
this.imgsum = in.readInt();
this.topic_background = in.readString();
this.template = in.readString();
this.votecount = in.readInt();
this.skipID = in.readString();
this.alias = in.readString();
this.skipType = in.readString();
this.cid = in.readString();
this.hasAD = in.readInt();
this.source = in.readString();
this.ename = in.readString();
this.tname = in.readString();
this.imgsrc = in.readString();
this.ptime = in.readString();
this.ads = new ArrayList<AdsBean>();
in.readList(this.ads, AdsBean.class.getClassLoader());
this.imgextra = new ArrayList<ImgextraBean>();
in.readList(this.imgextra, ImgextraBean.class.getClassLoader());
}
public static final Parcelable.Creator<NewsInfo> CREATOR = new Parcelable.Creator<NewsInfo>() {
@Override
public NewsInfo createFromParcel(Parcel source) {
return new NewsInfo(source);
}
@Override
public NewsInfo[] newArray(int size) {
return new NewsInfo[size];
}
};
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseApiService.java
================================================
package com.lvr.livecircle.client;
import java.util.Map;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
public interface BaseApiService<T> {
public static final String Base_URL = "http://ip.taobao.com/";
@GET("{url}")
Observable<BaseResponse<IpResult>> executeGet(
@Path("url") String url,
@QueryMap Map<String, String> maps
);
@POST("{url}")
Observable<BaseResponse<IpResult>> executePost(
@Path("url") String url,
@QueryMap Map<String, String> maps);
@POST("{url}")
Observable<ResponseBody> json(
@Path("url") String url,
@Body RequestBody jsonStr);
@Multipart
@POST("{url}")
Observable<ResponseBody> upLoadFile(
@Path("url") String url,
@Part("image\"; filename=\"image.jpg") RequestBody requestBody);
@POST("{url}")
Observable<ResponseBody> uploadFiles(
@Path("url") String url,
@Part("userName") String description,
@PartMap() Map<String, RequestBody> maps);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseInterceptor.java
================================================
package com.lvr.livecircle.client;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public class BaseInterceptor implements Interceptor {
private Map<String, String> headers;
public BaseInterceptor(Map<String, String> headers) {
this.headers = headers;
}
@Override
public Response intercept(Chain chain) throws IOException {
Request.Builder builder = chain.request()
.newBuilder();
if (headers != null && headers.size() > 0) {
Set<String> keys = headers.keySet();
for (String headerKey : keys) {
builder.addHeader(headerKey, headers.get(headerKey)).build();
}
}
return chain.proceed(builder.build());
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseObserver.java
================================================
package com.lvr.livecircle.client;
import android.content.Context;
import android.util.Log;
import android.widget.Toast;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
public abstract class BaseObserver<T> implements Observer<T> {
private Context context;
public BaseObserver(Context context) {
this.context = context;
}
@Override
public void onError(Throwable e) {
Log.e("lvr", e.getMessage());
// todo error somthing
if(e instanceof ExceptionHandle.ResponeThrowable){
onError((ExceptionHandle.ResponeThrowable)e);
} else {
onError(new ExceptionHandle.ResponeThrowable(e, ExceptionHandle.ERROR.UNKNOWN));
}
}
@Override
public void onSubscribe(Disposable d) {
Toast.makeText(context, "建立连接", Toast.LENGTH_SHORT).show();
//可以弹出Dialog 提示正在加载
showDialog();
}
protected abstract void hideDialog();
protected abstract void showDialog();
@Override
public void onComplete() {
Toast.makeText(context, "请求完毕", Toast.LENGTH_SHORT).show();
//可以取消Dialog 加载完毕
hideDialog();
}
public abstract void onError(ExceptionHandle.ResponeThrowable e);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseResponse.java
================================================
package com.lvr.livecircle.client;
public class BaseResponse<T> {
private int code;
private String msg;
private T data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public boolean isOk() {
return code == 0;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/CaheInterceptor.java
================================================
package com.lvr.livecircle.client;
import android.content.Context;
import android.util.Log;
import java.io.IOException;
import okhttp3.CacheControl;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
public class CaheInterceptor implements Interceptor {
private Context context;
public CaheInterceptor(Context context) {
this.context = context;
}
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
if (NetworkUtil.isNetworkAvailable(context)) {
Response response = chain.proceed(request);
// read from cache for 60 s
int maxAge = 60;
String cacheControl = request.cacheControl().toString();
Log.e("CacheInterceptor", "6s load cahe" + cacheControl);
return response.newBuilder()
.removeHeader("Pragma")
.removeHeader("Cache-Control")
.header("Cache-Control", "public, max-age=" + maxAge)
.build();
} else {
Log.e("CacheInterceptor", " no network load cahe");
request = request.newBuilder()
.cacheControl(CacheControl.FORCE_CACHE)
.build();
Response response = chain.proceed(request);
//set cahe times is 3 days
int maxStale = 60 * 60 * 24 * 3;
return response.newBuilder()
.removeHeader("Pragma")
.removeHeader("Cache-Control")
.header("Cache-Control", "public, only-if-cached, max-stale=" + maxStale)
.build();
}
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/ExceptionHandle.java
================================================
package com.lvr.livecircle.client;
import android.net.ParseException;
import com.google.gson.JsonParseException;
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
import org.apache.http.conn.ConnectTimeoutException;
import org.json.JSONException;
import java.net.ConnectException;
public class ExceptionHandle {
private static final int UNAUTHORIZED = 401;
private static final int FORBIDDEN = 403;
private static final int NOT_FOUND = 404;
private static final int REQUEST_TIMEOUT = 408;
private static final int INTERNAL_SERVER_ERROR = 500;
private static final int BAD_GATEWAY = 502;
private static final int SERVICE_UNAVAILABLE = 503;
private static final int GATEWAY_TIMEOUT = 504;
public static ResponeThrowable handleException(Throwable e) {
ResponeThrowable ex;
if (e instanceof HttpException) {
HttpException httpException = (HttpException) e;
ex = new ResponeThrowable(e, ERROR.HTTP_ERROR);
switch (httpException.code()) {
case UNAUTHORIZED:
case FORBIDDEN:
case NOT_FOUND:
case REQUEST_TIMEOUT:
case GATEWAY_TIMEOUT:
case INTERNAL_SERVER_ERROR:
case BAD_GATEWAY:
case SERVICE_UNAVAILABLE:
default:
ex.message = "网络错误";
break;
}
return ex;
} else if (e instanceof ServerException) {
ServerException resultException = (ServerException) e;
ex = new ResponeThrowable(resultException, resultException.code);
ex.message = resultException.message;
return ex;
} else if (e instanceof JsonParseException
|| e instanceof JSONException
|| e instanceof ParseException) {
ex = new ResponeThrowable(e, ERROR.PARSE_ERROR);
ex.message = "解析错误";
return ex;
} else if (e instanceof ConnectException) {
ex = new ResponeThrowable(e, ERROR.NETWORD_ERROR);
ex.message = "连接失败";
return ex;
} else if (e instanceof javax.net.ssl.SSLHandshakeException) {
ex = new ResponeThrowable(e, ERROR.SSL_ERROR);
ex.message = "证书验证失败";
return ex;
} else if (e instanceof ConnectTimeoutException){
ex = new ResponeThrowable(e, ERROR.TIMEOUT_ERROR);
ex.message = "连接超时";
return ex;
} else if (e instanceof java.net.SocketTimeoutException) {
ex = new ResponeThrowable(e, ERROR.TIMEOUT_ERROR);
ex.message = "连接超时";
return ex;
}
else {
ex = new ResponeThrowable(e, ERROR.UNKNOWN);
ex.message = "未知错误";
return ex;
}
}
/**
* 约定异常
*/
class ERROR {
/**
* 未知错误
*/
public static final int UNKNOWN = 1000;
/**
* 解析错误
*/
public static final int PARSE_ERROR = 1001;
/**
* 网络错误
*/
public static final int NETWORD_ERROR = 1002;
/**
* 协议出错
*/
public static final int HTTP_ERROR = 1003;
/**
* 证书出错
*/
public static final int SSL_ERROR = 1005;
/**
* 连接超时
*/
public static final int TIMEOUT_ERROR = 1006;
}
public static class ResponeThrowable extends Exception {
public int code;
public String message;
public ResponeThrowable(Throwable throwable, int code) {
super(throwable);
this.code = code;
}
}
public class ServerException extends RuntimeException {
public int code;
public String message;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/IpResult.java
================================================
package com.lvr.livecircle.client;
public class IpResult {
private String country;
private String country_id;
private String area;
private String area_id;
private String region;
private String region_id;
private String city;
private String city_id;
private String county;
private String county_id;
private String isp;
private String isp_id;
private String ip;
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getCountry_id() {
return country_id;
}
public void setCountry_id(String country_id) {
this.country_id = country_id;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getArea_id() {
return area_id;
}
public void setArea_id(String area_id) {
this.area_id = area_id;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getRegion_id() {
return region_id;
}
public void setRegion_id(String region_id) {
this.region_id = region_id;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCity_id() {
return city_id;
}
public void setCity_id(String city_id) {
this.city_id = city_id;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public String getCounty_id() {
return county_id;
}
public void setCounty_id(String county_id) {
this.county_id = county_id;
}
public String getIsp() {
return isp;
}
public void setIsp(String isp) {
this.isp = isp;
}
public String getIsp_id() {
return isp_id;
}
public void setIsp_id(String isp_id) {
this.isp_id = isp_id;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
@Override
public String toString() {
return "IpResult{" +
"country='" + country + '\'' +
", country_id='" + country_id + '\'' +
", area='" + area + '\'' +
", area_id='" + area_id + '\'' +
", region='" + region + '\'' +
", region_id='" + region_id + '\'' +
", city='" + city + '\'' +
", city_id='" + city_id + '\'' +
", county='" + county + '\'' +
", county_id='" + county_id + '\'' +
", isp='" + isp + '\'' +
", isp_id='" + isp_id + '\'' +
", ip='" + ip + '\'' +
'}';
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/NetworkUtil.java
================================================
package com.lvr.livecircle.client;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.URL;
import java.util.Enumeration;
public class NetworkUtil {
public static int NET_CNNT_BAIDU_OK = 1; // NetworkAvailable
public static int NET_CNNT_BAIDU_TIMEOUT = 2; // no NetworkAvailable
public static int NET_NOT_PREPARE = 3; // Net no ready
public static int NET_ERROR = 4; //net error
private static int TIMEOUT = 3000; // TIMEOUT
/**
* check NetworkAvailable
* @param context
* @return
*/
public static boolean isNetworkAvailable(Context context) {
ConnectivityManager manager = (ConnectivityManager) context.getApplicationContext().getSystemService(
Context.CONNECTIVITY_SERVICE);
if (null == manager)
return false;
NetworkInfo info = manager.getActiveNetworkInfo();
if (null == info || !info.isAvailable())
return false;
return true;
}
/**
* getLocalIpAddress
* @return
*/
public static String getLocalIpAddress() {
String ret = "";
try {
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
NetworkInterface intf = en.nextElement();
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress()) {
ret = inetAddress.getHostAddress().toString();
}
}
}
} catch (SocketException ex) {
ex.printStackTrace();
}
return ret;
}
/**
* 返回当前网络状态
*
* @param context
* @return
*/
public static int getNetState(Context context) {
try {
ConnectivityManager connectivity = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivity != null) {
NetworkInfo networkinfo = connectivity.getActiveNetworkInfo();
if (networkinfo != null) {
if (networkinfo.isAvailable() && networkinfo.isConnected()) {
if (!connectionNetwork())
return NET_CNNT_BAIDU_TIMEOUT;
else
return NET_CNNT_BAIDU_OK;
} else {
return NET_NOT_PREPARE;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return NET_ERROR;
}
/**
*ping "http://www.baidu.com"
* @return
*/
static private boolean connectionNetwork() {
boolean result = false;
HttpURLConnection httpUrl = null;
try {
httpUrl = (HttpURLConnection) new URL("http://www.baidu.com")
.openConnection();
httpUrl.setConnectTimeout(TIMEOUT);
httpUrl.connect();
result = true;
} catch (IOException e) {
} finally {
if (null != httpUrl) {
httpUrl.disconnect();
}
httpUrl = null;
}
return result;
}
/**
* check is3G
* @param context
* @return boolean
*/
public static boolean is3G(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetInfo != null
&& activeNetInfo.getType() == ConnectivityManager.TYPE_MOBILE) {
return true;
}
return false;
}
/**
* isWifi
* @param context
* @return boolean
*/
public static boolean isWifi(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetInfo != null
&& activeNetInfo.getType() == ConnectivityManager.TYPE_WIFI) {
return true;
}
return false;
}
/**
* is2G
* @param context
* @return boolean
*/
public static boolean is2G(Context context) {
ConnectivityManager connectivityManager = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetInfo != null
&& (activeNetInfo.getSubtype() == TelephonyManager.NETWORK_TYPE_EDGE
|| activeNetInfo.getSubtype() == TelephonyManager.NETWORK_TYPE_GPRS || activeNetInfo
.getSubtype() == TelephonyManager.NETWORK_TYPE_CDMA)) {
return true;
}
return false;
}
/**
* is wifi on
*/
public static boolean isWifiEnabled(Context context) {
ConnectivityManager mgrConn = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
TelephonyManager mgrTel = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
return ((mgrConn.getActiveNetworkInfo() != null && mgrConn
.getActiveNetworkInfo().getState() == NetworkInfo.State.CONNECTED) || mgrTel
.getNetworkType() == TelephonyManager.NETWORK_TYPE_UMTS);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/RetrofitClient.java
================================================
package com.lvr.livecircle.client;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import java.io.File;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* RetrofitClient
*/
public class RetrofitClient {
private static final int DEFAULT_TIMEOUT = 20;
private BaseApiService apiService;
private static OkHttpClient okHttpClient;
public static String baseUrl = BaseApiService.Base_URL;
private static Context mContext;
private static RetrofitClient sNewInstance;
private static ErrorTransformer transformer = new ErrorTransformer();
private static Retrofit retrofit;
private Cache cache = null;
private File httpCacheDirectory;
private static Retrofit.Builder builder =
new Retrofit.Builder()
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.baseUrl(baseUrl);
private static OkHttpClient.Builder httpClient =
new OkHttpClient.Builder()
.addNetworkInterceptor(
new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.HEADERS))
.connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS);
private static Class<? extends Class> aClass;
//默认baseUrl的单例
private static class SingletonHolder {
private static RetrofitClient INSTANCE = new RetrofitClient(
mContext);
}
public static RetrofitClient getInstance(Context context) {
if (context != null) {
mContext = context;
}
return SingletonHolder.INSTANCE;
}
//自己提供url
public static RetrofitClient getInstance(Context context, String url) {
if (context != null) {
mContext = context;
}
return new RetrofitClient(context, url);
}
//不仅有url还有headers
public static RetrofitClient getInstance(Context context, String url, Map<String, String> headers) {
if (context != null) {
mContext = context;
}
return new RetrofitClient(context, url, headers);
}
private RetrofitClient() {
}
private RetrofitClient(Context context) {
this(context, baseUrl, null);
}
private RetrofitClient(Context context, String url) {
this(context, url, null);
}
private RetrofitClient(Context context, String url, Map<String, String> headers) {
//url为空,则默认使用baseUrl
if (TextUtils.isEmpty(url)) {
url = baseUrl;
}
//缓存地址
if (httpCacheDirectory == null) {
httpCacheDirectory = new File(mContext.getCacheDir(), "app_cache");
}
try {
if (cache == null) {
cache = new Cache(httpCacheDirectory, 10 * 1024 * 1024);
}
} catch (Exception e) {
Log.e("OKHttp", "Could not create http cache", e);
}
//okhttp创建了
okHttpClient = new OkHttpClient.Builder()
.addNetworkInterceptor(
new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
.cache(cache)
.addInterceptor(new BaseInterceptor(headers))
.addInterceptor(new CaheInterceptor(context))
.addNetworkInterceptor(new CaheInterceptor(context))
.connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)
.writeTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS)
.build();
//retrofit创建了
retrofit = new Retrofit.Builder()
.client(okHttpClient)
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.baseUrl(url)
.build();
}
public void get(String url, Map parameters, Observer<?> observer) {
apiService.executeGet(url, parameters)
.compose(schedulersTransformer)
.compose(transformer)
.subscribe(observer);
}
public void post(String url, Map<String, String> parameters, Observer<?> observer) {
apiService.executePost(url, parameters)
.compose(schedulersTransformer)
.compose(transformer)
.subscribe(observer);
}
public void json(String url, RequestBody jsonStr, Observer<ResponseBody> observer) {
apiService.json(url, jsonStr)
.compose(schedulersTransformer)
.compose(transformer)
.subscribe(observer);
}
public void upload(String url, RequestBody requestBody, Observer<ResponseBody> observer) {
apiService.upLoadFile(url, requestBody)
.compose(schedulersTransformer)
.compose(transformer)
.subscribe(observer);
}
//处理线程调度的变换
public static ObservableTransformer schedulersTransformer = new ObservableTransformer() {
@Override
public ObservableSource apply(Observable upstream) {
return ((Observable) upstream).subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
};
//处理错误的变换
private static class ErrorTransformer<T> implements ObservableTransformer{
@Override
public ObservableSource apply(Observable upstream) {
//onErrorResumeNext当发生错误的时候,由另外一个Observable来代替当前的Observable并继续发射数据
return (Observable<T>) upstream.map(new HandleFuc<T>()).onErrorResumeNext(new HttpResponseFunc<T>());
}
}
public static class HttpResponseFunc<T> implements Function<Throwable, Observable<T>> {
@Override
public Observable<T> apply(Throwable throwable) throws Exception {
return Observable.error(ExceptionHandle.handleException(throwable));
}
}
public static class HandleFuc<T> implements Function<BaseResponse<T>, T> {
@Override
public T apply(BaseResponse<T> response) throws Exception {
//response中code码不会0 出现错误
if (!response.isOk())
throw new RuntimeException(response.getCode() + "" + response.getMsg() != null ? response.getMsg() : "");
return response.getData();
}
}
/**
* 创建默认url的api类
* @return ApiManager
*/
public RetrofitClient createBaseApi() {
apiService = create(BaseApiService.class);
return this;
}
/**
* create you ApiService
* Create an implementation of the API endpoints defined by the {@code service} interface.
*/
public <T> T create(final Class<T> service) {
if (service == null) {
throw new RuntimeException("Api service is null!");
}
return retrofit.create(service);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/RxDisposeManager.java
================================================
package com.lvr.livecircle.client;
import android.support.v4.util.ArrayMap;
import java.util.Set;
import io.reactivex.disposables.Disposable;
/**
* Created by lvr on 2017/2/9.
*/
public class RxDisposeManager {
private static RxDisposeManager sInstance = null;
private ArrayMap<Object, Disposable> maps;
public static RxDisposeManager get() {
if (sInstance == null) {
synchronized (RxDisposeManager.class) {
if (sInstance == null) {
sInstance = new RxDisposeManager();
}
}
}
return sInstance;
}
private RxDisposeManager() {
maps = new ArrayMap<>();
}
public void add(Object tag, Disposable disposable) {
maps.put(tag, disposable);
}
public void remove(Object tag) {
if (!maps.isEmpty()) {
maps.remove(tag);
}
}
public void removeAll() {
if (!maps.isEmpty()) {
maps.clear();
}
}
public void cancel(Object tag) {
if (maps.isEmpty()) {
return;
}
if (maps.get(tag) == null) {
return;
}
if (!maps.get(tag).isDisposed()) {
maps.get(tag).dispose();
maps.remove(tag);
}
}
public void cancelAll() {
if (maps.isEmpty()) {
return;
}
Set<Object> keys = maps.keySet();
for (Object apiKey : keys) {
cancel(apiKey);
}
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/find/FindFragment.java
================================================
package com.lvr.livecircle.find;
import com.lvr.livecircle.R;
import com.lvr.livecircle.base.BaseFragment;
/**
* Created by lvr on 2017/2/6.
*/
public class FindFragment extends BaseFragment {
@Override
protected int getLayoutResource() {
return R.layout.fragment_find;
}
@Override
protected void initView() {
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/home/MainActivity.java
================================================
package com.lvr.livecircle.home;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.NavigationView;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;
import android.widget.ImageView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.adapter.HomeViewPagerAdapter;
import com.lvr.livecircle.base.BaseActivity;
import com.lvr.livecircle.bean.FabScrollBean;
import com.lvr.livecircle.find.FindFragment;
import com.lvr.livecircle.meitu.MeiTuFragment;
import com.lvr.livecircle.music.MusicFragment;
import com.lvr.livecircle.nearby.NearByFragment;
import com.lvr.livecircle.news.fragment.NewsFragment;
import com.lvr.livecircle.recommend.RecommendFragment;
import com.lvr.livecircle.utils.StatusBarSetting;
import com.lvr.livecircle.video.VideoFragment;
import java.util.ArrayList;
import java.util.Arrays;
import butterknife.BindView;
import de.greenrobot.event.EventBus;
public class MainActivity extends BaseActivity {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.navigation)
NavigationView mAmNv;
@BindView(R.id.drawer_layout)
DrawerLayout mAmDl;
@BindView(R.id.tabs)
TabLayout mTabs;
@BindView(R.id.vp_moudle)
ViewPager mVpMoudle;
@BindView(R.id.fab)
FloatingActionButton mFab;
private View mView_nav;
private ImageView mIv_photo;
private String[] mMoudleName = {"推荐", "新闻", "音乐", "美图", "附近", "视频", "发现"};
private ArrayList<Fragment> mFragmentList = new ArrayList<Fragment>();
private NewsFragment mNewsFragment;
private RecommendFragment mRecommendFragment;
private MusicFragment mMusicFragment;
private MeiTuFragment mMeiTuFragment;
private NearByFragment mNearByFragment;
private VideoFragment mVideoFragment;
private FindFragment mFindFragment;
private HomeViewPagerAdapter mAdapter;
@Override
public int getLayoutId() {
return R.layout.activity_main;
}
@Override
public void initPresenter() {
}
@Override
public void initView() {
StatusBarSetting.setColorForDrawerLayout(this, mAmDl, getResources().getColor(R.color.colorPrimary), StatusBarSetting.DEFAULT_STATUS_BAR_ALPHA);
setToolBar();
setNavigationView();
mFab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EventBus.getDefault().post(new FabScrollBean("滑动到顶端",mTabs.getSelectedTabPosition()));
}
});
mTabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
int position = tab.getPosition();
if(position==1||position==3){
mFab.setVisibility(View.VISIBLE);
}else{
mFab.setVisibility(View.GONE);
}
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//初始化frament
initFragment(savedInstanceState);
setViewPager();
}
/**
* 填充ViewPager内容
*/
private void setViewPager() {
mAdapter = new HomeViewPagerAdapter(getSupportFragmentManager(), mFragmentList, Arrays.asList(mMoudleName));
mVpMoudle.setAdapter(mAdapter);
mTabs.setupWithViewPager(mVpMoudle);
mTabs.setTabTextColors(getResources().getColor(R.color.white), getResources().getColor(R.color.black));
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
FragmentManager manager = getSupportFragmentManager();
if (mNewsFragment.isAdded()) {
manager.putFragment(outState, "NewsFragment", mNewsFragment);
}
if (mFindFragment.isAdded()) {
manager.putFragment(outState, "FindFragment", mFindFragment);
}
if (mVideoFragment.isAdded()) {
manager.putFragment(outState, "VideoFragment", mVideoFragment);
}
if (mNearByFragment.isAdded()) {
manager.putFragment(outState, "NearByFragment", mNearByFragment);
}
if (mMeiTuFragment.isAdded()) {
manager.putFragment(outState, "MeiTuFragment", mMeiTuFragment);
}
if (mMusicFragment.isAdded()) {
manager.putFragment(outState, "MusicFragment", mMusicFragment);
}
if (mRecommendFragment.isAdded()) {
manager.putFragment(outState, "RecommendFragment", mRecommendFragment);
}
}
/**
* 初始化fragment的记忆状态
*
* @param savedInstanceState
*/
private void initFragment(Bundle savedInstanceState) {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
if (savedInstanceState != null) {
mNewsFragment = (NewsFragment) getSupportFragmentManager().getFragment(savedInstanceState, "NewsFragment");
mRecommendFragment = (RecommendFragment) getSupportFragmentManager().getFragment(savedInstanceState, "RecommendFragment");
mFindFragment = (FindFragment) getSupportFragmentManager().getFragment(savedInstanceState, "FindFragment");
mVideoFragment = (VideoFragment) getSupportFragmentManager().getFragment(savedInstanceState, "VideoFragment");
mNearByFragment = (NearByFragment) getSupportFragmentManager().getFragment(savedInstanceState, "NearByFragment");
mMeiTuFragment = (MeiTuFragment) getSupportFragmentManager().getFragment(savedInstanceState, "MeiTuFragment");
mMusicFragment = (MusicFragment) getSupportFragmentManager().getFragment(savedInstanceState, "MusicFragment");
} else {
mNewsFragment = new NewsFragment();
mRecommendFragment = new RecommendFragment();
mFindFragment = new FindFragment();
mVideoFragment = new VideoFragment();
mNearByFragment = new NearByFragment();
mMeiTuFragment = new MeiTuFragment();
mMusicFragment = new MusicFragment();
}
mFragmentList.add(mRecommendFragment);
mFragmentList.add(mNewsFragment);
mFragmentList.add(mMusicFragment);
mFragmentList.add(mMeiTuFragment);
mFragmentList.add(mNearByFragment);
mFragmentList.add(mVideoFragment);
mFragmentList.add(mFindFragment);
}
/**
* 设置导航页信息
*/
private void setNavigationView() {
//NavigationView初始化
mAmNv.setItemIconTintList(null);
View headerView = mAmNv.getHeaderView(0);
mIv_photo = (ImageView) headerView.findViewById(R.id.iv_user_photo);
}
/**
* 设置状态栏
*/
private void setToolBar() {
setSupportActionBar(mToolbar);
ActionBar actionBar = getSupportActionBar();
//菜单按钮可用
actionBar.setHomeButtonEnabled(true);
//回退按钮可用
actionBar.setDisplayHomeAsUpEnabled(true);
//将drawlayout与toolbar绑定在一起
ActionBarDrawerToggle abdt = new ActionBarDrawerToggle(this, mAmDl, mToolbar, R.string.app_name, R.string.app_name);
abdt.syncState();//初始化状态
//设置drawlayout的监听事件 打开/关闭
mAmDl.setDrawerListener(abdt);
//actionbar中的内容进行初始化
mToolbar.setTitle("Live圈");//设置标题
mToolbar.setTitleTextColor(getResources().getColor(R.color.white));
}
/**
* 入口
*
* @param activity
*/
public static void startAction(Activity activity) {
Intent intent = new Intent(activity, MainActivity.class);
activity.startActivity(intent);
activity.overridePendingTransition(R.anim.fade_in,
R.anim.fade_out);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_toolabr, menu);
return true;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/home/SplashActivity.java
================================================
package com.lvr.livecircle.home;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.view.animation.AccelerateInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.base.BaseActivity;
import butterknife.BindView;
/**
* Created by lvr on 2017/2/6.
*/
public class SplashActivity extends BaseActivity {
@BindView(R.id.iv_logo)
ImageView mIvLogo;
@BindView(R.id.tv_name)
TextView mTvName;
@Override
public int getLayoutId() {
return R.layout.activty_splash;
}
@Override
public void initPresenter() {
}
@Override
public void initView() {
SetTranslanteBar();
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 0.3f, 1f);
PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat("scaleX", 0.3f, 1f);
PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat("scaleY", 0.3f, 1f);
ObjectAnimator objectAnimator1 = ObjectAnimator.ofPropertyValuesHolder(mTvName, alpha, scaleX, scaleY);
ObjectAnimator objectAnimator2 = ObjectAnimator.ofPropertyValuesHolder(mIvLogo, alpha, scaleX, scaleY);
AnimatorSet animatorSet = new AnimatorSet();
animatorSet.playTogether(objectAnimator1, objectAnimator2);
animatorSet.setInterpolator(new AccelerateInterpolator());
animatorSet.setDuration(2000);
animatorSet.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
MainActivity.startAction(SplashActivity.this);
finish();
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationRepeat(Animator animator) {
}
});
animatorSet.start();
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/MeiTuFragment.java
================================================
package com.lvr.livecircle.meitu;
import android.content.Context;
import android.support.v7.widget.StaggeredGridLayoutManager;
import com.aspsine.irecyclerview.IRecyclerView;
import com.aspsine.irecyclerview.OnLoadMoreListener;
import com.aspsine.irecyclerview.OnRefreshListener;
import com.lvr.livecircle.R;
import com.lvr.livecircle.adapter.PhotoListAdapter;
import com.lvr.livecircle.base.BaseFragment;
import com.lvr.livecircle.bean.FabScrollBean;
import com.lvr.livecircle.client.RxDisposeManager;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import com.lvr.livecircle.meitu.presenter.impl.PhotoPresenterImpl;
import com.lvr.livecircle.meitu.view.PhotoView;
import com.lvr.livecircle.widget.LoadMoreFooterView;
import com.lvr.livecircle.widget.LoadingDialog;
import java.util.List;
import butterknife.BindView;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
/**
* Created by lvr on 2017/2/6.
*/
public class MeiTuFragment extends BaseFragment implements PhotoView, OnRefreshListener, OnLoadMoreListener {
@BindView(R.id.recyclerView)
IRecyclerView mRecyclerView;
private Context mContext;
private static int SIZE = 20;
private int mStartPage = 1;
private PhotoPresenterImpl mPresenter;
private PhotoListAdapter mAdapter;
private LoadMoreFooterView mFooterView;
@Override
protected int getLayoutResource() {
return R.layout.fragment_meitu;
}
@Override
protected void onFragmentVisibleChange(boolean isVisible) {
if(isVisible){
//可见,并且是第一次加载
mPresenter.requestPhotoList(SIZE,mStartPage);
LoadingDialog.showDialogForLoading(getActivity());
}else{
//取消加载
RxDisposeManager.get().cancel("photoList");
LoadingDialog.cancelDialogForLoading();
}
}
@Override
protected void initView() {
mContext = getActivity();
mPresenter = new PhotoPresenterImpl(this);
StaggeredGridLayoutManager manager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
manager.setItemPrefetchEnabled(false);
mRecyclerView.setLayoutManager(manager);
mRecyclerView.setOnRefreshListener(this);
mRecyclerView.setOnLoadMoreListener(this);
mFooterView = (LoadMoreFooterView) mRecyclerView.getLoadMoreFooterView();
if (!EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().register(this);
}
}
@Subscribe
public void onFabScrollEvent(FabScrollBean event) {
if(event.getPosition()==3){
mRecyclerView.smoothScrollToPosition(0);
}
}
@Override
public void returnPhotoList(List<PhotoGirl> photoGirlList) {
if (!isFirst) {
isFirst = true;
LoadingDialog.cancelDialogForLoading();
mAdapter = new PhotoListAdapter(mContext, photoGirlList);
mRecyclerView.setIAdapter(mAdapter);
} else if (photoGirlList != null) {
if (mStartPage == 1) {
//刷新请求
mRecyclerView.setRefreshing(false);
List<PhotoGirl> data = mAdapter.getAdapterData();
data.clear();
data.addAll(photoGirlList);
mAdapter.notifyDataSetChanged();
} else {
//加载更多
List<PhotoGirl> data = mAdapter.getAdapterData();
data.addAll(photoGirlList);
mAdapter.notifyDataSetChanged();
}
} else {
mStartPage--;
mFooterView.setStatus(LoadMoreFooterView.Status.THE_END);
}
}
@Override
public void showErrorTip() {
if (mFooterView != null) {
mFooterView.setStatus(LoadMoreFooterView.Status.ERROR);
}
}
@Override
public void onLoadMore() {
mStartPage++;
mPresenter.requestPhotoList(SIZE, mStartPage);
mFooterView.setStatus(LoadMoreFooterView.Status.LOADING);
}
@Override
public void onRefresh() {
//发起请求
mRecyclerView.setRefreshing(true);
mStartPage = 1;
mPresenter.requestPhotoList(SIZE, mStartPage);
mFooterView.setStatus(LoadMoreFooterView.Status.GONE);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/PhotoModel.java
================================================
package com.lvr.livecircle.meitu.model;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import java.util.List;
import io.reactivex.Observable;
/**
* Created by lvr on 2017/2/20.
*/
public interface PhotoModel {
Observable<List<PhotoGirl>> getPhotoList(int size, int page);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/GirlData.java
================================================
package com.lvr.livecircle.meitu.model.bean;
import java.util.List;
/**
* Created by lvr on 2017/2/20.
*/
public class GirlData {
/**
* error : false
* results : [{"_id":"58a9752b421aa93d3d15aa31","createdAt":"2017-02-19T18:36:27.16Z","desc":"2-20","publishedAt":"2017-02-20T11:56:22.616Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-19-16789884_666922016823652_4719569931841044480_n.jpg","used":true,"who":"daimajia"},{"_id":"58a641a4421aa9662f429734","createdAt":"2017-02-17T08:19:48.413Z","desc":"2-17","publishedAt":"2017-02-17T11:31:19.996Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-17-16464474_721724277990542_654863958657728512_n.jpg","used":true,"who":"daimajia"},{"_id":"58a504d1421aa966366d05ce","createdAt":"2017-02-16T09:48:01.526Z","desc":"2-16","publishedAt":"2017-02-16T10:07:37.13Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-16-16790004_607292222809583_5160406710837313536_n.jpg","used":true,"who":"daimajia"},{"_id":"58a39d1c421aa966366d05c0","createdAt":"2017-02-15T08:13:16.351Z","desc":"2-15","publishedAt":"2017-02-15T11:24:04.127Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-15-16464434_414363458902323_3665858302006263808_n.jpg","used":true,"who":"daimajia"},{"_id":"58a24ce0421aa901ef40579f","createdAt":"2017-02-14T08:18:40.781Z","desc":"2-14","publishedAt":"2017-02-14T11:42:37.303Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-14-16123260_755771577930478_8918176595718438912_n.jpg","used":true,"who":"daimajia"},{"_id":"58a10619421aa901f7902c6a","createdAt":"2017-02-13T09:04:25.996Z","desc":"2-13","publishedAt":"2017-02-13T11:54:17.922Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-13-16464498_1247940031909047_2763412151866490880_n.jpg","used":true,"who":"daimajia"},{"_id":"589d31a2421aa9270bc7332e","createdAt":"2017-02-10T11:21:06.747Z","desc":"2-10","publishedAt":"2017-02-10T11:38:22.122Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-10-16465759_171779496648995_128281069584646144_n.jpg","used":true,"who":"代码家"},{"_id":"589bb252421aa92dc0dfd3bf","createdAt":"2017-02-09T08:05:38.361Z","desc":"2-9","publishedAt":"2017-02-09T11:46:26.70Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-09-16583339_172818256542563_353855393375453184_n.jpg","used":true,"who":"daimajia"},{"_id":"589a7161421aa92db8a0041b","createdAt":"2017-02-08T09:16:17.678Z","desc":"2-8","publishedAt":"2017-02-08T11:39:51.371Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-08-16230686_191036801373876_4789664128824246272_n.jpg","used":true,"who":"daimajia"},{"_id":"58993f2c421aa970b84523ab","createdAt":"2017-02-07T11:29:48.689Z","desc":"2-7","publishedAt":"2017-02-07T11:37:03.683Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-07-032924.jpg","used":true,"who":"daimajia"},{"_id":"5897d9e9421aa970bb154891","createdAt":"2017-02-06T10:05:29.443Z","desc":"2-6","publishedAt":"2017-02-06T11:36:12.36Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-06-16464762_1304611439576933_4803269855073533952_n.jpg","used":true,"who":"代码家"},{"_id":"58947b15421aa970bb154878","createdAt":"2017-02-03T20:44:05.311Z","desc":"2-4","publishedAt":"2017-02-04T11:47:42.336Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-03-123209.jpg","used":true,"who":"代码家"},{"_id":"5893f544421aa90e69b17f8c","createdAt":"2017-02-03T11:13:08.967Z","desc":"2-3","publishedAt":"2017-02-03T11:52:22.806Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/16123958_1630476787257847_7576387494862651392_n.jpg","used":true,"who":"daimajia"},{"_id":"58857746421aa95eae2d92b3","createdAt":"2017-01-23T11:23:50.64Z","desc":"1-23","publishedAt":"2017-01-23T11:35:32.450Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/16124047_121657248344062_4191645221970247680_n.jpg","used":true,"who":"代码家"},{"_id":"58841c08421aa95ea9de7a0c","createdAt":"2017-01-22T10:42:16.648Z","desc":"1-22","publishedAt":"2017-01-22T11:39:29.779Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/16229501_482786908558452_6858241750058663936_n.jpg","used":true,"who":"daimajia"},{"_id":"58817e1e421aa9119735ac5f","createdAt":"2017-01-20T11:03:58.727Z","desc":"1-20","publishedAt":"2017-01-20T11:50:52.750Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/2017-01-20-030332.jpg","used":true,"who":"daimajia"},{"_id":"58802bea421aa9119a6ca6ab","createdAt":"2017-01-19T11:00:58.838Z","desc":"1-19","publishedAt":"2017-01-19T11:40:09.118Z","source":"chrome","type":"福利","url":"http://7xi8d6.com1.z0.glb.clouddn.com/16124351_1863111260639981_4361246625721483264_n.jpg","used":true,"who":"daimajia"},{"_id":"587c6073421aa91194ca0e2c","createdAt":"2017-01-16T13:56:03.417Z","desc":"1-16","publishedAt":"2017-01-16T14:12:18.71Z","source":"chrome","type":"福利","url":"http://ww3.sinaimg.cn/large/610dc034gw1fbsfgssfrwj20u011h48y.jpg","used":true,"who":"daimajia"},{"_id":"5878471d421aa9119735ac13","createdAt":"2017-01-13T11:18:53.183Z","desc":"1-13","publishedAt":"2017-01-13T11:58:16.991Z","source":"chrome","type":"福利","url":"http://ww3.sinaimg.cn/large/610dc034gw1fbou2xsqpaj20u00u0q4h.jpg","used":true,"who":"daimajia"},{"_id":"5876e811421aa9315bfbe85f","createdAt":"2017-01-12T10:21:05.74Z","desc":"1-12","publishedAt":"2017-01-12T11:30:59.369Z","source":"chrome","type":"福利","url":"http://ww2.sinaimg.cn/large/0060lm7Tgw1fbnmsjogt9j30u00u0jvv.jpg","used":true,"who":"daimajia"}]
*/
private boolean error;
private List<PhotoGirl> results;
public boolean isError() {
return error;
}
public void setError(boolean error) {
this.error = error;
}
public List<PhotoGirl> getResults() {
return results;
}
public void setResults(List<PhotoGirl> results) {
this.results = results;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/PhotoGirl.java
================================================
package com.lvr.livecircle.meitu.model.bean;
/**
* Created by lvr on 2017/2/20.
*/
public class PhotoGirl {
/**
* _id : 58a9752b421aa93d3d15aa31
* createdAt : 2017-02-19T18:36:27.16Z
* desc : 2-20
* publishedAt : 2017-02-20T11:56:22.616Z
* source : chrome
* type : 福利
* url : http://7xi8d6.com1.z0.glb.clouddn.com/2017-02-19-16789884_666922016823652_4719569931841044480_n.jpg
* used : true
* who : daimajia
*/
private String _id;
private String createdAt;
private String desc;
private String publishedAt;
private String source;
private String type;
private String url;
private boolean used;
private String who;
public String get_id() {
return _id;
}
public void set_id(String _id) {
this._id = _id;
}
public String getCreatedAt() {
return createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getPublishedAt() {
return publishedAt;
}
public void setPublishedAt(String publishedAt) {
this.publishedAt = publishedAt;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public boolean isUsed() {
return used;
}
public void setUsed(boolean used) {
this.used = used;
}
public String getWho() {
return who;
}
public void setWho(String who) {
this.who = who;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/impl/PhotoModelImpl.java
================================================
package com.lvr.livecircle.meitu.model.impl;
import com.lvr.livecircle.api.ApiService;
import com.lvr.livecircle.app.AppApplication;
import com.lvr.livecircle.client.RetrofitClient;
import com.lvr.livecircle.meitu.model.PhotoModel;
import com.lvr.livecircle.meitu.model.bean.GirlData;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.functions.Function;
/**
* Created by lvr on 2017/2/20.
*/
public class PhotoModelImpl implements PhotoModel {
@Override
public Observable<List<PhotoGirl>> getPhotoList(int size, int page) {
RetrofitClient client = RetrofitClient.getInstance(AppApplication.getAppContext(), ApiService.PHOTO_BASE_URL);
ApiService api = client.create(ApiService.class);
return api.getPhotoList(size,page).map(new Function<GirlData, List<PhotoGirl>>() {
@Override
public List<PhotoGirl> apply(GirlData data) throws Exception {
return data.getResults();
}
}).compose(RetrofitClient.schedulersTransformer);
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/PhotoPresenter.java
================================================
package com.lvr.livecircle.meitu.presenter;
/**
* Created by lvr on 2017/2/20.
*/
public interface PhotoPresenter {
void requestPhotoList(int size,int page);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/impl/PhotoPresenterImpl.java
================================================
package com.lvr.livecircle.meitu.presenter.impl;
import com.lvr.livecircle.client.RxDisposeManager;
import com.lvr.livecircle.meitu.MeiTuFragment;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import com.lvr.livecircle.meitu.model.impl.PhotoModelImpl;
import com.lvr.livecircle.meitu.presenter.PhotoPresenter;
import java.util.List;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
/**
* Created by lvr on 2017/2/20.
*/
public class PhotoPresenterImpl implements PhotoPresenter {
private PhotoModelImpl mModel;
private MeiTuFragment mView;
//是否开启了dialog
private boolean showDialog;
public PhotoPresenterImpl(MeiTuFragment mView) {
this.mView = mView;
this.mModel = new PhotoModelImpl();
}
@Override
public void requestPhotoList(int size, int page) {
mModel.getPhotoList(size,page).subscribe(new Observer<List<PhotoGirl>>() {
@Override
public void onSubscribe(Disposable d) {
RxDisposeManager.get().add("photoList",d);
}
@Override
public void onNext(List<PhotoGirl> girls) {
mView.returnPhotoList(girls);
}
@Override
public void onError(Throwable e) {
mView.showErrorTip();
}
@Override
public void onComplete() {
}
});
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/view/PhotoView.java
================================================
package com.lvr.livecircle.meitu.view;
import com.lvr.livecircle.meitu.model.bean.PhotoGirl;
import java.util.List;
/**
* Created by lvr on 2017/2/20.
*/
public interface PhotoView {
void returnPhotoList(List<PhotoGirl> photoGirlList);
void showErrorTip();
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/music/MusicFragment.java
================================================
package com.lvr.livecircle.music;
import com.lvr.livecircle.R;
import com.lvr.livecircle.base.BaseFragment;
/**
* Created by lvr on 2017/2/6.
*/
public class MusicFragment extends BaseFragment {
@Override
protected int getLayoutResource() {
return R.layout.fragment_music;
}
@Override
protected void initView() {
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/nearby/NearByFragment.java
================================================
package com.lvr.livecircle.nearby;
import com.lvr.livecircle.R;
import com.lvr.livecircle.base.BaseFragment;
/**
* Created by lvr on 2017/2/6.
*/
public class NearByFragment extends BaseFragment {
@Override
protected int getLayoutResource() {
return R.layout.fragment_nearby;
}
@Override
protected void initView() {
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsChannelActivity.java
================================================
package com.lvr.livecircle.news.activity;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.support.v7.widget.helper.ItemTouchHelper;
import android.view.View;
import com.lvr.livecircle.R;
import com.lvr.livecircle.adapter.NewsChannelAdapter;
import com.lvr.livecircle.base.BaseActivity;
import com.lvr.livecircle.bean.ChannelBean;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import com.lvr.livecircle.news.presenter.NewsChannelPresenter;
import com.lvr.livecircle.news.presenter.impl.NewsChannelPresenterImpl;
import com.lvr.livecircle.news.view.NewsChannelView;
import com.lvr.livecircle.utils.ToastUitl;
import com.lvr.livecircle.widget.ItemDragHelperCallback;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
/**
* 新闻频道管理页面
* Created by lvr on 2017/2/11.
*/
public class NewsChannelActivity extends BaseActivity implements NewsChannelView {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.news_channel_mine_rv)
RecyclerView mNewsChannelMineRv;
@BindView(R.id.news_channel_more_rv)
RecyclerView mNewsChannelMoreRv;
private NewsChannelPresenter mPresenter;
private Context mContext;
private NewsChannelAdapter mMineAdapter;
private NewsChannelAdapter mMoreAdapter;
@Override
public int getLayoutId() {
return R.layout.activity_news_channel;
}
@Override
public void initPresenter() {
mPresenter = new NewsChannelPresenterImpl(this);
}
@Override
public void initView() {
SetStatusBarColor();
mContext = this;
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
finishAfterTransition();
} else {
finish();
}
}
});
mPresenter.lodeChannelsRequest();
if(!EventBus.getDefault().isRegistered(this)){
EventBus.getDefault().register(this);
}
}
@Subscribe
public void onChannelEvent(ChannelBean event){
List<NewsChannelTable> list = event.getList();
System.out.println("接收移动的消息");
mPresenter.onItemSwap((ArrayList<NewsChannelTable>) list);
}
/**
* 入口
*
* @param activity
*/
public static void startAction(Activity activity) {
Intent intent = new Intent(activity, NewsChannelActivity.class);
activity.startActivity(intent);
activity.overridePendingTransition(R.anim.fade_in,
R.anim.fade_out);
}
@Override
public void returnMineNewsChannels(List<NewsChannelTable> newsChannelsMine) {
mMineAdapter = new NewsChannelAdapter(mContext, newsChannelsMine);
mNewsChannelMineRv.setLayoutManager(new GridLayoutManager(this, 4, LinearLayoutManager.VERTICAL, false));
mNewsChannelMineRv.setItemAnimator(new DefaultItemAnimator());
mNewsChannelMineRv.setAdapter(mMineAdapter);
//加载数据完毕后 设置监听,拖拽移动事件 和 点击事件 把ItemDragHelperCallback设置给RecyclerView使用
ItemDragHelperCallback callback = new ItemDragHelperCallback(mMineAdapter);
ItemTouchHelper touchHelper = new ItemTouchHelper(callback);
touchHelper.attachToRecyclerView(mNewsChannelMineRv);
mMineAdapter.setItemDragHelperCallback(callback);
mMineAdapter.setOnItemClickListener(new NewsChannelAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
NewsChannelTable newsChannel = mMineAdapter.getAdapterData().get(position);
mMoreAdapter.getAdapterData().add(newsChannel);
mMoreAdapter.notifyDataSetChanged();
mMineAdapter.getAdapterData().remove(position);
mMineAdapter.notifyDataSetChanged();
//进行添加或删除操作后,要更新的列表 进行存储
mPresenter.onItemAddOrRemove((ArrayList<NewsChannelTable>) mMineAdapter.getAdapterData(), (ArrayList<NewsChannelTable>) mMoreAdapter.getAdapterData());
}
});
}
@Override
public void returnMoreNewsChannels(List<NewsChannelTable> newsChannelsMore) {
mMoreAdapter = new NewsChannelAdapter(mContext, newsChannelsMore);
mNewsChannelMoreRv.setLayoutManager(new GridLayoutManager(this, 4, LinearLayoutManager.VERTICAL, false));
mNewsChannelMoreRv.setItemAnimator(new DefaultItemAnimator());
mNewsChannelMoreRv.setAdapter(mMoreAdapter);
mMoreAdapter.setOnItemClickListener(new NewsChannelAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int position) {
if(mMineAdapter.getAdapterData().size()==7){
ToastUitl.showShort("最多只能添加7个");
}else{
NewsChannelTable newsChannel = mMoreAdapter.getAdapterData().get(position);
mMoreAdapter.getAdapterData().remove(position);
mMoreAdapter.notifyDataSetChanged();
mMineAdapter.getAdapterData().add(newsChannel);
mMineAdapter.notifyDataSetChanged();
List<NewsChannelTable> data = mMineAdapter.getAdapterData();
for (NewsChannelTable table : data) {
System.out.println(table);
}
//进行添加或删除操作后,要更新的列表 进行存储
mPresenter.onItemAddOrRemove((ArrayList<NewsChannelTable>) mMineAdapter.getAdapterData(), (ArrayList<NewsChannelTable>) mMoreAdapter.getAdapterData());
}
}
});
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsDetailActivity.java
================================================
package com.lvr.livecircle.news.activity;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.ActivityOptionsCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.app.AppConstant;
import com.lvr.livecircle.base.BaseActivity;
import com.lvr.livecircle.client.RetrofitClient;
import com.lvr.livecircle.client.RxDisposeManager;
import com.lvr.livecircle.news.model.bean.NewsDetail;
import com.lvr.livecircle.news.presenter.impl.NewsDetailPresenterImpl;
import com.lvr.livecircle.news.view.NewsDetailView;
import com.lvr.livecircle.utils.ImageLoaderUtils;
import com.lvr.livecircle.utils.StatusBarSetting;
import com.lvr.livecircle.utils.TimeUtil;
import com.lvr.livecircle.widget.URLImageGetter;
import java.util.List;
import java.util.concurrent.TimeUnit;
import butterknife.BindView;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
/**
* 普通新闻详情
*/
public class NewsDetailActivity extends BaseActivity implements NewsDetailView {
@BindView(R.id.news_detail_photo_iv)
ImageView mNewsDetailPhotoIv;
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.toolbar_layout)
CollapsingToolbarLayout mToolbarLayout;
@BindView(R.id.app_bar)
AppBarLayout mAppBar;
@BindView(R.id.news_detail_from_tv)
TextView mNewsDetailFromTv;
@BindView(R.id.news_detail_body_tv)
TextView mNewsDetailBodyTv;
@BindView(R.id.progress_bar)
ProgressBar mProgressBar;
private String postId;
private String mNewsTitle;
private String mShareLink;
private NewsDetailPresenterImpl mPresenter;
private Context mContext;
private URLImageGetter mUrlImageGetter;
/**
* 入口
*
* @param mContext
* @param postId
*/
public static void startAction(Context mContext, View view, String postId, String imgUrl) {
Intent intent = new Intent(mContext, NewsDetailActivity.class);
intent.putExtra(AppConstant.NEWS_POST_ID, postId);
intent.putExtra(AppConstant.NEWS_IMG_RES, imgUrl);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ActivityOptions options = ActivityOptions
.makeSceneTransitionAnimation((Activity) mContext, view, AppConstant.TRANSITION_ANIMATION_NEWS_PHOTOS);
mContext.startActivity(intent, options.toBundle());
} else {
//让新的Activity从一个小的范围扩大到全屏
ActivityOptionsCompat options = ActivityOptionsCompat
.makeScaleUpAnimation(view, view.getWidth() / 2, view.getHeight() / 2, 0, 0);
ActivityCompat.startActivity((Activity) mContext, intent, options.toBundle());
}
}
@Override
public int getLayoutId() {
return R.layout.activity_news_detail;
}
@Override
public void initPresenter() {
mPresenter = new NewsDetailPresenterImpl(this);
}
@Override
public void initView() {
StatusBarSetting.setTranslucent(NewsDetailActivity.this);
mContext = this;
postId = getIntent().getStringExtra(AppConstant.NEWS_POST_ID);
System.out.println(postId);
mPresenter.requestDetailNews(postId);
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
@Override
public void returnNewsDetail(NewsDetail detail) {
System.out.println("返回的数据:"+detail);
mShareLink = detail.getShareLink();
mNewsTitle = detail.getTitle();
String newsSource = detail.getSource();
String newsTime = TimeUtil.formatDate(detail.getPtime());
String newsBody = detail.getBody();
String NewsImgSrc = getImgSrcs(detail);
setToolBarLayout(mNewsTitle);
mNewsDetailFromTv.setText(getString(R.string.news_from, newsSource, newsTime));
setNewsDetailPhotoIv(NewsImgSrc);
setNewsDetailBodyTv(detail, newsBody);
}
//设置新闻主体内容
private void setNewsDetailBodyTv(final NewsDetail detail, final String body) {
Observable.timer(1, TimeUnit.MILLISECONDS)
.compose(RetrofitClient.schedulersTransformer)
.subscribe(new Observer() {
@Override
public void onSubscribe(Disposable d) {
RxDisposeManager.get().add("newsBody",d);
mProgressBar.setVisibility(View.GONE);
}
@Override
public void onNext(Object o) {
mProgressBar.setVisibility(View.VISIBLE);
setBody(detail, body);
}
@Override
public void onError(Throwable e) {
mProgressBar.setVisibility(View.GONE);
}
@Override
public void onComplete() {
mProgressBar.setVisibility(View.GONE);
}
});
}
private void setBody(NewsDetail detail, String body) {
int imgTotal = detail.getImg().size();
if (isShowBody(body, imgTotal)) {
mUrlImageGetter = new URLImageGetter(mNewsDetailBodyTv, body, imgTotal);
mNewsDetailBodyTv.setText(Html.fromHtml(body, mUrlImageGetter, null));
} else {
mNewsDetailBodyTv.setText(Html.fromHtml(body));
}
}
private boolean isShowBody(String body, int total) {
return total >= 2 && body != null;
}
//加载图片
private void setNewsDetailPhotoIv(String src) {
ImageLoaderUtils.displayBigPhoto(mContext,mNewsDetailPhotoIv,src);
}
//设置toolbar内容
private void setToolBarLayout(String title) {
mToolbarLayout.setTitle(title);
mToolbarLayout.setExpandedTitleColor(ContextCompat.getColor(this, R.color.white));
mToolbarLayout.setCollapsedTitleTextColor(ContextCompat.getColor(this, R.color.primary_text_white));
}
//获取图片资源
private String getImgSrcs(NewsDetail newsDetail) {
List<NewsDetail.ImgBean> imgSrcs = newsDetail.getImg();
String imgSrc;
if (imgSrcs != null && imgSrcs.size() > 0) {
imgSrc = imgSrcs.get(0).getSrc();
} else {
imgSrc = getIntent().getStringExtra(AppConstant.NEWS_IMG_RES);
}
return imgSrc;
}
@Override
protected void onDestroy() {
super.onDestroy();
RxDisposeManager.get().cancel("newsBody");
RxDisposeManager.get().cancel("newsDetail");
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsPhotoDetailActivity.java
================================================
package com.lvr.livecircle.news.activity;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.adapter.CardAdapter;
import com.lvr.livecircle.app.AppConstant;
import com.lvr.livecircle.base.BaseActivity;
import com.lvr.livecircle.news.model.bean.NewsPhotoDetail;
import com.lvr.livecircle.recycleviewcardgallery.CardScaleHelper;
import com.lvr.livecircle.recycleviewcardgallery.SpeedRecyclerView;
import com.lvr.livecircle.utils.StatusBarSetting;
import butterknife.BindView;
/**
* Created by lvr on 2017/2/11.
*/
public class NewsPhotoDetailActivity extends BaseActivity {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.blurView)
ImageView mBlurView;
@BindView(R.id.recyclerView)
SpeedRecyclerView mRecyclerView;
@BindView(R.id.photo_detail_title_tv)
TextView mPhotoDetailTitleTv;
private NewsPhotoDetail mNewsPhotoDetail;
private CardScaleHelper mCardScaleHelper = null;
private int mLastPos = -1;
private Runnable mBlurRunnable;
/**
* 入口
*
* @param context
* @param mNewsPhotoDetail
*/
public static void startAction(Context context, NewsPhotoDetail mNewsPhotoDetail) {
Intent intent = new Intent(context, NewsPhotoDetailActivity.class);
intent.putExtra(AppConstant.PHOTO_DETAIL, mNewsPhotoDetail);
context.startActivity(intent);
}
@Override
public int getLayoutId() {
return R.layout.activity_news_photo_detail;
}
@Override
public void initPresenter() {
}
@Override
public void initView() {
StatusBarSetting.setColor(NewsPhotoDetailActivity.this,getResources().getColor(R.color.black));
mNewsPhotoDetail = getIntent().getParcelableExtra(AppConstant.PHOTO_DETAIL);
System.out.println(mNewsPhotoDetail);
mRecyclerView = (SpeedRecyclerView) findViewById(R.id.recyclerView);
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);
mRecyclerView.setLayoutManager(linearLayoutManager);
mRecyclerView.setAdapter(new CardAdapter(mContext,mNewsPhotoDetail.getPictures()));
// mRecyclerView绑定scale效果
mCardScaleHelper = new CardScaleHelper();
mCardScaleHelper.setCurrentItemPos(0);
mCardScaleHelper.attachToRecyclerView(mRecyclerView);
String title = mNewsPhotoDetail.getPictures().get(0).getTitle()==null?"":mNewsPhotoDetail.getPictures().get(0).getTitle();
mPhotoDetailTitleTv.setText(1+"/"+mNewsPhotoDetail.getPictures().size()+" "+title);
mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
int pos = mCardScaleHelper.getCurrentItemPos();
String title = mNewsPhotoDetail.getPictures().get(pos).getTitle() == null ? "" : mNewsPhotoDetail.getPictures().get(pos).getTitle();
if(mPhotoDetailTitleTv!=null){
mPhotoDetailTitleTv.setText(pos+1+"/"+mNewsPhotoDetail.getPictures().size()+" "+title);
}
}
});
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/db/NewsChannelTableManager.java
================================================
/*
* Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.lvr.livecircle.news.db;
import com.lvr.livecircle.R;
import com.lvr.livecircle.api.ApiConstants;
import com.lvr.livecircle.app.AppApplication;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class NewsChannelTableManager {
/**
* 加载新闻类型
*
* @return
*/
public static List<NewsChannelTable> loadNewsChannelsMore() {
List<String> channelName = Arrays.asList(AppApplication.getAppContext().getResources().getStringArray(R.array.news_channel_name));
List<String> channelId = Arrays.asList(AppApplication.getAppContext().getResources().getStringArray(R.array.news_channel_id));
List<Integer> channelImgRes = new ArrayList<Integer>();
channelImgRes.add(R.drawable.news_house);
channelImgRes.add(R.drawable.news_play);
channelImgRes.add(R.drawable.news_movie);
channelImgRes.add(R.drawable.news_car);
channelImgRes.add(R.drawable.news_game);
channelImgRes.add(R.drawable.news_education);
channelImgRes.add(R.drawable.news_travel);
channelImgRes.add(R.drawable.news_mobile);
channelImgRes.add(R.drawable.news_social);
ArrayList<NewsChannelTable> newsChannelTables = new ArrayList<>();
for (int i = 0; i < channelName.size(); i++) {
NewsChannelTable entity = new NewsChannelTable(channelName.get(i), channelId.get(i)
, ApiConstants.getType(channelId.get(i)), i <= 5, i, false, channelImgRes.get(i));
newsChannelTables.add(entity);
}
return newsChannelTables;
}
/**
* 加载固定新闻类型
*
* @return
*/
public static List<NewsChannelTable> loadNewsChannelsStatic() {
List<String> channelName = Arrays.asList(AppApplication.getAppContext().getResources().getStringArray(R.array.news_channel_name_static));
System.out.println(channelName);
List<String> channelId = Arrays.asList(AppApplication.getAppContext().getResources().getStringArray(R.array.news_channel_id_static));
List<Integer> channelImgRes = new ArrayList<Integer>();
channelImgRes.add(R.drawable.news_header);
channelImgRes.add(R.drawable.news_tech);
channelImgRes.add(R.drawable.news_fincial);
channelImgRes.add(R.drawable.news_military);
channelImgRes.add(R.drawable.news_sports);
ArrayList<NewsChannelTable> newsChannelTables = new ArrayList<>();
for (int i = 0; i < channelName.size(); i++) {
System.out.println(channelName.get(i));
System.out.println(channelId.get(i));
System.out.println(channelImgRes.get(i));
NewsChannelTable entity = new NewsChannelTable(channelName.get(i), channelId.get(i)
, ApiConstants.getType(channelId.get(i)), i <= 5, i, i==0?true:false, channelImgRes.get(i));
newsChannelTables.add(entity);
}
return newsChannelTables;
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/fragment/NewsFragment.java
================================================
package com.lvr.livecircle.news.fragment;
import android.content.Context;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.lvr.livecircle.R;
import com.lvr.livecircle.adapter.NewsListAdapter;
import com.lvr.livecircle.adapter.OnNewsChannelListener;
import com.lvr.livecircle.base.BaseFragment;
import com.lvr.livecircle.bean.FabScrollBean;
import com.lvr.livecircle.bean.HeaderBean;
import com.lvr.livecircle.bean.NewsInfo;
import com.lvr.livecircle.client.RxDisposeManager;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import com.lvr.livecircle.news.presenter.impl.NewsPresenterImpl;
import com.lvr.livecircle.news.view.NewsView;
import com.lvr.livecircle.widget.LoadingTip;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import de.greenrobot.event.EventBus;
import de.greenrobot.event.Subscribe;
/**
* Created by lvr on 2017/2/6.
*/
public class NewsFragment extends BaseFragment implements NewsView, SwipeRefreshLayout.OnRefreshListener, OnNewsChannelListener {
@BindView(R.id.recyclerView)
RecyclerView mRecyclerView;
@BindView(R.id.refreshLayout)
SwipeRefreshLayout mRefreshLayout;
@BindView(R.id.loadedTip)
LoadingTip mLoadedTip;
private NewsPresenterImpl mPresenter;
private Context mContext;
private List<NewsChannelTable> mTables = new ArrayList<>();
private List<NewsInfo> mInfos = new ArrayList<>();
private NewsListAdapter mNewsListAdapter;
//当前加载新闻类型
private String cur_news_type = "headline";
//当前加载新闻类型的id
private String cur_news_id = "T1348647909107";
//当前加载新闻页数
private int cur_news_page = 0;
@Override
protected int getLayoutResource() {
return R.layout.fragment_news;
}
@Override
protected void initView() {
mContext = getActivity();
mPresenter = new NewsPresenterImpl(this);
mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
mRefreshLayout.setOnRefreshListener(this);
//设置下拉刷新的按钮的颜色
mRefreshLayout.setColorSchemeResources(R.color.colorPrimary);
setLoadMoreListener();
if (!EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().register(this);
}
}
@Override
protected void onFragmentVisibleChange(boolean isVisible) {
if (isVisible) {
mPresenter.lodeMineChannelsRequest();
mPresenter.loadNewsListRequest(cur_news_type, cur_news_id, cur_news_page);
}else{
RxDisposeManager.get().cancel("newschannel");
RxDisposeManager.get().cancel("newslist");
}
}
@Subscribe
public void onFabScrollEvent(FabScrollBean event) {
if(event.getPosition()==1){
mRecyclerView.smoothScrollToPosition(0);
}
}
@Subscribe
public void onHeaderEvent(HeaderBean event) {
returnNewsChannel(event.getList());
}
private void setLoadMoreListener() {
mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
boolean isSlidingToLast = false;
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
LinearLayoutManager manager = (LinearLayoutManager) recyclerView.getLayoutManager();
// 当不滚动时
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
// 获取最后一个完全显示的item position
int lastVisibleItem = manager.findLastCompletelyVisibleItemPosition();
int totalItemCount = manager.getItemCount();
// 判断是否滚动到底部并且是向下滑动
if (lastVisibleItem == (totalItemCount - 1) && isSlidingToLast) {
cur_news_page += 20;
System.out.println("加载页数:" + cur_news_page);
mPresenter.loadNewsListRequest(cur_news_type, cur_news_id, cur_news_page);
}
}
super.onScrollStateChanged(recyclerView, newState);
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
isSlidingToLast = dy > 0;
}
});
}
@Override
public void returnNewsChannel(List<NewsChannelTable> tables) {
System.out.println(tables);
System.out.println("频道个数:" + tables.size());
mTables.clear();
mTables.addAll(tables);
addAllChannel();
if (mNewsListAdapter != null) {
mNewsListAdapter.setTables(mTables);
mNewsListAdapter.notifyItemChanged(0);
}
}
@Override
public void returnNewsList(List<NewsInfo> infos) {
mInfos = infos;
if (!isFirst) {
isFirst = true;
mNewsListAdapter = new NewsListAdapter(mContext, mInfos, mTables);
mNewsListAdapter.setNewsChannelListener(this);
mRecyclerView.setAdapter(mNewsListAdapter);
} else if (cur_news_page == 0) {
mRefreshLayout.setRefreshing(false);
List<NewsInfo> data = mNewsListAdapter.getAdapterData();
data.clear();
data.addAll(infos);
System.out.println("刷新后的数据:" + data.size());
mNewsListAdapter.notifyDataSetChanged();
} else if (cur_news_page > 0) {
infos.remove(0);
List<NewsInfo> data = mNewsListAdapter.getAdapterData();
data.addAll(infos);
System.out.println("加载后的数据:" + data.size());
mNewsListAdapter.notifyDataSetChanged();
}
}
/**
* 添加跳转到管理新闻频道的界面
*/
private void addAllChannel() {
if (mTables != null) {
NewsChannelTable allChannel = new NewsChannelTable("全部", "", "", false, 0, true, R.drawable.news_all);
mTables.add(allChannel);
}
}
@Override
public void showNetErrorTip() {
super.showNetErrorTip();
mRefreshLayout.setRefreshing(false);
mLoadedTip.setLoadingTip(LoadingTip.LoadStatus.error);
}
public void showLoading() {
mLoadedTip.setLoadingTip(LoadingTip.LoadStatus.loading);
}
public void stopLoading() {
mLoadedTip.setLoadingTip(LoadingTip.LoadStatus.finish);
}
@Override
public void onRefresh() {
cur_news_page = 0;
mRefreshLayout.setRefreshing(true);
mPresenter.loadNewsListRequest(cur_news_type, cur_news_id, cur_news_page);
}
@Override
public void changeChannelListener(NewsChannelTable newsChannelTable) {
String type = newsChannelTable.getNewsChannelType();
String id = newsChannelTable.getNewsChannelId();
cur_news_type = type;
cur_news_id = id;
cur_news_page = 0;
System.out.println(cur_news_type);
System.out.println(cur_news_id);
mPresenter.loadNewsListRequest(cur_news_type, cur_news_id, cur_news_page);
}
@Override
public void onDestroyView() {
super.onDestroyView();
RxDisposeManager.get().cancel("newschannel");
RxDisposeManager.get().cancel("newslist");
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsChannelModel.java
================================================
package com.lvr.livecircle.news.model;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
/**
* Created by lvr on 2017/2/14.
*/
public interface NewsChannelModel {
Observable<List<NewsChannelTable>> lodeMoreNewsChannels();
Observable<String> swapDb(ArrayList<NewsChannelTable> newsChannelTableList);
Observable<String> updateDb(ArrayList<NewsChannelTable> mineChannelTableList, ArrayList<NewsChannelTable> moreChannelTableList);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsDetailModel.java
================================================
package com.lvr.livecircle.news.model;
import com.lvr.livecircle.news.model.bean.NewsDetail;
import io.reactivex.Observable;
/**
* Created by lvr on 2017/2/11.
*/
public interface NewsDetailModel {
Observable<NewsDetail> getDetailNews(String postId);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsModel.java
================================================
package com.lvr.livecircle.news.model;
import com.lvr.livecircle.bean.NewsInfo;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import java.util.List;
import io.reactivex.Observable;
/**
* Created by lvr on 2017/2/7.
*/
public interface NewsModel {
Observable<List<NewsChannelTable>> requestNewsChannels();
Observable<NewsInfo> requestNewsList(String newsType, final String id, int startPage);
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsChannelTable.java
================================================
package com.lvr.livecircle.news.model.bean;
import java.io.Serializable;
public class NewsChannelTable implements Serializable {
private String newsChannelName;
private String newsChannelId;
private String newsChannelType;
private boolean newsChannelSelect;
private int newsChannelIndex;
private Boolean newsChannelFixed;
private int ImgRes;
public NewsChannelTable() {
}
public NewsChannelTable(String newsChannelName) {
this.newsChannelName = newsChannelName;
}
public NewsChannelTable(String newsChannelName, String newsChannelId, String newsChannelType, boolean newsChannelSelect, int newsChannelIndex, Boolean newsChannelFixed,int imgRes) {
this.ImgRes = imgRes;
this.newsChannelName = newsChannelName;
this.newsChannelId = newsChannelId;
this.newsChannelType = newsChannelType;
this.newsChannelSelect = newsChannelSelect;
this.newsChannelIndex = newsChannelIndex;
this.newsChannelFixed = newsChannelFixed;
}
public boolean isNewsChannelSelect() {
return newsChannelSelect;
}
public void setImgRes(int imgRes) {
ImgRes = imgRes;
}
public int getImgRes() {
return ImgRes;
}
public String getNewsChannelName() {
return newsChannelName;
}
public void setNewsChannelName(String newsChannelName) {
this.newsChannelName = newsChannelName;
}
public String getNewsChannelId() {
return newsChannelId;
}
public void setNewsChannelId(String newsChannelId) {
this.newsChannelId = newsChannelId;
}
public String getNewsChannelType() {
return newsChannelType;
}
public void setNewsChannelType(String newsChannelType) {
this.newsChannelType = newsChannelType;
}
public boolean getNewsChannelSelect() {
return newsChannelSelect;
}
public void setNewsChannelSelect(boolean newsChannelSelect) {
this.newsChannelSelect = newsChannelSelect;
}
public int getNewsChannelIndex() {
return newsChannelIndex;
}
public void setNewsChannelIndex(int newsChannelIndex) {
this.newsChannelIndex = newsChannelIndex;
}
public Boolean getNewsChannelFixed() {
return newsChannelFixed;
}
public void setNewsChannelFixed(Boolean newsChannelFixed) {
this.newsChannelFixed = newsChannelFixed;
}
@Override
public String toString() {
return "NewsChannelTable{" +
"newsChannelName='" + newsChannelName + '\'' +
", newsChannelId='" + newsChannelId + '\'' +
", newsChannelType='" + newsChannelType + '\'' +
", newsChannelSelect=" + newsChannelSelect +
", newsChannelIndex=" + newsChannelIndex +
", newsChannelFixed=" + newsChannelFixed +
", ImgRes=" + ImgRes +
'}';
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsDetail.java
================================================
package com.lvr.livecircle.news.model.bean;
import java.util.List;
/**
* Created by lvr on 2017/2/11.
*/
public class NewsDetail {
/**
* body : <p> <strong>版权声明:本文版权为网易汽车所有,转载请注明出处。</strong></p><p> <strong>网易汽车9月13日报道</strong>近日,海外媒体曝光了一组本田新一代Freed的路试谍照,新车定位为MPV车型,基于飞度平台打造,将于今年9月内在日本发布。</p><!--IMG#0--><p> <b>新车信息:</b></p><p> ·新车基于飞度平台打造,同样采用了倾斜度较大的A柱加三角窗的设计,减少侧前方的盲区。较高的车顶和侧滑门的设计则凸显其MPV属性;</p><!--IMG#1--><!--IMG#2--><p> ·内部采用平地板设计,无论是中控台下方还是后排地板均没有明显的突起,较高的平整度进一步提升空间利用率。同时,新车提供5座、6座以及7座三种座椅布局,满足不同消费者的需求;</p><!--IMG#3--><!--IMG#4--><!--IMG#5--><p> ·动力方面,新车将搭载1.5L汽油发动机和全新的SPORT HYBRID i-DCD油电混动系统,其中,油电混动车型将匹配7速双离合变速箱。</p><p> <b>点评:</b></p><p> 飞度本身就已经是“魔术空间”了,而基于飞度平台的Freed尺寸比飞度大不了多少却能得到比飞度大得多的空间,进一步提升实用性。只可惜目前并没有引入国内的计划。</p><p> 作者:沙墨瑀</p>
* users : []
* ydbaike : []
* replyCount : 5651
* link : []
* img : [{"ref":"<!--IMG#0-->","pixel":"550*413","alt":"","src":"http://img4.cache.netease.com/auto/2016/9/6/20160906095943e0deb_550.jpg"},{"ref":"<!--IMG#1-->","pixel":"550*413","alt":"","src":"http://img1.cache.netease.com/auto/2016/9/6/20160906101623484a2_550.jpg"},{"ref":"<!--IMG#2-->","pixel":"550*413","alt":"","src":"http://img4.cache.netease.com/auto/2016/9/6/2016090610162781cd3_550.jpg"},{"ref":"<!--IMG#3-->","pixel":"550*243","alt":"","src":"http://img4.cache.netease.com/auto/2016/9/6/201609061016535ab4e_550.jpg"},{"ref":"<!--IMG#4-->","pixel":"550*413","alt":"","src":"http://img2.cache.netease.com/auto/2016/9/6/2016090610165690032_550.jpg"},{"ref":"<!--IMG#5-->","pixel":"550*246","alt":"","src":"http://img4.cache.netease.com/auto/2016/9/6/20160906101659aec96_550.jpg"}]
* votes : []
* shareLink : https://c.m.163.com/news/a/C0Q6KKML00084TUO.html?spss=newsapp&spsw=1
* digest : 本田新一代Freed谍照曝光,基于飞度打造,空间更大。
* topiclist_news : [{"hasCover":false,"subnum":"超过1000万","alias":"Autos","tname":"汽车","ename":"qiche","tid":"T1348654060988","cid":"C1348652751993"}]
* extraCard : {"title":"热车推荐","extraurl":"","list":[{"name":"雪铁龙C5","imgsrc":"http://img3.cache.netease.com/photo/0008/2014-08-25/300x225_A4GNKQRP29RB0008.png","digest":"直降5.6万↓","url":"http://auto.3g.163.com/citroen/2077/#khd002"},{"name":"名图","imgsrc":"http://img4.cache.netease.com/photo/0008/2016-07-26/300x225_BSTJ5R6I59TM0008.png","digest":"直降2.0万↓","url":"http://auto.3g.163.com/hyundai/17039/#khd002"},{"name":"全新英朗","imgsrc":"http://img3.cache.netease.com/photo/0008/2016-06-21/300x225_BQ3GFBRB3MQL0008.png","digest":"直降1.5万↓","url":"http://auto.3g.163.com/buick/10003/#khd002"}]}
* dkeys : 本田,Freed,新车
* ec : 王海陆_NA1702
* topiclist : [{"hasCover":false,"subnum":"31.2万","alias":"未来汽车生活体验平台","tname":"网易汽车","ename":"wangyiqicheqiche","tid":"T1454656350893","cid":"C1374477981139"}]
* docid : C0Q6KKML00084TUO
* sourceinfo : {"alias":"未来汽车生活体验平台","ename":"wangyiqicheqiche","tname":"网易汽车","tid":"T1454656350893"}
* picnews : true
* title : 放大版的飞度 本田新一代Freed谍照曝光
* tid :
* template : normal
* threadVote : 13
* askbar : [{"title":"汽车媒体人 ","headpicurl":"http://dingyue.nosdn.127.net/6qrnKjR9P7VaWHw60hb8z52iUdJ4edQg4wE3XAm=Xqawu1471420744994.jpg","alias":"我是汽车媒体人张超,关于买车、换车、用车的相关问题,问我吧!","expertId":"EX1729495850059568996","name":"张超","concernCount":43570}]
* threadAgainst : 10
* autoRecomends : [{"name":"雪铁龙C5","imgsrc":"http://img3.cache.netease.com/photo/0008/2014-08-25/300x225_A4GNKQRP29RB0008.png","chexi_id":"2077","youhui":5.6,"youhuinew":"直降5.6万↓","url":"http://auto.3g.163.com/citroen/2077/#khd002"},{"name":"名图","imgsrc":"http://img4.cache.netease.com/photo/0008/2016-07-26/300x225_BSTJ5R6I59TM0008.png","chexi_id":"17039","youhui":2,"youhuinew":"直降2.0万↓","url":"http://auto.3g.163.com/hyundai/17039/#khd002"},{"name":"全新英朗","imgsrc":"http://img3.cache.netease.com/photo/0008/2016-06-21/300x225_BQ3GFBRB3MQL0008.png","chexi_id":"10003","youhui":1.5,"youhuinew":"直降1.5万↓","url":"http://auto.3g.163.com/buick/10003/#khd002"}]
* boboList : []
* replyBoard : auto_bbs
* source : 网易汽车
* huati : [{"topicId":"SJ8240509424738212213","topicName":"本田"}]
* hasNext : false
* voicecomment : off
* ptime : 2016-09-13 00:03:17
*/
private String body;
private int replyCount;
private String shareLink;
private String digest;
private ExtraCardBean extraCard;
private String dkeys;
private String ec;
private String docid;
private SourceinfoBean sourceinfo;
private boolean picnews;
private String title;
private String tid;
private String template;
private int threadVote;
private int threadAgainst;
private String replyBoard;
private String source;
private boolean hasNext;
private String voicecomment;
private String ptime;
private List<?> users;
private List<?> ydbaike;
private List<?> link;
private List<ImgBean> img;
private List<?> votes;
private List<TopiclistNewsBean> topiclist_news;
private List<TopiclistBean> topiclist;
private List<AskbarBean> askbar;
private List<AutoRecomendsBean> autoRecomends;
private List<?> boboList;
private List<HuatiBean> huati;
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public int getReplyCount() {
return replyCount;
}
public void setReplyCount(int replyCount) {
this.replyCount = replyCount;
}
public String getShareLink() {
return shareLink;
}
public void setShareLink(String shareLink) {
this.shareLink = shareLink;
}
public String getDigest() {
return digest;
}
public void setDigest(String digest) {
this.digest = digest;
}
public ExtraCardBean getExtraCard() {
return extraCard;
}
public void setExtraCard(ExtraCardBean extraCard) {
this.extraCard = extraCard;
}
public String getDkeys() {
return dkeys;
}
public void setDkeys(String dkeys) {
this.dkeys = dkeys;
}
public String getEc() {
return ec;
}
public void setEc(String ec) {
this.ec = ec;
}
public String getDocid() {
return docid;
}
public void setDocid(String docid) {
this.docid = docid;
}
public SourceinfoBean getSourceinfo() {
return sourceinfo;
}
public void setSourceinfo(SourceinfoBean sourceinfo) {
this.sourceinfo = sourceinfo;
}
public boolean isPicnews() {
return picnews;
}
public void setPicnews(boolean picnews) {
this.picnews = picnews;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
public int getThreadVote() {
return threadVote;
}
public void setThreadVote(int threadVote) {
this.threadVote = threadVote;
}
public int getThreadAgainst() {
return threadAgainst;
}
public void setThreadAgainst(int threadAgainst) {
this.threadAgainst = threadAgainst;
}
public String getReplyBoard() {
return replyBoard;
}
public void setReplyBoard(String replyBoard) {
this.replyBoard = replyBoard;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public boolean isHasNext() {
return hasNext;
}
public void setHasNext(boolean hasNext) {
this.hasNext = hasNext;
}
public String getVoicecomment() {
return voicecomment;
}
public void setVoicecomment(String voicecomment) {
this.voicecomment = voicecomment;
}
public String getPtime() {
return ptime;
}
public void setPtime(String ptime) {
this.ptime = ptime;
}
public List<?> getUsers() {
return users;
}
public void setUsers(List<?> users) {
this.users = users;
}
public List<?> getYdbaike() {
return ydbaike;
}
public void setYdbaike(List<?> ydbaike) {
this.ydbaike = ydbaike;
}
public List<?> getLink() {
return link;
}
public void setLink(List<?> link) {
this.link = link;
}
public List<ImgBean> getImg() {
return img;
}
public void setImg(List<ImgBean> img) {
this.img = img;
}
public List<?> getVotes() {
return votes;
}
public void setVotes(List<?> votes) {
this.votes = votes;
}
public List<TopiclistNewsBean> getTopiclist_news() {
return topiclist_news;
}
public void setTopiclist_news(List<TopiclistNewsBean> topiclist_news) {
this.topiclist_news = topiclist_news;
}
public List<TopiclistBean> getTopiclist() {
return topiclist;
}
public void setTopiclist(List<TopiclistBean> topiclist) {
this.topiclist = topiclist;
}
public List<AskbarBean> getAskbar() {
return askbar;
}
public void setAskbar(List<AskbarBean> askbar) {
this.askbar = askbar;
}
public List<AutoRecomendsBean> getAutoRecomends() {
return autoRecomends;
}
public void setAutoRecomends(List<AutoRecomendsBean> autoRecomends) {
this.autoRecomends = autoRecomends;
}
public List<?> getBoboList() {
return boboList;
}
public void setBoboList(List<?> boboList) {
this.boboList = boboList;
}
public List<HuatiBean> getHuati() {
return huati;
}
public void setHuati(List<HuatiBean> huati) {
this.huati = huati;
}
public static class ExtraCardBean {
@Override
public String toString() {
return "ExtraCardBean{" +
"title='" + title + '\'' +
", extraurl='" + extraurl + '\'' +
", list=" + list +
'}';
}
/**
* title : 热车推荐
* extraurl :
* list : [{"name":"雪铁龙C5","imgsrc":"http://img3.cache.netease.com/photo/0008/2014-08-25/300x225_A4GNKQRP29RB0008.png","digest":"直降5.6万↓","url":"http://auto.3g.163.com/citroen/2077/#khd002"},{"name":"名图","imgsrc":"http://img4.cache.netease.com/photo/0008/2016-07-26/300x225_BSTJ5R6I59TM0008.png","digest":"直降2.0万↓","url":"http://auto.3g.163.com/hyundai/17039/#khd002"},{"name":"全新英朗","imgsrc":"http://img3.cache.netease.com/photo/0008/2016-06-21/300x225_BQ3GFBRB3MQL0008.png","digest":"直降1.5万↓","url":"http://auto.3g.163.com/buick/10003/#khd002"}]
*/
private String title;
private String extraurl;
private List<ListBean> list;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getExtraurl() {
return extraurl;
}
public void setExtraurl(String extraurl) {
this.extraurl = extraurl;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean {
@Override
public String toString() {
return "ListBean{" +
"name='" + name + '\'' +
", imgsrc='" + imgsrc + '\'' +
", digest='" + digest + '\'' +
", url='" + url + '\'' +
'}';
}
/**
* name : 雪铁龙C5
* imgsrc : http://img3.cache.netease.com/photo/0008/2014-08-25/300x225_A4GNKQRP29RB0008.png
* digest : 直降5.6万↓
* url : http://auto.3g.163.com/citroen/2077/#khd002
*/
private String name;
private String imgsrc;
private String digest;
private String url;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImgsrc() {
return imgsrc;
}
public void setImgsrc(String imgsrc) {
this.imgsrc = imgsrc;
}
public String getDigest() {
return digest;
}
public void setDigest(String digest) {
this.digest = digest;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
}
public static class SourceinfoBean {
@Override
public String toString() {
return "SourceinfoBean{" +
"alias='" + alias + '\'' +
", ename='" + ename + '\'' +
", tname='" + tname + '\'' +
", tid='" + tid + '\'' +
'}';
}
/**
* alias : 未来汽车生活体验平台
* ename : wangyiqicheqiche
* tname : 网易汽车
* tid : T1454656350893
*/
private String alias;
private String ename;
private String tname;
private String tid;
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getEname() {
return ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
}
public static class ImgBean {
/**
* ref : <!--IMG#0-->
* pixel : 550*413
* alt :
* src : http://img4.cache.netease.com/auto/2016/9/6/20160906095943e0deb_550.jpg
*/
private String ref;
private String pixel;
private String alt;
private String src;
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public String getPixel() {
return pixel;
}
public void setPixel(String pixel) {
this.pixel = pixel;
}
public String getAlt() {
return alt;
}
public void setAlt(String alt) {
this.alt = alt;
}
public String getSrc() {
return src;
}
public void setSrc(String src) {
this.src = src;
}
}
public static class TopiclistNewsBean {
@Override
public String toString() {
return "TopiclistNewsBean{" +
"hasCover=" + hasCover +
", subnum='" + subnum + '\'' +
", alias='" + alias + '\'' +
", tname='" + tname + '\'' +
", ename='" + ename + '\'' +
", tid='" + tid + '\'' +
", cid='" + cid + '\'' +
'}';
}
/**
* hasCover : false
* subnum : 超过1000万
* alias : Autos
* tname : 汽车
* ename : qiche
* tid : T1348654060988
* cid : C1348652751993
*/
private boolean hasCover;
private String subnum;
private String alias;
private String tname;
private String ename;
private String tid;
private String cid;
public boolean isHasCover() {
return hasCover;
}
public void setHasCover(boolean hasCover) {
this.hasCover = hasCover;
}
public String getSubnum() {
return subnum;
}
public void setSubnum(String subnum) {
this.subnum = subnum;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getEname() {
return ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
}
public static class TopiclistBean {
@Override
public String toString() {
return "TopiclistBean{" +
"hasCover=" + hasCover +
", subnum='" + subnum + '\'' +
", alias='" + alias + '\'' +
", tname='" + tname + '\'' +
", ename='" + ename + '\'' +
", tid='" + tid + '\'' +
", cid='" + cid + '\'' +
'}';
}
/**
* hasCover : false
* subnum : 31.2万
* alias : 未来汽车生活体验平台
* tname : 网易汽车
* ename : wangyiqicheqiche
* tid : T1454656350893
* cid : C1374477981139
*/
private boolean hasCover;
private String subnum;
private String alias;
private String tname;
private String ename;
private String tid;
private String cid;
public boolean isHasCover() {
return hasCover;
}
public void setHasCover(boolean hasCover) {
this.hasCover = hasCover;
}
public String getSubnum() {
return subnum;
}
public void setSubnum(String subnum) {
this.subnum = subnum;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getTname() {
return tname;
}
public void setTname(String tname) {
this.tname = tname;
}
public String getEname() {
return ename;
}
public void setEname(String ename) {
this.ename = ename;
}
public String getTid() {
return tid;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getCid() {
return cid;
}
public void setCid(String cid) {
this.cid = cid;
}
}
public static class AskbarBean {
@Override
public String toString() {
return "AskbarBean{" +
"title='" + title + '\'' +
", headpicurl='" + headpicurl + '\'' +
", alias='" + alias + '\'' +
", expertId='" + expertId + '\'' +
", name='" + name + '\'' +
", concernCount=" + concernCount +
'}';
}
/**
* title : 汽车媒体人
* headpicurl : http://dingyue.nosdn.127.net/6qrnKjR9P7VaWHw60hb8z52iUdJ4edQg4wE3XAm=Xqawu1471420744994.jpg
* alias : 我是汽车媒体人张超,关于买车、换车、用车的相关问题,问我吧!
* expertId : EX1729495850059568996
* name : 张超
* concernCount : 43570
*/
private String title;
private String headpicurl;
private String alias;
private String expertId;
private String name;
private int concernCount;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getHeadpicurl() {
return headpicurl;
}
public void setHeadpicurl(String headpicurl) {
this.headpicurl = headpicurl;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getExpertId() {
return expertId;
}
public void setExpertId(String expertId) {
this.expertId = expertId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getConcernCount() {
return concernCount;
}
public void setConcernCount(int concernCount) {
this.concernCount = concernCount;
}
}
public static class AutoRecomendsBean {
@Override
public String toString() {
return "AutoRecomendsBean{" +
"name='" + name + '\'' +
", imgsrc='" + imgsrc + '\'' +
", chexi_id='" + chexi_id + '\'' +
", youhui=" + youhui +
", youhuinew='" + youhuinew + '\'' +
", url='" + url + '\'' +
'}';
}
/**
* name : 雪铁龙C5
* imgsrc : http://img3.cache.netease.com/photo/0008/2014-08-25/300x225_A4GNKQRP29RB0008.png
* chexi_id : 2077
* youhui : 5.6
* youhuinew : 直降5.6万↓
* url : http://auto.3g.163.com/citroen/2077/#khd002
*/
private String name;
private String imgsrc;
private String chexi_id;
private double youhui;
private String youhuinew;
private String url;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImgsrc() {
return imgsrc;
}
public void setImgsrc(String imgsrc) {
this.imgsrc = imgsrc;
}
public String getChexi_id() {
return chexi_id;
}
public void setChexi_id(String chexi_id) {
this.chexi_id = chexi_id;
}
public double getYouhui() {
return youhui;
}
public void setYouhui(double youhui) {
this.youhui = youhui;
}
public String getYouhuinew() {
return youhuinew;
}
public void setYouhuinew(String youhuinew) {
this.youhuinew = youhuinew;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
public static class HuatiBean {
/**
* topicId : SJ8240509424738212213
* topicName : 本田
*/
private String topicId;
private String topicName;
public String getTopicId() {
return topicId;
}
public void setTopicId(String topicId) {
this.topicId = topicId;
}
public String getTopicName() {
return topicName;
}
public void setTopicName(String topicName) {
this.topicName = topicName;
}
@Override
public String toString() {
return "HuatiBean{" +
"topicId='" + topicId + '\'' +
", topicName='" + topicName + '\'' +
'}';
}
}
@Override
public String toString() {
return "NewsDetail{" +
"body='" + body + '\'' +
", replyCount=" + replyCount +
", shareLink='" + shareLink + '\'' +
", digest='" + digest + '\'' +
", extraCard=" + extraCard +
", dkeys='" + dkeys + '\'' +
", ec='" + ec + '\'' +
", docid='" + docid + '\'' +
", sourceinfo=" + sourceinfo +
", picnews=" + picnews +
", title='" + title + '\'' +
", tid='" + tid + '\'' +
", template='" + template + '\'' +
", threadVote=" + threadVote +
", threadAgainst=" + threadAgainst +
", replyBoard='" + replyBoard + '\'' +
", source='" + source + '\'' +
", hasNext=" + hasNext +
", voicecomment='" + voicecomment + '\'' +
", ptime='" + ptime + '\'' +
", users=" + users +
", ydbaike=" + ydbaike +
", link=" + link +
", img=" + img +
", votes=" + votes +
", topiclist_news=" + topiclist_news +
", topiclist=" + topiclist +
", askbar=" + askbar +
", autoRecomends=" + autoRecomends +
", boboList=" + boboList +
", huati=" + huati +
'}';
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsPhotoDetail.java
================================================
package com.lvr.livecircle.news.model.bean;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.List;
/**
* Created by lvr on 2017/2/11.
*/
public class NewsPhotoDetail implements Parcelable{
private String title;
private List<Picture> pictures;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<Picture> getPictures() {
return pictures;
}
public void setPictures(List<Picture> pictures) {
this.pictures = pictures;
}
public static class Picture implements Parcelable {
private String title;
public String getImgSrc() {
return imgSrc;
}
public void setImgSrc(String imgSrc) {
this.imgSrc = imgSrc;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
private String imgSrc;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.title);
dest.writeString(this.imgSrc);
}
public Picture() {
}
protected Picture(Parcel in) {
this.title = in.readString();
this.imgSrc = in.readString();
}
public static final Creator<Picture> CREATOR = new Creator<Picture>() {
@Override
public Picture createFromParcel(Parcel source) {
return new Picture(source);
}
@Override
public Picture[] newArray(int size) {
return new Picture[size];
}
};
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.title);
dest.writeList(this.pictures);
}
public NewsPhotoDetail() {
}
protected NewsPhotoDetail(Parcel in) {
this.title = in.readString();
this.pictures = new ArrayList<>();
in.readList(this.pictures, Picture.class.getClassLoader());
}
public static final Parcelable.Creator<NewsPhotoDetail> CREATOR = new Parcelable.Creator<NewsPhotoDetail>() {
@Override
public NewsPhotoDetail createFromParcel(Parcel source) {
return new NewsPhotoDetail(source);
}
@Override
public NewsPhotoDetail[] newArray(int size) {
return new NewsPhotoDetail[size];
}
};
@Override
public String toString() {
return "NewsPhotoDetail{" +
"title='" + title + '\'' +
", pictures=" + pictures +
'}';
}
}
================================================
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsChannelModelImpl.java
================================================
package com.lvr.livecircle.news.model.impl;
import com.lvr.livecircle.app.AppApplication;
import com.lvr.livecircle.app.AppConstant;
import com.lvr.livecircle.client.RetrofitClient;
import com.lvr.livecircle.news.db.NewsChannelTableManager;
import com.lvr.livecircle.news.model.NewsChannelModel;
import com.lvr.livecircle.news.model.bean.NewsChannelTable;
import com.lvr.livecircle.utils.ACache;
import java.util.ArrayList;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
/**
* Created by lvr on 2017/2/14.
*/
public class NewsChannelModel
gitextract_6rcgjzff/ ├── LiveCircle/ │ ├── .gitignore │ ├── .idea/ │ │ ├── compiler.xml │ │ ├── copyright/ │ │ │ └── profiles_settings.xml │ │ ├── encodings.xml │ │ ├── gradle.xml │ │ ├── inspectionProfiles/ │ │ │ ├── Project_Default.xml │ │ │ └── profiles_settings.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ └── runConfigurations.xml │ ├── app/ │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src/ │ │ ├── androidTest/ │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── lvr/ │ │ │ └── livecircle/ │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── lvr/ │ │ │ │ └── livecircle/ │ │ │ │ ├── adapter/ │ │ │ │ │ ├── CardAdapter.java │ │ │ │ │ ├── HomeViewPagerAdapter.java │ │ │ │ │ ├── NewsChannelAdapter.java │ │ │ │ │ ├── NewsChannelGridAdapter.java │ │ │ │ │ ├── NewsListAdapter.java │ │ │ │ │ ├── OnNewsChannelListener.java │ │ │ │ │ └── PhotoListAdapter.java │ │ │ │ ├── api/ │ │ │ │ │ ├── ApiConstants.java │ │ │ │ │ ├── ApiService.java │ │ │ │ │ └── HostType.java │ │ │ │ ├── app/ │ │ │ │ │ ├── AppApplication.java │ │ │ │ │ ├── AppConstant.java │ │ │ │ │ └── AppManager.java │ │ │ │ ├── base/ │ │ │ │ │ ├── BaseActivity.java │ │ │ │ │ ├── BaseApplication.java │ │ │ │ │ ├── BaseFragment.java │ │ │ │ │ └── BaseFragmentAdapter.java │ │ │ │ ├── bean/ │ │ │ │ │ ├── ChannelBean.java │ │ │ │ │ ├── FabScrollBean.java │ │ │ │ │ ├── HeaderBean.java │ │ │ │ │ └── NewsInfo.java │ │ │ │ ├── client/ │ │ │ │ │ ├── BaseApiService.java │ │ │ │ │ ├── BaseInterceptor.java │ │ │ │ │ ├── BaseObserver.java │ │ │ │ │ ├── BaseResponse.java │ │ │ │ │ ├── CaheInterceptor.java │ │ │ │ │ ├── ExceptionHandle.java │ │ │ │ │ ├── IpResult.java │ │ │ │ │ ├── NetworkUtil.java │ │ │ │ │ ├── RetrofitClient.java │ │ │ │ │ └── RxDisposeManager.java │ │ │ │ ├── find/ │ │ │ │ │ └── FindFragment.java │ │ │ │ ├── home/ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── SplashActivity.java │ │ │ │ ├── meitu/ │ │ │ │ │ ├── MeiTuFragment.java │ │ │ │ │ ├── model/ │ │ │ │ │ │ ├── PhotoModel.java │ │ │ │ │ │ ├── bean/ │ │ │ │ │ │ │ ├── GirlData.java │ │ │ │ │ │ │ └── PhotoGirl.java │ │ │ │ │ │ └── impl/ │ │ │ │ │ │ └── PhotoModelImpl.java │ │ │ │ │ ├── presenter/ │ │ │ │ │ │ ├── PhotoPresenter.java │ │ │ │ │ │ └── impl/ │ │ │ │ │ │ └── PhotoPresenterImpl.java │ │ │ │ │ └── view/ │ │ │ │ │ └── PhotoView.java │ │ │ │ ├── music/ │ │ │ │ │ └── MusicFragment.java │ │ │ │ ├── nearby/ │ │ │ │ │ └── NearByFragment.java │ │ │ │ ├── news/ │ │ │ │ │ ├── activity/ │ │ │ │ │ │ ├── NewsChannelActivity.java │ │ │ │ │ │ ├── NewsDetailActivity.java │ │ │ │ │ │ └── NewsPhotoDetailActivity.java │ │ │ │ │ ├── db/ │ │ │ │ │ │ └── NewsChannelTableManager.java │ │ │ │ │ ├── fragment/ │ │ │ │ │ │ └── NewsFragment.java │ │ │ │ │ ├── model/ │ │ │ │ │ │ ├── NewsChannelModel.java │ │ │ │ │ │ ├── NewsDetailModel.java │ │ │ │ │ │ ├── NewsModel.java │ │ │ │ │ │ ├── bean/ │ │ │ │ │ │ │ ├── NewsChannelTable.java │ │ │ │ │ │ │ ├── NewsDetail.java │ │ │ │ │ │ │ └── NewsPhotoDetail.java │ │ │ │ │ │ └── impl/ │ │ │ │ │ │ ├── NewsChannelModelImpl.java │ │ │ │ │ │ ├── NewsDetailModelImpl.java │ │ │ │ │ │ └── NewsModelImpl.java │ │ │ │ │ ├── presenter/ │ │ │ │ │ │ ├── NewPresenter.java │ │ │ │ │ │ ├── NewsChannelPresenter.java │ │ │ │ │ │ ├── NewsDetailPresenter.java │ │ │ │ │ │ └── impl/ │ │ │ │ │ │ ├── NewsChannelPresenterImpl.java │ │ │ │ │ │ ├── NewsDetailPresenterImpl.java │ │ │ │ │ │ └── NewsPresenterImpl.java │ │ │ │ │ └── view/ │ │ │ │ │ ├── NewsChannelView.java │ │ │ │ │ ├── NewsDetailView.java │ │ │ │ │ └── NewsView.java │ │ │ │ ├── recommend/ │ │ │ │ │ └── RecommendFragment.java │ │ │ │ ├── recycleviewcardgallery/ │ │ │ │ │ ├── CardAdapterHelper.java │ │ │ │ │ ├── CardLinearSnapHelper.java │ │ │ │ │ ├── CardScaleHelper.java │ │ │ │ │ └── SpeedRecyclerView.java │ │ │ │ ├── utils/ │ │ │ │ │ ├── ACache.java │ │ │ │ │ ├── CollectionUtils.java │ │ │ │ │ ├── DisplayUtil.java │ │ │ │ │ ├── GlideRoundTransformUtil.java │ │ │ │ │ ├── ImageLoaderUtils.java │ │ │ │ │ ├── StatusBarSetting.java │ │ │ │ │ ├── TUtil.java │ │ │ │ │ ├── TimeUtil.java │ │ │ │ │ └── ToastUitl.java │ │ │ │ ├── video/ │ │ │ │ │ └── VideoFragment.java │ │ │ │ └── widget/ │ │ │ │ ├── ClassicRefreshHeaderView.java │ │ │ │ ├── ItemDragHelperCallback.java │ │ │ │ ├── LoadMoreFooterView.java │ │ │ │ ├── LoadingDialog.java │ │ │ │ ├── LoadingTip.java │ │ │ │ ├── ScrollAwareFABBehavior.java │ │ │ │ ├── StatusBarView.java │ │ │ │ └── URLImageGetter.java │ │ │ └── res/ │ │ │ ├── anim/ │ │ │ │ ├── act_fade_in_center.xml │ │ │ │ ├── act_fade_out_center.xml │ │ │ │ ├── fade_in.xml │ │ │ │ ├── fade_out.xml │ │ │ │ ├── rotate_down.xml │ │ │ │ ├── rotate_up.xml │ │ │ │ ├── slide_in_left.xml │ │ │ │ ├── slide_in_right.xml │ │ │ │ ├── slide_out_left.xml │ │ │ │ └── slide_out_right.xml │ │ │ ├── drawable/ │ │ │ │ ├── loading_dialog_progressbar.xml │ │ │ │ ├── selector_gray.xml │ │ │ │ ├── shape_loading_dialog.xml │ │ │ │ └── tv_rounded_corners.xml │ │ │ ├── layout/ │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_news_channel.xml │ │ │ │ ├── activity_news_detail.xml │ │ │ │ ├── activity_news_photo_detail.xml │ │ │ │ ├── activty_splash.xml │ │ │ │ ├── app_bar.xml │ │ │ │ ├── dialog_loading.xml │ │ │ │ ├── dialog_loading_tip.xml │ │ │ │ ├── fragment_find.xml │ │ │ │ ├── fragment_meitu.xml │ │ │ │ ├── fragment_music.xml │ │ │ │ ├── fragment_nearby.xml │ │ │ │ ├── fragment_news.xml │ │ │ │ ├── fragment_recommend.xml │ │ │ │ ├── fragment_video.xml │ │ │ │ ├── item_card_view.xml │ │ │ │ ├── item_channel_card.xml │ │ │ │ ├── item_content_news_detail.xml │ │ │ │ ├── item_foot_view.xml │ │ │ │ ├── item_grid_news_channel.xml │ │ │ │ ├── item_header_view.xml │ │ │ │ ├── item_news.xml │ │ │ │ ├── item_news_header.xml │ │ │ │ ├── item_news_photo.xml │ │ │ │ ├── item_photo_girl.xml │ │ │ │ ├── layout_irecyclerview_classic_refresh_header_view.xml │ │ │ │ ├── layout_irecyclerview_load_more_footer.xml │ │ │ │ ├── layout_irecyclerview_load_more_footer_error_view.xml │ │ │ │ ├── layout_irecyclerview_load_more_footer_loading_view.xml │ │ │ │ ├── layout_irecyclerview_load_more_footer_the_end_view.xml │ │ │ │ ├── layout_irecyclerview_load_more_footer_view.xml │ │ │ │ ├── layout_irecyclerview_refresh_header.xml │ │ │ │ ├── toast_custom.xml │ │ │ │ └── view_nav.xml │ │ │ ├── menu/ │ │ │ │ ├── menu_nav.xml │ │ │ │ └── menu_toolabr.xml │ │ │ ├── values/ │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── ids.xml │ │ │ │ ├── news_channel_info.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v19/ │ │ │ │ └── dimens.xml │ │ │ └── values-w820dp/ │ │ │ └── dimens.xml │ │ └── test/ │ │ └── java/ │ │ └── com/ │ │ └── lvr/ │ │ └── livecircle/ │ │ └── ExampleUnitTest.java │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradle.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle └── README.md
SYMBOL INDEX (1009 symbols across 92 files)
FILE: LiveCircle/app/src/androidTest/java/com/lvr/livecircle/ExampleInstrumentedTest.java
class ExampleInstrumentedTest (line 17) | @RunWith(AndroidJUnit4.class)
method useAppContext (line 19) | @Test
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/CardAdapter.java
class CardAdapter (line 22) | public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHo...
method CardAdapter (line 26) | public CardAdapter(Context context,List<NewsPhotoDetail.Picture> mList) {
method onCreateViewHolder (line 31) | @Override
method onBindViewHolder (line 38) | @Override
method getItemCount (line 44) | @Override
class ViewHolder (line 49) | public class ViewHolder extends RecyclerView.ViewHolder {
method ViewHolder (line 52) | public ViewHolder(final View itemView) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/HomeViewPagerAdapter.java
class HomeViewPagerAdapter (line 14) | public class HomeViewPagerAdapter extends BaseFragmentAdapter {
method HomeViewPagerAdapter (line 15) | public HomeViewPagerAdapter(FragmentManager fm, List<Fragment> fragmen...
method HomeViewPagerAdapter (line 19) | public HomeViewPagerAdapter(FragmentManager fm, List<Fragment> fragmen...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelAdapter.java
class NewsChannelAdapter (line 28) | public class NewsChannelAdapter extends RecyclerView.Adapter<NewsChannel...
method NewsChannelAdapter (line 35) | public NewsChannelAdapter(Context context, List<NewsChannelTable> tabl...
method setItemDragHelperCallback (line 41) | public void setItemDragHelperCallback(ItemDragHelperCallback itemDragH...
method setOnItemClickListener (line 45) | public void setOnItemClickListener(OnItemClickListener onItemClickList...
method onCreateViewHolder (line 49) | @Override
method onBindViewHolder (line 54) | @Override
method handleOnClick (line 64) | private void handleOnClick(final ChannelViewHolder holder, final NewsC...
method handleLongPress (line 80) | private void handleLongPress(ChannelViewHolder holder, final NewsChann...
method getItemCount (line 92) | @Override
method onItemMove (line 97) | @Override
method isChannelFixed (line 112) | private boolean isChannelFixed(int fromPosition, int toPosition) {
class ChannelViewHolder (line 116) | public class ChannelViewHolder extends RecyclerView.ViewHolder {
method ChannelViewHolder (line 122) | public ChannelViewHolder(View itemView) {
method getAdapterData (line 131) | public List<NewsChannelTable> getAdapterData() {
type OnItemClickListener (line 136) | public interface OnItemClickListener {
method onItemClick (line 137) | void onItemClick(View view, int position);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelGridAdapter.java
class NewsChannelGridAdapter (line 20) | public class NewsChannelGridAdapter extends BaseAdapter {
method NewsChannelGridAdapter (line 25) | public NewsChannelGridAdapter(List<NewsChannelTable> mTables, Context ...
method getCount (line 31) | @Override
method getItem (line 36) | @Override
method getItemId (line 41) | @Override
method getView (line 46) | @Override
class ViewHolder (line 65) | public static class ViewHolder {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsListAdapter.java
class NewsListAdapter (line 37) | public class NewsListAdapter extends RecyclerView.Adapter<RecyclerView.V...
method NewsListAdapter (line 53) | public NewsListAdapter(Context context, List<NewsInfo> list, List<News...
method getItemViewType (line 60) | @Override
method onCreateViewHolder (line 74) | @Override
method onBindViewHolder (line 88) | @Override
method setHeaderItemValues (line 103) | private void setHeaderItemValues(HeaderViewHolder holder) {
method getItemCount (line 116) | @Override
method setNormalItemValues (line 122) | private void setNormalItemValues(final SingleViewHolder holder, int po...
method setMultiItemValues (line 141) | private void setMultiItemValues(MultiViewHolder holder, int position) {
method getPhotoDetail (line 156) | private NewsPhotoDetail getPhotoDetail(NewsInfo info) {
method setPictures (line 163) | private void setPictures(NewsInfo info, NewsPhotoDetail detail) {
method setValuesAndAddToList (line 180) | private void setValuesAndAddToList(List<NewsPhotoDetail.Picture> list,...
method setImageView (line 191) | private void setImageView(MultiViewHolder holder, NewsInfo newsInfo) {
method setPhotoImageView (line 249) | private void setPhotoImageView(MultiViewHolder holder, String left, St...
class SingleViewHolder (line 273) | public class SingleViewHolder extends RecyclerView.ViewHolder{
method SingleViewHolder (line 279) | public SingleViewHolder(View itemView) {
class MultiViewHolder (line 290) | public class MultiViewHolder extends RecyclerView.ViewHolder{
method MultiViewHolder (line 299) | public MultiViewHolder(View itemView) {
class HeaderViewHolder (line 313) | public class HeaderViewHolder extends RecyclerView.ViewHolder{
method HeaderViewHolder (line 315) | public HeaderViewHolder(View itemView) {
method setNewsChannelListener (line 334) | public void setNewsChannelListener(OnNewsChannelListener listener){
method getAdapterData (line 338) | public List<NewsInfo> getAdapterData(){
method setTables (line 341) | public void setTables(List<NewsChannelTable> list){
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/OnNewsChannelListener.java
type OnNewsChannelListener (line 9) | public interface OnNewsChannelListener {
method changeChannelListener (line 10) | void changeChannelListener(NewsChannelTable newsChannelTable);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/PhotoListAdapter.java
class PhotoListAdapter (line 20) | public class PhotoListAdapter extends RecyclerView.Adapter<PhotoListAdap...
method PhotoListAdapter (line 24) | public PhotoListAdapter(Context context, List<PhotoGirl> list) {
method onCreateViewHolder (line 31) | @Override
method onBindViewHolder (line 36) | @Override
method getItemCount (line 41) | @Override
class PhotoViewHolder (line 45) | public class PhotoViewHolder extends RecyclerView.ViewHolder{
method PhotoViewHolder (line 47) | public PhotoViewHolder(View itemView) {
method getAdapterData (line 53) | public List<PhotoGirl> getAdapterData(){
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiConstants.java
class ApiConstants (line 19) | public class ApiConstants {
method getType (line 69) | public static String getType(String id) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiService.java
type ApiService (line 21) | public interface ApiService {
method getNewsList (line 24) | @GET("{type}/{id}/{startPage}-20.html")
method getNewDetail (line 29) | @GET("{postId}/full.html")
method getNewsBodyHtmlPhoto (line 32) | @GET
method getPhotoList (line 35) | @GET("{size}/{page}")
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/api/HostType.java
class HostType (line 19) | public class HostType {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppApplication.java
class AppApplication (line 8) | public class AppApplication extends BaseApplication {
method onCreate (line 9) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppConstant.java
class AppConstant (line 4) | public class AppConstant {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppManager.java
class AppManager (line 13) | public class AppManager {
method AppManager (line 17) | private AppManager() {
method getAppManager (line 23) | public static AppManager getAppManager() {
method addActivity (line 39) | public void addActivity(Activity activity) {
method currentActivity (line 49) | public Activity currentActivity() {
method preActivity (line 62) | public Activity preActivity() {
method finishActivity (line 74) | public void finishActivity() {
method finishActivity (line 82) | public void finishActivity(Activity activity) {
method removeActivity (line 93) | public void removeActivity(Activity activity) {
method finishActivity (line 103) | public void finishActivity(Class<?> cls) {
method finishAllActivity (line 119) | public void finishAllActivity() {
method returnToActivity (line 133) | public void returnToActivity(Class<?> cls) {
method isOpenActivity (line 148) | public boolean isOpenActivity(Class<?> cls) {
method AppExit (line 165) | public void AppExit(Context context, Boolean isBackground) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseActivity.java
class BaseActivity (line 24) | public abstract class BaseActivity extends AppCompatActivity {
method onCreate (line 30) | @Override
method doBeforeSetcontentView (line 47) | private void doBeforeSetcontentView() {
method getLayoutId (line 62) | public abstract int getLayoutId();
method initPresenter (line 65) | public abstract void initPresenter();
method initView (line 68) | public abstract void initView();
method SetStatusBarColor (line 73) | protected void SetStatusBarColor() {
method SetStatusBarColor (line 80) | protected void SetStatusBarColor(int color) {
method SetTranslanteBar (line 87) | protected void SetTranslanteBar() {
method startActivity (line 95) | public void startActivity(Class<?> cls) {
method startActivityForResult (line 102) | public void startActivityForResult(Class<?> cls, int requestCode) {
method startActivityForResult (line 109) | public void startActivityForResult(Class<?> cls, Bundle bundle,
method startActivity (line 122) | public void startActivity(Class<?> cls, Bundle bundle) {
method startProgressDialog (line 134) | public void startProgressDialog() {
method startProgressDialog (line 146) | public void startProgressDialog(String msg) {
method stopProgressDialog (line 156) | public void stopProgressDialog() {
method showShortToast (line 167) | public void showShortToast(String text) {
method showShortToast (line 174) | public void showShortToast(int resId) {
method showLongToast (line 181) | public void showLongToast(int resId) {
method showLongToast (line 188) | public void showLongToast(String text) {
method showToastWithImg (line 198) | public void showToastWithImg(String text, int res) {
method showNetErrorTip (line 205) | public void showNetErrorTip() {
method showNetErrorTip (line 209) | public void showNetErrorTip(String error) {
method onResume (line 213) | @Override
method onPause (line 219) | @Override
method onDestroy (line 226) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseApplication.java
class BaseApplication (line 10) | public class BaseApplication extends Application {
method onCreate (line 14) | @Override
method getAppContext (line 20) | public static Context getAppContext() {
method getAppResources (line 23) | public static Resources getAppResources() {
method onTerminate (line 26) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragment.java
class BaseFragment (line 18) | public abstract class BaseFragment extends Fragment {
method onCreateView (line 28) | @Nullable
method getLayoutResource (line 43) | protected abstract int getLayoutResource();
method initView (line 47) | protected abstract void initView();
method startActivity (line 53) | public void startActivity(Class<?> cls) {
method startActivityForResult (line 60) | public void startActivityForResult(Class<?> cls, int requestCode) {
method startActivityForResult (line 67) | public void startActivityForResult(Class<?> cls, Bundle bundle,
method startActivity (line 80) | public void startActivity(Class<?> cls, Bundle bundle) {
method setUserVisibleHint (line 89) | @Override
method startProgressDialog (line 113) | public void startProgressDialog() {
method startProgressDialog (line 125) | public void startProgressDialog(String msg) {
method stopProgressDialog (line 133) | public void stopProgressDialog() {
method showShortToast (line 145) | public void showShortToast(String text) {
method showShortToast (line 152) | public void showShortToast(int resId) {
method showLongToast (line 159) | public void showLongToast(int resId) {
method showLongToast (line 166) | public void showLongToast(String text) {
method showToastWithImg (line 171) | public void showToastWithImg(String text, int res) {
method showNetErrorTip (line 178) | public void showNetErrorTip() {
method showNetErrorTip (line 182) | public void showNetErrorTip(String error) {
method showLoading (line 186) | public void showLoading() {
method stopLoading (line 190) | public void stopLoading() {
method onDestroyView (line 194) | @Override
method onFragmentVisibleChange (line 208) | protected void onFragmentVisibleChange(boolean isVisible) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragmentAdapter.java
class BaseFragmentAdapter (line 12) | public class BaseFragmentAdapter extends FragmentPagerAdapter {
method BaseFragmentAdapter (line 17) | public BaseFragmentAdapter(FragmentManager fm, List<Fragment> fragment...
method BaseFragmentAdapter (line 22) | public BaseFragmentAdapter(FragmentManager fm, List<Fragment> fragment...
method getPageTitle (line 28) | @Override
method getItem (line 33) | @Override
method getCount (line 38) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/ChannelBean.java
class ChannelBean (line 12) | public class ChannelBean {
method ChannelBean (line 16) | public ChannelBean(List<NewsChannelTable> list) {
method getList (line 21) | public List<NewsChannelTable> getList() {
method setList (line 26) | public void setList(List<NewsChannelTable> list) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/FabScrollBean.java
class FabScrollBean (line 7) | public class FabScrollBean {
method getPosition (line 10) | public int getPosition() {
method setPosition (line 14) | public void setPosition(int position) {
method FabScrollBean (line 21) | public FabScrollBean(String scrollMsg,int position) {
method getScrollMsg (line 26) | public String getScrollMsg() {
method setScrollMsg (line 30) | public void setScrollMsg(String scrollMsg) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/HeaderBean.java
class HeaderBean (line 11) | public class HeaderBean {
method HeaderBean (line 14) | public HeaderBean(List<NewsChannelTable> list) {
method getList (line 18) | public List<NewsChannelTable> getList() {
method setList (line 22) | public void setList(List<NewsChannelTable> list) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/bean/NewsInfo.java
class NewsInfo (line 13) | public class NewsInfo implements Parcelable {
method getPostid (line 79) | public String getPostid() {
method setPostid (line 83) | public void setPostid(String postid) {
method isHasCover (line 87) | public boolean isHasCover() {
method setHasCover (line 91) | public void setHasCover(boolean hasCover) {
method getHasHead (line 95) | public int getHasHead() {
method setHasHead (line 99) | public void setHasHead(int hasHead) {
method getReplyCount (line 103) | public int getReplyCount() {
method setReplyCount (line 107) | public void setReplyCount(int replyCount) {
method getHasImg (line 111) | public int getHasImg() {
method setHasImg (line 115) | public void setHasImg(int hasImg) {
method getDigest (line 119) | public String getDigest() {
method setDigest (line 123) | public void setDigest(String digest) {
method isHasIcon (line 127) | public boolean isHasIcon() {
method setHasIcon (line 131) | public void setHasIcon(boolean hasIcon) {
method getDocid (line 135) | public String getDocid() {
method setDocid (line 139) | public void setDocid(String docid) {
method getTitle (line 143) | public String getTitle() {
method setTitle (line 147) | public void setTitle(String title) {
method getOrder (line 151) | public int getOrder() {
method setOrder (line 155) | public void setOrder(int order) {
method getPriority (line 159) | public int getPriority() {
method setPriority (line 163) | public void setPriority(int priority) {
method getLmodify (line 167) | public String getLmodify() {
method setLmodify (line 171) | public void setLmodify(String lmodify) {
method getBoardid (line 175) | public String getBoardid() {
method setBoardid (line 179) | public void setBoardid(String boardid) {
method getPhotosetID (line 183) | public String getPhotosetID() {
method setPhotosetID (line 187) | public void setPhotosetID(String photosetID) {
method getImgsum (line 191) | public int getImgsum() {
method setImgsum (line 195) | public void setImgsum(int imgsum) {
method getTopic_background (line 199) | public String getTopic_background() {
method setTopic_background (line 203) | public void setTopic_background(String topic_background) {
method getTemplate (line 207) | public String getTemplate() {
method setTemplate (line 211) | public void setTemplate(String template) {
method getVotecount (line 215) | public int getVotecount() {
method setVotecount (line 219) | public void setVotecount(int votecount) {
method getSkipID (line 223) | public String getSkipID() {
method setSkipID (line 227) | public void setSkipID(String skipID) {
method getAlias (line 231) | public String getAlias() {
method setAlias (line 235) | public void setAlias(String alias) {
method getSkipType (line 239) | public String getSkipType() {
method setSkipType (line 243) | public void setSkipType(String skipType) {
method getCid (line 247) | public String getCid() {
method setCid (line 251) | public void setCid(String cid) {
method getHasAD (line 255) | public int getHasAD() {
method setHasAD (line 259) | public void setHasAD(int hasAD) {
method getSource (line 263) | public String getSource() {
method setSource (line 267) | public void setSource(String source) {
method getEname (line 271) | public String getEname() {
method setEname (line 275) | public void setEname(String ename) {
method getTname (line 279) | public String getTname() {
method setTname (line 283) | public void setTname(String tname) {
method getImgsrc (line 287) | public String getImgsrc() {
method setImgsrc (line 291) | public void setImgsrc(String imgsrc) {
method getPtime (line 295) | public String getPtime() {
method setPtime (line 299) | public void setPtime(String ptime) {
method getAds (line 303) | public List<AdsBean> getAds() {
method setAds (line 307) | public void setAds(List<AdsBean> ads) {
method getImgextra (line 311) | public List<ImgextraBean> getImgextra() {
method setImgextra (line 315) | public void setImgextra(List<ImgextraBean> imgextra) {
class AdsBean (line 319) | public static class AdsBean {
method getTitle (line 334) | public String getTitle() {
method setTitle (line 338) | public void setTitle(String title) {
method getTag (line 342) | public String getTag() {
method setTag (line 346) | public void setTag(String tag) {
method getImgsrc (line 350) | public String getImgsrc() {
method setImgsrc (line 354) | public void setImgsrc(String imgsrc) {
method getSubtitle (line 358) | public String getSubtitle() {
method setSubtitle (line 362) | public void setSubtitle(String subtitle) {
method getUrl (line 366) | public String getUrl() {
method setUrl (line 370) | public void setUrl(String url) {
class ImgextraBean (line 375) | public static class ImgextraBean {
method getImgsrc (line 382) | public String getImgsrc() {
method setImgsrc (line 386) | public void setImgsrc(String imgsrc) {
method describeContents (line 391) | @Override
method writeToParcel (line 396) | @Override
method NewsInfo (line 430) | public NewsInfo() {
method NewsInfo (line 433) | protected NewsInfo(Parcel in) {
method createFromParcel (line 469) | @Override
method newArray (line 474) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseApiService.java
type BaseApiService (line 19) | public interface BaseApiService<T> {
method executeGet (line 25) | @GET("{url}")
method executePost (line 30) | @POST("{url}")
method json (line 35) | @POST("{url}")
method upLoadFile (line 40) | @Multipart
method uploadFiles (line 46) | @POST("{url}")
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseInterceptor.java
class BaseInterceptor (line 11) | public class BaseInterceptor implements Interceptor {
method BaseInterceptor (line 13) | public BaseInterceptor(Map<String, String> headers) {
method intercept (line 17) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseObserver.java
class BaseObserver (line 11) | public abstract class BaseObserver<T> implements Observer<T> {
method BaseObserver (line 13) | public BaseObserver(Context context) {
method onError (line 16) | @Override
method onSubscribe (line 28) | @Override
method hideDialog (line 37) | protected abstract void hideDialog();
method showDialog (line 39) | protected abstract void showDialog();
method onComplete (line 41) | @Override
method onError (line 50) | public abstract void onError(ExceptionHandle.ResponeThrowable e);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseResponse.java
class BaseResponse (line 5) | public class BaseResponse<T> {
method getCode (line 11) | public int getCode() {
method setCode (line 15) | public void setCode(int code) {
method getMsg (line 19) | public String getMsg() {
method setMsg (line 23) | public void setMsg(String msg) {
method getData (line 27) | public T getData() {
method setData (line 31) | public void setData(T data) {
method isOk (line 35) | public boolean isOk() {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/CaheInterceptor.java
class CaheInterceptor (line 13) | public class CaheInterceptor implements Interceptor {
method CaheInterceptor (line 17) | public CaheInterceptor(Context context) {
method intercept (line 21) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/ExceptionHandle.java
class ExceptionHandle (line 14) | public class ExceptionHandle {
method handleException (line 25) | public static ResponeThrowable handleException(Throwable e) {
class ERROR (line 83) | class ERROR {
class ResponeThrowable (line 112) | public static class ResponeThrowable extends Exception {
method ResponeThrowable (line 116) | public ResponeThrowable(Throwable throwable, int code) {
class ServerException (line 123) | public class ServerException extends RuntimeException {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/IpResult.java
class IpResult (line 4) | public class IpResult {
method getCountry (line 20) | public String getCountry() {
method setCountry (line 24) | public void setCountry(String country) {
method getCountry_id (line 28) | public String getCountry_id() {
method setCountry_id (line 32) | public void setCountry_id(String country_id) {
method getArea (line 36) | public String getArea() {
method setArea (line 40) | public void setArea(String area) {
method getArea_id (line 44) | public String getArea_id() {
method setArea_id (line 48) | public void setArea_id(String area_id) {
method getRegion (line 52) | public String getRegion() {
method setRegion (line 56) | public void setRegion(String region) {
method getRegion_id (line 60) | public String getRegion_id() {
method setRegion_id (line 64) | public void setRegion_id(String region_id) {
method getCity (line 68) | public String getCity() {
method setCity (line 72) | public void setCity(String city) {
method getCity_id (line 76) | public String getCity_id() {
method setCity_id (line 80) | public void setCity_id(String city_id) {
method getCounty (line 84) | public String getCounty() {
method setCounty (line 88) | public void setCounty(String county) {
method getCounty_id (line 92) | public String getCounty_id() {
method setCounty_id (line 96) | public void setCounty_id(String county_id) {
method getIsp (line 100) | public String getIsp() {
method setIsp (line 104) | public void setIsp(String isp) {
method getIsp_id (line 108) | public String getIsp_id() {
method setIsp_id (line 112) | public void setIsp_id(String isp_id) {
method getIp (line 116) | public String getIp() {
method setIp (line 120) | public void setIp(String ip) {
method toString (line 124) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/NetworkUtil.java
class NetworkUtil (line 16) | public class NetworkUtil {
method isNetworkAvailable (line 30) | public static boolean isNetworkAvailable(Context context) {
method getLocalIpAddress (line 45) | public static String getLocalIpAddress() {
method getNetState (line 69) | public static int getNetState(Context context) {
method connectionNetwork (line 96) | static private boolean connectionNetwork() {
method is3G (line 120) | public static boolean is3G(Context context) {
method isWifi (line 136) | public static boolean isWifi(Context context) {
method is2G (line 152) | public static boolean is2G(Context context) {
method isWifiEnabled (line 168) | public static boolean isWifiEnabled(Context context) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/RetrofitClient.java
class RetrofitClient (line 32) | public class RetrofitClient {
class SingletonHolder (line 60) | private static class SingletonHolder {
method getInstance (line 64) | public static RetrofitClient getInstance(Context context) {
method getInstance (line 72) | public static RetrofitClient getInstance(Context context, String url) {
method getInstance (line 81) | public static RetrofitClient getInstance(Context context, String url, ...
method RetrofitClient (line 88) | private RetrofitClient() {
method RetrofitClient (line 92) | private RetrofitClient(Context context) {
method RetrofitClient (line 97) | private RetrofitClient(Context context, String url) {
method RetrofitClient (line 102) | private RetrofitClient(Context context, String url, Map<String, String...
method get (line 141) | public void get(String url, Map parameters, Observer<?> observer) {
method post (line 148) | public void post(String url, Map<String, String> parameters, Observer...
method json (line 155) | public void json(String url, RequestBody jsonStr, Observer<ResponseBo...
method upload (line 163) | public void upload(String url, RequestBody requestBody, Observer<Respo...
method apply (line 171) | @Override
class ErrorTransformer (line 179) | private static class ErrorTransformer<T> implements ObservableTransfor...
method apply (line 181) | @Override
class HttpResponseFunc (line 189) | public static class HttpResponseFunc<T> implements Function<Throwable,...
method apply (line 190) | @Override
class HandleFuc (line 196) | public static class HandleFuc<T> implements Function<BaseResponse<T>, ...
method apply (line 197) | @Override
method createBaseApi (line 209) | public RetrofitClient createBaseApi() {
method create (line 218) | public <T> T create(final Class<T> service) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/client/RxDisposeManager.java
class RxDisposeManager (line 13) | public class RxDisposeManager {
method get (line 18) | public static RxDisposeManager get() {
method RxDisposeManager (line 30) | private RxDisposeManager() {
method add (line 35) | public void add(Object tag, Disposable disposable) {
method remove (line 40) | public void remove(Object tag) {
method removeAll (line 46) | public void removeAll() {
method cancel (line 53) | public void cancel(Object tag) {
method cancelAll (line 66) | public void cancelAll() {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/find/FindFragment.java
class FindFragment (line 10) | public class FindFragment extends BaseFragment {
method getLayoutResource (line 11) | @Override
method initView (line 18) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/home/MainActivity.java
class MainActivity (line 40) | public class MainActivity extends BaseActivity {
method getLayoutId (line 67) | @Override
method initPresenter (line 72) | @Override
method initView (line 77) | @Override
method onCreate (line 112) | @Override
method setViewPager (line 123) | private void setViewPager() {
method onSaveInstanceState (line 130) | @Override
method initFragment (line 162) | private void initFragment(Bundle savedInstanceState) {
method setNavigationView (line 193) | private void setNavigationView() {
method setToolBar (line 203) | private void setToolBar() {
method startAction (line 225) | public static void startAction(Activity activity) {
method onCreateOptionsMenu (line 232) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/home/SplashActivity.java
class SplashActivity (line 20) | public class SplashActivity extends BaseActivity {
method getLayoutId (line 26) | @Override
method initPresenter (line 31) | @Override
method initView (line 36) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/MeiTuFragment.java
class MeiTuFragment (line 30) | public class MeiTuFragment extends BaseFragment implements PhotoView, On...
method getLayoutResource (line 40) | @Override
method onFragmentVisibleChange (line 45) | @Override
method initView (line 58) | @Override
method onFabScrollEvent (line 74) | @Subscribe
method returnPhotoList (line 81) | @Override
method showErrorTip (line 108) | @Override
method onLoadMore (line 115) | @Override
method onRefresh (line 122) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/PhotoModel.java
type PhotoModel (line 13) | public interface PhotoModel {
method getPhotoList (line 14) | Observable<List<PhotoGirl>> getPhotoList(int size, int page);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/GirlData.java
class GirlData (line 9) | public class GirlData {
method isError (line 19) | public boolean isError() {
method setError (line 23) | public void setError(boolean error) {
method getResults (line 27) | public List<PhotoGirl> getResults() {
method setResults (line 31) | public void setResults(List<PhotoGirl> results) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/PhotoGirl.java
class PhotoGirl (line 7) | public class PhotoGirl {
method get_id (line 31) | public String get_id() {
method set_id (line 35) | public void set_id(String _id) {
method getCreatedAt (line 39) | public String getCreatedAt() {
method setCreatedAt (line 43) | public void setCreatedAt(String createdAt) {
method getDesc (line 47) | public String getDesc() {
method setDesc (line 51) | public void setDesc(String desc) {
method getPublishedAt (line 55) | public String getPublishedAt() {
method setPublishedAt (line 59) | public void setPublishedAt(String publishedAt) {
method getSource (line 63) | public String getSource() {
method setSource (line 67) | public void setSource(String source) {
method getType (line 71) | public String getType() {
method setType (line 75) | public void setType(String type) {
method getUrl (line 79) | public String getUrl() {
method setUrl (line 83) | public void setUrl(String url) {
method isUsed (line 87) | public boolean isUsed() {
method setUsed (line 91) | public void setUsed(boolean used) {
method getWho (line 95) | public String getWho() {
method setWho (line 99) | public void setWho(String who) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/impl/PhotoModelImpl.java
class PhotoModelImpl (line 19) | public class PhotoModelImpl implements PhotoModel {
method getPhotoList (line 20) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/PhotoPresenter.java
type PhotoPresenter (line 7) | public interface PhotoPresenter {
method requestPhotoList (line 8) | void requestPhotoList(int size,int page);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/impl/PhotoPresenterImpl.java
class PhotoPresenterImpl (line 18) | public class PhotoPresenterImpl implements PhotoPresenter {
method PhotoPresenterImpl (line 23) | public PhotoPresenterImpl(MeiTuFragment mView) {
method requestPhotoList (line 28) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/view/PhotoView.java
type PhotoView (line 11) | public interface PhotoView {
method returnPhotoList (line 12) | void returnPhotoList(List<PhotoGirl> photoGirlList);
method showErrorTip (line 13) | void showErrorTip();
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/music/MusicFragment.java
class MusicFragment (line 10) | public class MusicFragment extends BaseFragment {
method getLayoutResource (line 11) | @Override
method initView (line 17) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/nearby/NearByFragment.java
class NearByFragment (line 10) | public class NearByFragment extends BaseFragment {
method getLayoutResource (line 11) | @Override
method initView (line 18) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsChannelActivity.java
class NewsChannelActivity (line 38) | public class NewsChannelActivity extends BaseActivity implements NewsCha...
method getLayoutId (line 50) | @Override
method initPresenter (line 55) | @Override
method initView (line 60) | @Override
method onChannelEvent (line 79) | @Subscribe
method startAction (line 91) | public static void startAction(Activity activity) {
method returnMineNewsChannels (line 99) | @Override
method returnMoreNewsChannels (line 125) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsDetailActivity.java
class NewsDetailActivity (line 44) | public class NewsDetailActivity extends BaseActivity implements NewsDeta...
method startAction (line 72) | public static void startAction(Context mContext, View view, String pos...
method getLayoutId (line 89) | @Override
method initPresenter (line 94) | @Override
method initView (line 99) | @Override
method returnNewsDetail (line 114) | @Override
method setNewsDetailBodyTv (line 130) | private void setNewsDetailBodyTv(final NewsDetail detail, final String...
method setBody (line 158) | private void setBody(NewsDetail detail, String body) {
method isShowBody (line 168) | private boolean isShowBody(String body, int total) {
method setNewsDetailPhotoIv (line 173) | private void setNewsDetailPhotoIv(String src) {
method setToolBarLayout (line 178) | private void setToolBarLayout(String title) {
method getImgSrcs (line 185) | private String getImgSrcs(NewsDetail newsDetail) {
method onDestroy (line 196) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsPhotoDetailActivity.java
class NewsPhotoDetailActivity (line 27) | public class NewsPhotoDetailActivity extends BaseActivity {
method startAction (line 46) | public static void startAction(Context context, NewsPhotoDetail mNewsP...
method getLayoutId (line 52) | @Override
method initPresenter (line 57) | @Override
method initView (line 62) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/db/NewsChannelTableManager.java
class NewsChannelTableManager (line 29) | public class NewsChannelTableManager {
method loadNewsChannelsMore (line 38) | public static List<NewsChannelTable> loadNewsChannelsMore() {
method loadNewsChannelsStatic (line 66) | public static List<NewsChannelTable> loadNewsChannelsStatic() {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/fragment/NewsFragment.java
class NewsFragment (line 32) | public class NewsFragment extends BaseFragment implements NewsView, Swip...
method getLayoutResource (line 53) | @Override
method initView (line 59) | @Override
method onFragmentVisibleChange (line 74) | @Override
method onFabScrollEvent (line 85) | @Subscribe
method onHeaderEvent (line 93) | @Subscribe
method setLoadMoreListener (line 98) | private void setLoadMoreListener() {
method returnNewsChannel (line 134) | @Override
method returnNewsList (line 148) | @Override
method addAllChannel (line 177) | private void addAllChannel() {
method showNetErrorTip (line 184) | @Override
method showLoading (line 191) | public void showLoading() {
method stopLoading (line 195) | public void stopLoading() {
method onRefresh (line 199) | @Override
method changeChannelListener (line 207) | @Override
method onDestroyView (line 219) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsChannelModel.java
type NewsChannelModel (line 14) | public interface NewsChannelModel {
method lodeMoreNewsChannels (line 15) | Observable<List<NewsChannelTable>> lodeMoreNewsChannels();
method swapDb (line 16) | Observable<String> swapDb(ArrayList<NewsChannelTable> newsChannelTable...
method updateDb (line 17) | Observable<String> updateDb(ArrayList<NewsChannelTable> mineChannelTab...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsDetailModel.java
type NewsDetailModel (line 11) | public interface NewsDetailModel {
method getDetailNews (line 12) | Observable<NewsDetail> getDetailNews(String postId);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsModel.java
type NewsModel (line 14) | public interface NewsModel {
method requestNewsChannels (line 15) | Observable<List<NewsChannelTable>> requestNewsChannels();
method requestNewsList (line 16) | Observable<NewsInfo> requestNewsList(String newsType, final String id,...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsChannelTable.java
class NewsChannelTable (line 6) | public class NewsChannelTable implements Serializable {
method NewsChannelTable (line 16) | public NewsChannelTable() {
method NewsChannelTable (line 18) | public NewsChannelTable(String newsChannelName) {
method NewsChannelTable (line 22) | public NewsChannelTable(String newsChannelName, String newsChannelId, ...
method isNewsChannelSelect (line 31) | public boolean isNewsChannelSelect() {
method setImgRes (line 35) | public void setImgRes(int imgRes) {
method getImgRes (line 39) | public int getImgRes() {
method getNewsChannelName (line 43) | public String getNewsChannelName() {
method setNewsChannelName (line 47) | public void setNewsChannelName(String newsChannelName) {
method getNewsChannelId (line 51) | public String getNewsChannelId() {
method setNewsChannelId (line 55) | public void setNewsChannelId(String newsChannelId) {
method getNewsChannelType (line 59) | public String getNewsChannelType() {
method setNewsChannelType (line 63) | public void setNewsChannelType(String newsChannelType) {
method getNewsChannelSelect (line 67) | public boolean getNewsChannelSelect() {
method setNewsChannelSelect (line 71) | public void setNewsChannelSelect(boolean newsChannelSelect) {
method getNewsChannelIndex (line 75) | public int getNewsChannelIndex() {
method setNewsChannelIndex (line 79) | public void setNewsChannelIndex(int newsChannelIndex) {
method getNewsChannelFixed (line 83) | public Boolean getNewsChannelFixed() {
method setNewsChannelFixed (line 87) | public void setNewsChannelFixed(Boolean newsChannelFixed) {
method toString (line 91) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsDetail.java
class NewsDetail (line 9) | public class NewsDetail {
method getBody (line 77) | public String getBody() {
method setBody (line 81) | public void setBody(String body) {
method getReplyCount (line 85) | public int getReplyCount() {
method setReplyCount (line 89) | public void setReplyCount(int replyCount) {
method getShareLink (line 93) | public String getShareLink() {
method setShareLink (line 97) | public void setShareLink(String shareLink) {
method getDigest (line 101) | public String getDigest() {
method setDigest (line 105) | public void setDigest(String digest) {
method getExtraCard (line 109) | public ExtraCardBean getExtraCard() {
method setExtraCard (line 113) | public void setExtraCard(ExtraCardBean extraCard) {
method getDkeys (line 117) | public String getDkeys() {
method setDkeys (line 121) | public void setDkeys(String dkeys) {
method getEc (line 125) | public String getEc() {
method setEc (line 129) | public void setEc(String ec) {
method getDocid (line 133) | public String getDocid() {
method setDocid (line 137) | public void setDocid(String docid) {
method getSourceinfo (line 141) | public SourceinfoBean getSourceinfo() {
method setSourceinfo (line 145) | public void setSourceinfo(SourceinfoBean sourceinfo) {
method isPicnews (line 149) | public boolean isPicnews() {
method setPicnews (line 153) | public void setPicnews(boolean picnews) {
method getTitle (line 157) | public String getTitle() {
method setTitle (line 161) | public void setTitle(String title) {
method getTid (line 165) | public String getTid() {
method setTid (line 169) | public void setTid(String tid) {
method getTemplate (line 173) | public String getTemplate() {
method setTemplate (line 177) | public void setTemplate(String template) {
method getThreadVote (line 181) | public int getThreadVote() {
method setThreadVote (line 185) | public void setThreadVote(int threadVote) {
method getThreadAgainst (line 189) | public int getThreadAgainst() {
method setThreadAgainst (line 193) | public void setThreadAgainst(int threadAgainst) {
method getReplyBoard (line 197) | public String getReplyBoard() {
method setReplyBoard (line 201) | public void setReplyBoard(String replyBoard) {
method getSource (line 205) | public String getSource() {
method setSource (line 209) | public void setSource(String source) {
method isHasNext (line 213) | public boolean isHasNext() {
method setHasNext (line 217) | public void setHasNext(boolean hasNext) {
method getVoicecomment (line 221) | public String getVoicecomment() {
method setVoicecomment (line 225) | public void setVoicecomment(String voicecomment) {
method getPtime (line 229) | public String getPtime() {
method setPtime (line 233) | public void setPtime(String ptime) {
method getUsers (line 237) | public List<?> getUsers() {
method setUsers (line 241) | public void setUsers(List<?> users) {
method getYdbaike (line 245) | public List<?> getYdbaike() {
method setYdbaike (line 249) | public void setYdbaike(List<?> ydbaike) {
method getLink (line 253) | public List<?> getLink() {
method setLink (line 257) | public void setLink(List<?> link) {
method getImg (line 261) | public List<ImgBean> getImg() {
method setImg (line 265) | public void setImg(List<ImgBean> img) {
method getVotes (line 269) | public List<?> getVotes() {
method setVotes (line 273) | public void setVotes(List<?> votes) {
method getTopiclist_news (line 277) | public List<TopiclistNewsBean> getTopiclist_news() {
method setTopiclist_news (line 281) | public void setTopiclist_news(List<TopiclistNewsBean> topiclist_news) {
method getTopiclist (line 285) | public List<TopiclistBean> getTopiclist() {
method setTopiclist (line 289) | public void setTopiclist(List<TopiclistBean> topiclist) {
method getAskbar (line 293) | public List<AskbarBean> getAskbar() {
method setAskbar (line 297) | public void setAskbar(List<AskbarBean> askbar) {
method getAutoRecomends (line 301) | public List<AutoRecomendsBean> getAutoRecomends() {
method setAutoRecomends (line 305) | public void setAutoRecomends(List<AutoRecomendsBean> autoRecomends) {
method getBoboList (line 309) | public List<?> getBoboList() {
method setBoboList (line 313) | public void setBoboList(List<?> boboList) {
method getHuati (line 317) | public List<HuatiBean> getHuati() {
method setHuati (line 321) | public void setHuati(List<HuatiBean> huati) {
class ExtraCardBean (line 325) | public static class ExtraCardBean {
method toString (line 326) | @Override
method getTitle (line 345) | public String getTitle() {
method setTitle (line 349) | public void setTitle(String title) {
method getExtraurl (line 353) | public String getExtraurl() {
method setExtraurl (line 357) | public void setExtraurl(String extraurl) {
method getList (line 361) | public List<ListBean> getList() {
method setList (line 365) | public void setList(List<ListBean> list) {
class ListBean (line 369) | public static class ListBean {
method toString (line 370) | @Override
method getName (line 392) | public String getName() {
method setName (line 396) | public void setName(String name) {
method getImgsrc (line 400) | public String getImgsrc() {
method setImgsrc (line 404) | public void setImgsrc(String imgsrc) {
method getDigest (line 408) | public String getDigest() {
method setDigest (line 412) | public void setDigest(String digest) {
method getUrl (line 416) | public String getUrl() {
method setUrl (line 420) | public void setUrl(String url) {
class SourceinfoBean (line 426) | public static class SourceinfoBean {
method toString (line 427) | @Override
method getAlias (line 449) | public String getAlias() {
method setAlias (line 453) | public void setAlias(String alias) {
method getEname (line 457) | public String getEname() {
method setEname (line 461) | public void setEname(String ename) {
method getTname (line 465) | public String getTname() {
method setTname (line 469) | public void setTname(String tname) {
method getTid (line 473) | public String getTid() {
method setTid (line 477) | public void setTid(String tid) {
class ImgBean (line 482) | public static class ImgBean {
method getRef (line 495) | public String getRef() {
method setRef (line 499) | public void setRef(String ref) {
method getPixel (line 503) | public String getPixel() {
method setPixel (line 507) | public void setPixel(String pixel) {
method getAlt (line 511) | public String getAlt() {
method setAlt (line 515) | public void setAlt(String alt) {
method getSrc (line 519) | public String getSrc() {
method setSrc (line 523) | public void setSrc(String src) {
class TopiclistNewsBean (line 528) | public static class TopiclistNewsBean {
method toString (line 529) | @Override
method isHasCover (line 560) | public boolean isHasCover() {
method setHasCover (line 564) | public void setHasCover(boolean hasCover) {
method getSubnum (line 568) | public String getSubnum() {
method setSubnum (line 572) | public void setSubnum(String subnum) {
method getAlias (line 576) | public String getAlias() {
method setAlias (line 580) | public void setAlias(String alias) {
method getTname (line 584) | public String getTname() {
method setTname (line 588) | public void setTname(String tname) {
method getEname (line 592) | public String getEname() {
method setEname (line 596) | public void setEname(String ename) {
method getTid (line 600) | public String getTid() {
method setTid (line 604) | public void setTid(String tid) {
method getCid (line 608) | public String getCid() {
method setCid (line 612) | public void setCid(String cid) {
class TopiclistBean (line 617) | public static class TopiclistBean {
method toString (line 618) | @Override
method isHasCover (line 649) | public boolean isHasCover() {
method setHasCover (line 653) | public void setHasCover(boolean hasCover) {
method getSubnum (line 657) | public String getSubnum() {
method setSubnum (line 661) | public void setSubnum(String subnum) {
method getAlias (line 665) | public String getAlias() {
method setAlias (line 669) | public void setAlias(String alias) {
method getTname (line 673) | public String getTname() {
method setTname (line 677) | public void setTname(String tname) {
method getEname (line 681) | public String getEname() {
method setEname (line 685) | public void setEname(String ename) {
method getTid (line 689) | public String getTid() {
method setTid (line 693) | public void setTid(String tid) {
method getCid (line 697) | public String getCid() {
method setCid (line 701) | public void setCid(String cid) {
class AskbarBean (line 706) | public static class AskbarBean {
method toString (line 707) | @Override
method getTitle (line 735) | public String getTitle() {
method setTitle (line 739) | public void setTitle(String title) {
method getHeadpicurl (line 743) | public String getHeadpicurl() {
method setHeadpicurl (line 747) | public void setHeadpicurl(String headpicurl) {
method getAlias (line 751) | public String getAlias() {
method setAlias (line 755) | public void setAlias(String alias) {
method getExpertId (line 759) | public String getExpertId() {
method setExpertId (line 763) | public void setExpertId(String expertId) {
method getName (line 767) | public String getName() {
method setName (line 771) | public void setName(String name) {
method getConcernCount (line 775) | public int getConcernCount() {
method setConcernCount (line 779) | public void setConcernCount(int concernCount) {
class AutoRecomendsBean (line 784) | public static class AutoRecomendsBean {
method toString (line 785) | @Override
method getName (line 813) | public String getName() {
method setName (line 817) | public void setName(String name) {
method getImgsrc (line 821) | public String getImgsrc() {
method setImgsrc (line 825) | public void setImgsrc(String imgsrc) {
method getChexi_id (line 829) | public String getChexi_id() {
method setChexi_id (line 833) | public void setChexi_id(String chexi_id) {
method getYouhui (line 837) | public double getYouhui() {
method setYouhui (line 841) | public void setYouhui(double youhui) {
method getYouhuinew (line 845) | public String getYouhuinew() {
method setYouhuinew (line 849) | public void setYouhuinew(String youhuinew) {
method getUrl (line 853) | public String getUrl() {
method setUrl (line 857) | public void setUrl(String url) {
class HuatiBean (line 862) | public static class HuatiBean {
method getTopicId (line 871) | public String getTopicId() {
method setTopicId (line 875) | public void setTopicId(String topicId) {
method getTopicName (line 879) | public String getTopicName() {
method setTopicName (line 883) | public void setTopicName(String topicName) {
method toString (line 887) | @Override
method toString (line 896) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsPhotoDetail.java
class NewsPhotoDetail (line 13) | public class NewsPhotoDetail implements Parcelable{
method getTitle (line 17) | public String getTitle() {
method setTitle (line 21) | public void setTitle(String title) {
method getPictures (line 25) | public List<Picture> getPictures() {
method setPictures (line 29) | public void setPictures(List<Picture> pictures) {
class Picture (line 33) | public static class Picture implements Parcelable {
method getImgSrc (line 36) | public String getImgSrc() {
method setImgSrc (line 40) | public void setImgSrc(String imgSrc) {
method getTitle (line 44) | public String getTitle() {
method setTitle (line 48) | public void setTitle(String title) {
method describeContents (line 54) | @Override
method writeToParcel (line 59) | @Override
method Picture (line 65) | public Picture() {
method Picture (line 68) | protected Picture(Parcel in) {
method createFromParcel (line 74) | @Override
method newArray (line 79) | @Override
method describeContents (line 86) | @Override
method writeToParcel (line 91) | @Override
method NewsPhotoDetail (line 97) | public NewsPhotoDetail() {
method NewsPhotoDetail (line 100) | protected NewsPhotoDetail(Parcel in) {
method createFromParcel (line 107) | @Override
method newArray (line 112) | @Override
method toString (line 118) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsChannelModelImpl.java
class NewsChannelModelImpl (line 22) | public class NewsChannelModelImpl implements NewsChannelModel {
method lodeMoreNewsChannels (line 25) | @Override
method swapDb (line 43) | @Override
method updateDb (line 56) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsDetailModelImpl.java
class NewsDetailModelImpl (line 19) | public class NewsDetailModelImpl implements NewsDetailModel {
method getDetailNews (line 20) | @Override
method changeNewsDetail (line 34) | private void changeNewsDetail(NewsDetail newsDetail) {
method isChange (line 43) | private boolean isChange(List<NewsDetail.ImgBean> imgSrcs) {
method changeNewsBody (line 47) | private String changeNewsBody(List<NewsDetail.ImgBean> imgSrcs, String...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsModelImpl.java
class NewsModelImpl (line 31) | public class NewsModelImpl implements NewsModel {
method requestNewsChannels (line 32) | @Override
method requestNewsList (line 48) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewPresenter.java
type NewPresenter (line 7) | public interface NewPresenter {
method lodeMineChannelsRequest (line 8) | void lodeMineChannelsRequest();
method loadNewsListRequest (line 9) | void loadNewsListRequest(String newsType, final String id, int startPa...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewsChannelPresenter.java
type NewsChannelPresenter (line 11) | public interface NewsChannelPresenter {
method lodeChannelsRequest (line 12) | void lodeChannelsRequest();
method onItemSwap (line 14) | void onItemSwap(ArrayList<NewsChannelTable> newsChannelTableList);
method onItemAddOrRemove (line 16) | void onItemAddOrRemove(ArrayList<NewsChannelTable> mineChannelTableLis...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewsDetailPresenter.java
type NewsDetailPresenter (line 7) | public interface NewsDetailPresenter {
method requestDetailNews (line 8) | void requestDetailNews(String postId);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsChannelPresenterImpl.java
class NewsChannelPresenterImpl (line 24) | public class NewsChannelPresenterImpl implements NewsChannelPresenter {
method NewsChannelPresenterImpl (line 29) | public NewsChannelPresenterImpl(NewsChannelActivity activity) {
method lodeChannelsRequest (line 35) | @Override
method onItemSwap (line 84) | @Override
method onItemAddOrRemove (line 109) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsDetailPresenterImpl.java
class NewsDetailPresenterImpl (line 17) | public class NewsDetailPresenterImpl implements com.lvr.livecircle.news....
method NewsDetailPresenterImpl (line 23) | public NewsDetailPresenterImpl(NewsDetailActivity view) {
method requestDetailNews (line 28) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsPresenterImpl.java
class NewsPresenterImpl (line 24) | public class NewsPresenterImpl implements NewPresenter {
method NewsPresenterImpl (line 30) | public NewsPresenterImpl(NewsFragment view) {
method lodeMineChannelsRequest (line 35) | @Override
method loadNewsListRequest (line 62) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsChannelView.java
type NewsChannelView (line 11) | public interface NewsChannelView {
method returnMineNewsChannels (line 12) | void returnMineNewsChannels(List<NewsChannelTable> newsChannelsMine);
method returnMoreNewsChannels (line 13) | void returnMoreNewsChannels(List<NewsChannelTable> newsChannelsMore);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsDetailView.java
type NewsDetailView (line 9) | public interface NewsDetailView {
method returnNewsDetail (line 10) | void returnNewsDetail(NewsDetail detail);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsView.java
type NewsView (line 12) | public interface NewsView {
method returnNewsChannel (line 13) | void returnNewsChannel(List<NewsChannelTable> tables);
method returnNewsList (line 14) | void returnNewsList(List<NewsInfo> info);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/recommend/RecommendFragment.java
class RecommendFragment (line 10) | public class RecommendFragment extends BaseFragment {
method getLayoutResource (line 11) | @Override
method initView (line 18) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardAdapterHelper.java
class CardAdapterHelper (line 13) | public class CardAdapterHelper {
method onCreateViewHolder (line 17) | public void onCreateViewHolder(ViewGroup parent, View itemView) {
method onBindViewHolder (line 23) | public void onBindViewHolder(View itemView, final int position, int it...
method setViewMargin (line 31) | private void setViewMargin(View view, int left, int top, int right, in...
method setPagePadding (line 39) | public void setPagePadding(int pagePadding) {
method setShowLeftCardWidth (line 43) | public void setShowLeftCardWidth(int showLeftCardWidth) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardLinearSnapHelper.java
class CardLinearSnapHelper (line 12) | public class CardLinearSnapHelper extends LinearSnapHelper {
method calculateDistanceToFinalSnap (line 15) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardScaleHelper.java
class CardScaleHelper (line 13) | public class CardScaleHelper {
method attachToRecyclerView (line 30) | public void attachToRecyclerView(final RecyclerView mRecyclerView) {
method initWidth (line 62) | private void initWidth() {
method setCurrentItemPos (line 75) | public void setCurrentItemPos(int currentItemPos) {
method getCurrentItemPos (line 79) | public int getCurrentItemPos() {
method getDestItemOffset (line 83) | private int getDestItemOffset(int destPos) {
method computeCurrentItemPos (line 90) | private void computeCurrentItemPos() {
method onScrolledChangedCallback (line 107) | private void onScrolledChangedCallback() {
method setScale (line 136) | public void setScale(float scale) {
method setPagePadding (line 140) | public void setPagePadding(int pagePadding) {
method setShowLeftCardWidth (line 144) | public void setShowLeftCardWidth(int showLeftCardWidth) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/SpeedRecyclerView.java
class SpeedRecyclerView (line 13) | public class SpeedRecyclerView extends RecyclerView {
method SpeedRecyclerView (line 17) | public SpeedRecyclerView(Context context) {
method SpeedRecyclerView (line 21) | public SpeedRecyclerView(Context context, @Nullable AttributeSet attrs) {
method SpeedRecyclerView (line 25) | public SpeedRecyclerView(Context context, @Nullable AttributeSet attrs...
method fling (line 29) | @Override
method solveVelocity (line 36) | private int solveVelocity(int velocity) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ACache.java
class ACache (line 45) | public class ACache {
method get (line 54) | public static ACache get(Context ctx) {
method get (line 58) | public static ACache get(Context ctx, String cacheName) {
method get (line 63) | public static ACache get(File cacheDir) {
method get (line 67) | public static ACache get(Context ctx, long max_zise, int max_count) {
method get (line 72) | public static ACache get(File cacheDir, long max_zise, int max_count) {
method myPid (line 81) | private static String myPid() {
method ACache (line 85) | private ACache(File cacheDir, long max_size, int max_count) {
method put (line 105) | public void put(String key, String value) {
method put (line 136) | public void put(String key, String value, int saveTime) {
method getAsString (line 146) | public String getAsString(String key) {
method put (line 193) | public void put(String key, JSONObject value) {
method put (line 207) | public void put(String key, JSONObject value, int saveTime) {
method getAsJSONObject (line 217) | public JSONObject getAsJSONObject(String key) {
method put (line 240) | public void put(String key, JSONArray value) {
method put (line 254) | public void put(String key, JSONArray value, int saveTime) {
method getAsJSONArray (line 264) | public JSONArray getAsJSONArray(String key) {
method put (line 287) | public void put(String key, byte[] value) {
method put (line 318) | public void put(String key, byte[] value, int saveTime) {
method getAsBinary (line 328) | public byte[] getAsBinary(String key) {
method put (line 372) | public void put(String key, Serializable value) {
method put (line 386) | public void put(String key, Serializable value, int saveTime) {
method getAsObject (line 415) | public Object getAsObject(String key) {
method put (line 459) | public void put(String key, Bitmap value) {
method put (line 473) | public void put(String key, Bitmap value, int saveTime) {
method getAsBitmap (line 483) | public Bitmap getAsBitmap(String key) {
method put (line 502) | public void put(String key, Drawable value) {
method put (line 516) | public void put(String key, Drawable value, int saveTime) {
method getAsDrawable (line 526) | public Drawable getAsDrawable(String key) {
method file (line 539) | public File file(String key) {
method remove (line 552) | public boolean remove(String key) {
method clear (line 559) | public void clear() {
class ACacheManager (line 568) | public class ACacheManager {
method ACacheManager (line 577) | private ACacheManager(File cacheDir, long sizeLimit, int countLimit) {
method calculateCacheSizeAndCacheCount (line 589) | private void calculateCacheSizeAndCacheCount() {
method put (line 610) | private void put(File file) {
method get (line 633) | private File get(String key) {
method newFile (line 642) | private File newFile(String key) {
method remove (line 646) | private boolean remove(String key) {
method clear (line 651) | private void clear() {
method removeNext (line 667) | private long removeNext() {
method calculateSize (line 697) | private long calculateSize(File file) {
class Utils (line 707) | private static class Utils {
method isDue (line 715) | private static boolean isDue(String str) {
method isDue (line 725) | private static boolean isDue(byte[] data) {
method newStringWithDateInfo (line 742) | private static String newStringWithDateInfo(int second, String strIn...
method newByteArrayWithDateInfo (line 746) | private static byte[] newByteArrayWithDateInfo(int second, byte[] da...
method clearDateInfo (line 754) | private static String clearDateInfo(String strInfo) {
method clearDateInfo (line 762) | private static byte[] clearDateInfo(byte[] data) {
method hasDateInfo (line 770) | private static boolean hasDateInfo(byte[] data) {
method getDateInfoFromDate (line 775) | private static String[] getDateInfoFromDate(byte[] data) {
method indexOf (line 785) | private static int indexOf(byte[] data, char c) {
method copyOfRange (line 794) | private static byte[] copyOfRange(byte[] original, int from, int to) {
method createDateInfo (line 806) | private static String createDateInfo(int second) {
method Bitmap2Bytes (line 817) | private static byte[] Bitmap2Bytes(Bitmap bm) {
method Bytes2Bimap (line 829) | private static Bitmap Bytes2Bimap(byte[] b) {
method drawable2Bitmap (line 839) | private static Bitmap drawable2Bitmap(Drawable drawable) {
method bitmap2Drawable (line 862) | @SuppressWarnings("deprecation")
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/CollectionUtils.java
class CollectionUtils (line 9) | public class CollectionUtils {
method isNullOrEmpty (line 17) | public static boolean isNullOrEmpty(Collection c) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/DisplayUtil.java
class DisplayUtil (line 20) | public class DisplayUtil {
method DisplayUtil (line 21) | private DisplayUtil() {
method px2dip (line 34) | public static int px2dip(float pxValue) {
method dip2px (line 46) | public static int dip2px( float dipValue) {
method px2sp (line 58) | public static int px2sp(float pxValue) {
method sp2px (line 70) | public static int sp2px(float spValue) {
method getWidgetWH (line 80) | public static int[] getWidgetWH(final View view){
method getViewHeight (line 96) | public static int getViewHeight(final View view){
method getViewWidth (line 112) | public static int getViewWidth(final View view){
method getScreenWidth (line 129) | public static int getScreenWidth(Context context) {
method getScreenHeight (line 143) | public static int getScreenHeight(Context context) {
method getStatusBarHeight (line 157) | public static int getStatusBarHeight(Context context) {
method getWidgetWidth (line 176) | public static int getWidgetWidth(View view){
method getWidgetHeight (line 188) | public static int getWidgetHeight(View view){
method setWidgetWidth (line 200) | public static void setWidgetWidth(View view, int width){
method setWidgetHeight (line 210) | public static void setWidgetHeight(View view, int height){
method snapShotWithStatusBar (line 225) | public static Bitmap snapShotWithStatusBar(Activity activity) {
method snapShotWithoutStatusBar (line 244) | public static Bitmap snapShotWithoutStatusBar(Activity activity) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/GlideRoundTransformUtil.java
class GlideRoundTransformUtil (line 17) | public class GlideRoundTransformUtil extends BitmapTransformation {
method GlideRoundTransformUtil (line 18) | public GlideRoundTransformUtil(Context context) {
method transform (line 22) | @Override
method circleCrop (line 27) | private static Bitmap circleCrop(BitmapPool pool, Bitmap source) {
method getId (line 51) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ImageLoaderUtils.java
class ImageLoaderUtils (line 16) | public class ImageLoaderUtils {
method display (line 18) | public static void display(Context context, ImageView imageView, Strin...
method display (line 26) | public static void display(Context context, ImageView imageView, Strin...
method display (line 38) | public static void display(Context context, ImageView imageView, File ...
method displaySmallPhoto (line 49) | public static void displaySmallPhoto(Context context, ImageView imageV...
method displayBigPhoto (line 60) | public static void displayBigPhoto(Context context, ImageView imageVie...
method display (line 71) | public static void display(Context context, ImageView imageView, int u...
method displayRound (line 82) | public static void displayRound(Context context, ImageView imageView, ...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/StatusBarSetting.java
class StatusBarSetting (line 23) | public class StatusBarSetting {
method setColor (line 34) | public static void setColor(Activity activity, @ColorInt int color) {
method setColor (line 46) | public static void setColor(Activity activity, @ColorInt int color, in...
method setColorForSwipeBack (line 73) | public static void setColorForSwipeBack(Activity activity, int color) {
method setColorForSwipeBack (line 84) | public static void setColorForSwipeBack(Activity activity, @ColorInt i...
method setColorNoTranslucent (line 122) | public static void setColorNoTranslucent(Activity activity, @ColorInt ...
method setColorDiff (line 132) | @Deprecated
method setTranslucent (line 159) | public static void setTranslucent(Activity activity) {
method setTranslucent (line 171) | public static void setTranslucent(Activity activity, int statusBarAlph...
method setTranslucentForCoordinatorLayout (line 187) | public static void setTranslucentForCoordinatorLayout(Activity activit...
method setTransparent (line 200) | public static void setTransparent(Activity activity) {
method setTranslucentDiff (line 215) | @Deprecated
method setColorForDrawerLayout (line 231) | public static void setColorForDrawerLayout(Activity activity, DrawerLa...
method setColorNoTranslucentForDrawerLayout (line 242) | public static void setColorNoTranslucentForDrawerLayout(Activity activ...
method setColorForDrawerLayout (line 254) | public static void setColorForDrawerLayout(Activity activity, DrawerLa...
method setDrawerLayoutProperty (line 295) | private static void setDrawerLayoutProperty(DrawerLayout drawerLayout,...
method setColorForDrawerLayoutDiff (line 310) | @Deprecated
method setTranslucentForDrawerLayout (line 341) | public static void setTranslucentForDrawerLayout(Activity activity, Dr...
method setTranslucentForDrawerLayout (line 351) | public static void setTranslucentForDrawerLayout(Activity activity, Dr...
method setTransparentForDrawerLayout (line 365) | public static void setTransparentForDrawerLayout(Activity activity, Dr...
method setTranslucentForDrawerLayoutDiff (line 393) | @Deprecated
method setTransparentForImageView (line 416) | public static void setTransparentForImageView(Activity activity, View ...
method setTranslucentForImageView (line 426) | public static void setTranslucentForImageView(Activity activity, View ...
method setTranslucentForImageView (line 437) | public static void setTranslucentForImageView(Activity activity, int s...
method setTranslucentForImageViewInFragment (line 456) | public static void setTranslucentForImageViewInFragment(Activity activ...
method setTransparentForImageViewInFragment (line 466) | public static void setTransparentForImageViewInFragment(Activity activ...
method setTranslucentForImageViewInFragment (line 477) | public static void setTranslucentForImageViewInFragment(Activity activ...
method hideFakeStatusBarView (line 489) | public static void hideFakeStatusBarView(Activity activity) {
method clearPreviousSetting (line 503) | @TargetApi(Build.VERSION_CODES.KITKAT)
method addTranslucentView (line 520) | private static void addTranslucentView(Activity activity, int statusBa...
method createStatusBarView (line 540) | private static StatusBarView createStatusBarView(Activity activity, @C...
method createStatusBarView (line 552) | private static StatusBarView createStatusBarView(Activity activity, @C...
method setRootView (line 566) | private static void setRootView(Activity activity) {
method setTransparentForWindow (line 580) | private static void setTransparentForWindow(Activity activity) {
method transparentStatusBar (line 595) | @TargetApi(Build.VERSION_CODES.KITKAT)
method createTranslucentStatusBarView (line 613) | private static StatusBarView createTranslucentStatusBarView(Activity a...
method getStatusBarHeight (line 630) | private static int getStatusBarHeight(Context context) {
method calculateStatusColor (line 643) | private static int calculateStatusColor(@ColorInt int color, int alpha) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/TUtil.java
class TUtil (line 8) | public class TUtil {
method getT (line 9) | public static <T> T getT(Object o, int i) {
method forName (line 24) | public static Class<?> forName(String className) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/TimeUtil.java
class TimeUtil (line 22) | @SuppressWarnings("all")
method initialValue (line 104) | @SuppressLint("SimpleDateFormat")
method initialValue (line 113) | @Override
method formatData (line 125) | public static String formatData(String dataFormat, long timeStamp) {
method convertToSecond (line 140) | public static int convertToSecond(Long time) {
method getDateByFormat (line 153) | public static Date getDateByFormat(String strDate, String format) {
method getDateByOffset (line 172) | public Date getDateByOffset(Date date, int calendarField, int offset) {
method getStringByOffset (line 192) | public static String getStringByOffset(String strDate, String format, ...
method getStringByOffset (line 215) | public static String getStringByOffset(Date date, String format, int c...
method formatDate (line 232) | public static String formatDate(String before) {
method getStringByFormat (line 251) | public static String getStringByFormat(Date date, String format) {
method getStringByFormat (line 269) | public static String getStringByFormat(String strDate, String format) {
method getStringByFormat (line 289) | public static String getStringByFormat(long milliseconds, String forma...
method getCurrentDate (line 306) | public static String getCurrentDate(String format) {
method getCurrentDay (line 321) | public static String getCurrentDay() {
method getCurrentDay2 (line 335) | public static String getCurrentDay2() {
method getNextDay (line 349) | public static String getNextDay(int i) {
method getNextHour (line 362) | public static String getNextHour(int i) {
method getCurrentDateByOffset (line 383) | public static String getCurrentDateByOffset(String format, int calenda...
method getOffectDay (line 404) | public static int getOffectDay(long date1, long date2) {
method getOffectHour (line 435) | public static int getOffectHour(long date1, long date2) {
method getOffectMinutes (line 455) | public static int getOffectMinutes(long date1, long date2) {
method getFirstDayOfWeek (line 474) | public static String getFirstDayOfWeek(String format) {
method getLastDayOfWeek (line 484) | public static String getLastDayOfWeek(String format) {
method getDayOfWeek (line 495) | private static String getDayOfWeek(String format, int calendarField) {
method getFirstDayOfMonth (line 523) | public static String getFirstDayOfMonth(String format) {
method getLastDayOfMonth (line 543) | public static String getLastDayOfMonth(String format) {
method getFirstTimeOfDay (line 564) | public static long getFirstTimeOfDay() {
method getLastTimeOfDay (line 580) | public static long getLastTimeOfDay() {
method isLeapYear (line 598) | public static boolean isLeapYear(int year) {
method formatDateStr2Desc (line 612) | public static String formatDateStr2Desc(String strDate, String outForm...
method getWeekNumber (line 670) | public static String getWeekNumber(String strDate, String inFormat) {
method toDate (line 712) | private static Date toDate(String sdate) {
method getfriendlyTime (line 726) | public static String getfriendlyTime(Long ms) {
method getExpiredHour (line 784) | @SuppressLint("SimpleDateFormat")
method getExpiredHour2 (line 813) | @SuppressLint("SimpleDateFormat")
method isToday (line 844) | public static boolean isToday(String sdate) {
method isToday (line 864) | public static boolean isToday(long sdate) {
method getAgeByBirthday (line 881) | public static int getAgeByBirthday(Date birthday) {
method getFriendTimeOffer (line 920) | public static String getFriendTimeOffer(long diff) {
method getFriendlyDuration (line 942) | public static String getFriendlyDuration(long duration) {
method getFriendlyDuration2 (line 957) | public static String getFriendlyDuration2(long duration) {
method getFriendlyMusicDuration (line 967) | public static String getFriendlyMusicDuration(long duration) {
method getStarSeat (line 986) | public static String getStarSeat(int mouth, int day) {
method getChatTimeForShow (line 1020) | public static String getChatTimeForShow(long time){
method getDatelongMills (line 1031) | public static long getDatelongMills(String fomat, String dateStr){
method compare_date (line 1049) | public static int compare_date(String DATE1, String DATE2) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ToastUitl.java
class ToastUitl (line 19) | public class ToastUitl {
method initToast (line 25) | private static Toast initToast(CharSequence message, int duration) {
method showShort (line 40) | public static void showShort(CharSequence message) {
method showShort (line 50) | public static void showShort(int strResId) {
method showLong (line 60) | public static void showLong(CharSequence message) {
method showLong (line 69) | public static void showLong(int strResId) {
method show (line 79) | public static void show(CharSequence message, int duration) {
method show (line 90) | public static void show(Context context, int strResId, int duration) {
method showToastWithImg (line 101) | public static Toast showToastWithImg(final String tvStr, final int ima...
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/video/VideoFragment.java
class VideoFragment (line 10) | public class VideoFragment extends BaseFragment {
method getLayoutResource (line 11) | @Override
method initView (line 18) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ClassicRefreshHeaderView.java
class ClassicRefreshHeaderView (line 16) | public class ClassicRefreshHeaderView extends RelativeLayout implements ...
method ClassicRefreshHeaderView (line 33) | public ClassicRefreshHeaderView(Context context) {
method ClassicRefreshHeaderView (line 37) | public ClassicRefreshHeaderView(Context context, AttributeSet attrs) {
method ClassicRefreshHeaderView (line 41) | public ClassicRefreshHeaderView(Context context, AttributeSet attrs, i...
method onStart (line 59) | @Override
method onMove (line 65) | @Override
method onRefresh (line 90) | @Override
method onRelease (line 99) | @Override
method onComplete (line 104) | @Override
method onReset (line 114) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ItemDragHelperCallback.java
class ItemDragHelperCallback (line 24) | public class ItemDragHelperCallback extends ItemTouchHelper.Callback {
method setLongPressEnabled (line 27) | public void setLongPressEnabled(boolean longPressEnabled) {
type OnItemMoveListener (line 31) | public interface OnItemMoveListener {
method onItemMove (line 32) | boolean onItemMove(int fromPosition, int toPosition);
method ItemDragHelperCallback (line 35) | public ItemDragHelperCallback(OnItemMoveListener onItemMoveListener) {
method isLongPressDragEnabled (line 39) | @Override
method getMovementFlags (line 44) | @Override
method setDragFlags (line 53) | private int setDragFlags(RecyclerView recyclerView) {
method onMove (line 64) | @Override
method clearView (line 71) | @Override
method onSwiped (line 77) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadMoreFooterView.java
class LoadMoreFooterView (line 12) | public class LoadMoreFooterView extends FrameLayout {
method LoadMoreFooterView (line 24) | public LoadMoreFooterView(Context context) {
method LoadMoreFooterView (line 28) | public LoadMoreFooterView(Context context, AttributeSet attrs) {
method LoadMoreFooterView (line 32) | public LoadMoreFooterView(Context context, AttributeSet attrs, int def...
method setOnRetryListener (line 52) | public void setOnRetryListener(OnRetryListener listener) {
method getStatus (line 56) | public Status getStatus() {
method setStatus (line 60) | public void setStatus(Status status) {
method canLoadMore (line 65) | public boolean canLoadMore() {
method change (line 69) | private void change() {
type Status (line 97) | public enum Status {
type OnRetryListener (line 101) | public interface OnRetryListener {
method onRetry (line 102) | void onRetry(LoadMoreFooterView view);
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadingDialog.java
class LoadingDialog (line 13) | public class LoadingDialog {
method showDialogForLoading (line 22) | public static Dialog showDialogForLoading(Activity context, String msg...
method showDialogForLoading (line 35) | public static Dialog showDialogForLoading(Activity context) {
method cancelDialogForLoading (line 51) | public static void cancelDialogForLoading() {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadingTip.java
class LoadingTip (line 21) | public class LoadingTip extends LinearLayout {
method LoadingTip (line 31) | public LoadingTip(Context context) {
method LoadingTip (line 36) | public LoadingTip(Context context, AttributeSet attrs) {
method LoadingTip (line 41) | public LoadingTip(Context context, AttributeSet attrs, int defStyleAtt...
method LoadingTip (line 46) | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
type LoadStatus (line 53) | public static enum LoadStatus {
method initView (line 57) | private void initView(Context context) {
method setTips (line 75) | public void setTips(String tips){
method setLoadingTip (line 85) | public void setLoadingTip(LoadStatus loadStatus){
method setOnReloadListener (line 129) | public void setOnReloadListener(onReloadListener onReloadListener){
type onReloadListener (line 135) | public interface onReloadListener{
method reload (line 136) | void reload();
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ScrollAwareFABBehavior.java
class ScrollAwareFABBehavior (line 26) | public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior {
method ScrollAwareFABBehavior (line 27) | public ScrollAwareFABBehavior(Context context, AttributeSet attrs) {
method onStartNestedScroll (line 32) | @Override
method onNestedScroll (line 41) | @Override
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/StatusBarView.java
class StatusBarView (line 13) | public class StatusBarView extends View {
method StatusBarView (line 14) | public StatusBarView(Context context, AttributeSet attrs) {
method StatusBarView (line 18) | public StatusBarView(Context context) {
FILE: LiveCircle/app/src/main/java/com/lvr/livecircle/widget/URLImageGetter.java
class URLImageGetter (line 48) | public class URLImageGetter implements Html.ImageGetter {
method URLImageGetter (line 57) | public URLImageGetter(TextView textView, String newsBody, int picTotal) {
method getDrawable (line 64) | @Override
method getDrawableFromDisk (line 77) | @Nullable
method calculatePicHeight (line 87) | private int calculatePicHeight(Drawable drawable) {
method getDrawableFromNet (line 94) | @NonNull
method WritePicToDisk (line 136) | @NonNull
method createPicPlaceholder (line 165) | @SuppressWarnings("deprecation")
FILE: LiveCircle/app/src/test/java/com/lvr/livecircle/ExampleUnitTest.java
class ExampleUnitTest (line 12) | public class ExampleUnitTest {
method addition_isCorrect (line 13) | @Test
Condensed preview — 172 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (442K chars).
[
{
"path": "LiveCircle/.gitignore",
"chars": 118,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/workspace.xml\n/.idea/libraries\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
},
{
"path": "LiveCircle/.idea/compiler.xml",
"chars": 686,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"CompilerConfiguration\">\n <resourceExt"
},
{
"path": "LiveCircle/.idea/copyright/profiles_settings.xml",
"chars": 74,
"preview": "<component name=\"CopyrightManager\">\n <settings default=\"\" />\n</component>"
},
{
"path": "LiveCircle/.idea/encodings.xml",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"Encoding\">\n <file url=\"PROJECT\" chars"
},
{
"path": "LiveCircle/.idea/gradle.xml",
"chars": 626,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"GradleSettings\">\n <option name=\"linke"
},
{
"path": "LiveCircle/.idea/inspectionProfiles/Project_Default.xml",
"chars": 777,
"preview": "<component name=\"InspectionProjectProfileManager\">\n <profile version=\"1.0\">\n <option name=\"myName\" value=\"Project De"
},
{
"path": "LiveCircle/.idea/inspectionProfiles/profiles_settings.xml",
"chars": 235,
"preview": "<component name=\"InspectionProjectProfileManager\">\n <settings>\n <option name=\"PROJECT_PROFILE\" value=\"Project Defaul"
},
{
"path": "LiveCircle/.idea/misc.xml",
"chars": 2644,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"EntryPointsManager\">\n <entry_points v"
},
{
"path": "LiveCircle/.idea/modules.xml",
"chars": 357,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"ProjectModuleManager\">\n <modules>\n "
},
{
"path": "LiveCircle/.idea/runConfigurations.xml",
"chars": 564,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n <component name=\"RunConfigurationProducerService\">\n <o"
},
{
"path": "LiveCircle/app/.gitignore",
"chars": 7,
"preview": "/build\n"
},
{
"path": "LiveCircle/app/build.gradle",
"chars": 1904,
"preview": "apply plugin: 'com.android.application'\napply plugin: 'com.neenbedankt.android-apt'\nandroid {\n compileSdkVersion 25\n "
},
{
"path": "LiveCircle/app/proguard-rules.pro",
"chars": 665,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in E:"
},
{
"path": "LiveCircle/app/src/androidTest/java/com/lvr/livecircle/ExampleInstrumentedTest.java",
"chars": 740,
"preview": "package com.lvr.livecircle;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport"
},
{
"path": "LiveCircle/app/src/main/AndroidManifest.xml",
"chars": 1504,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n pa"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/CardAdapter.java",
"chars": 1913,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.content.Context;\nimport android.support.v7.widget.RecyclerView;\nimpo"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/HomeViewPagerAdapter.java",
"chars": 584,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManag"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelAdapter.java",
"chars": 4821,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.content.Context;\nimport android.support.v7.widget.CardView;\nimport a"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsChannelGridAdapter.java",
"chars": 1957,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android."
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/NewsListAdapter.java",
"chars": 13244,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.content.Context;\nimport android.support.v7.widget.RecyclerView;\nimpo"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/OnNewsChannelListener.java",
"chars": 249,
"preview": "package com.lvr.livecircle.adapter;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\n/**\n * Created by lvr "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/adapter/PhotoListAdapter.java",
"chars": 1679,
"preview": "package com.lvr.livecircle.adapter;\n\nimport android.content.Context;\nimport android.support.v7.widget.RecyclerView;\nimpo"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiConstants.java",
"chars": 2112,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/api/ApiService.java",
"chars": 1154,
"preview": "package com.lvr.livecircle.api;\n\n\nimport com.lvr.livecircle.bean.NewsInfo;\nimport com.lvr.livecircle.meitu.model.bean.Gi"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/api/HostType.java",
"chars": 1036,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppApplication.java",
"chars": 237,
"preview": "package com.lvr.livecircle.app;\n\nimport com.lvr.livecircle.base.BaseApplication;\n\n/**\n * APPLICATION\n */\npublic class Ap"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppConstant.java",
"chars": 1423,
"preview": "package com.lvr.livecircle.app;\n\n\npublic class AppConstant {\n\n public static final String HOME_CURRENT_TAB_POSITION=\""
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/app/AppManager.java",
"chars": 4152,
"preview": "\npackage com.lvr.livecircle.app;\n\nimport android.app.Activity;\nimport android.app.ActivityManager;\nimport android.conten"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseActivity.java",
"chars": 5020,
"preview": "package com.lvr.livecircle.base;\n\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.content"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseApplication.java",
"chars": 642,
"preview": "package com.lvr.livecircle.base;\n\nimport android.app.Application;\nimport android.content.Context;\nimport android.content"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragment.java",
"chars": 4733,
"preview": "package com.lvr.livecircle.base;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.support.annota"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/base/BaseFragmentAdapter.java",
"chars": 1145,
"preview": "package com.lvr.livecircle.base;\n\nimport android.support.v4.app.Fragment;\nimport android.support.v4.app.FragmentManager;"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/bean/ChannelBean.java",
"chars": 545,
"preview": "package com.lvr.livecircle.bean;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\nimport java.util.List;\n\n/"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/bean/FabScrollBean.java",
"chars": 607,
"preview": "package com.lvr.livecircle.bean;\n\n/**\n * Created by lvr on 2017/2/12.\n */\n\npublic class FabScrollBean {\n private Stri"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/bean/HeaderBean.java",
"chars": 471,
"preview": "package com.lvr.livecircle.bean;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\nimport java.util.List;\n\n/"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/bean/NewsInfo.java",
"chars": 12237,
"preview": "package com.lvr.livecircle.bean;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport java.util.ArrayList;\ni"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseApiService.java",
"chars": 1341,
"preview": "package com.lvr.livecircle.client;\n\n\nimport java.util.Map;\n\nimport io.reactivex.Observable;\nimport okhttp3.RequestBody;\n"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseInterceptor.java",
"chars": 842,
"preview": "package com.lvr.livecircle.client;\nimport java.io.IOException;\nimport java.util.Map;\nimport java.util.Set;\n\nimport okhtt"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseObserver.java",
"chars": 1253,
"preview": "package com.lvr.livecircle.client;\n\nimport android.content.Context;\nimport android.util.Log;\nimport android.widget.Toast"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/BaseResponse.java",
"chars": 568,
"preview": "package com.lvr.livecircle.client;\n\n\n\npublic class BaseResponse<T> {\n\n private int code;\n private String msg;\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/CaheInterceptor.java",
"chars": 1712,
"preview": "package com.lvr.livecircle.client;\n\nimport android.content.Context;\nimport android.util.Log;\n\nimport java.io.IOException"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/ExceptionHandle.java",
"chars": 3869,
"preview": "package com.lvr.livecircle.client;\n\nimport android.net.ParseException;\n\nimport com.google.gson.JsonParseException;\nimpor"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/IpResult.java",
"chars": 2990,
"preview": "package com.lvr.livecircle.client;\n\n\npublic class IpResult {\n\n private String country;\n private String country_id;"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/NetworkUtil.java",
"chars": 5997,
"preview": "package com.lvr.livecircle.client;\n\nimport android.content.Context;\nimport android.net.ConnectivityManager;\nimport andro"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/RetrofitClient.java",
"chars": 7563,
"preview": "package com.lvr.livecircle.client;\n\nimport android.content.Context;\nimport android.text.TextUtils;\nimport android.util.L"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/client/RxDisposeManager.java",
"chars": 1522,
"preview": "package com.lvr.livecircle.client;\n\nimport android.support.v4.util.ArrayMap;\n\nimport java.util.Set;\n\nimport io.reactivex"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/find/FindFragment.java",
"chars": 355,
"preview": "package com.lvr.livecircle.find;\n\nimport com.lvr.livecircle.R;\nimport com.lvr.livecircle.base.BaseFragment;\n\n/**\n * Crea"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/home/MainActivity.java",
"chars": 8599,
"preview": "package com.lvr.livecircle.home;\n\nimport android.app.Activity;\nimport android.content.Intent;\nimport android.os.Bundle;\n"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/home/SplashActivity.java",
"chars": 2148,
"preview": "package com.lvr.livecircle.home;\n\nimport android.animation.Animator;\nimport android.animation.AnimatorSet;\nimport androi"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/MeiTuFragment.java",
"chars": 4291,
"preview": "package com.lvr.livecircle.meitu;\n\nimport android.content.Context;\nimport android.support.v7.widget.StaggeredGridLayoutM"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/PhotoModel.java",
"chars": 292,
"preview": "package com.lvr.livecircle.meitu.model;\n\nimport com.lvr.livecircle.meitu.model.bean.PhotoGirl;\n\nimport java.util.List;\n\n"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/GirlData.java",
"chars": 6183,
"preview": "package com.lvr.livecircle.meitu.model.bean;\n\nimport java.util.List;\n\n/**\n * Created by lvr on 2017/2/20.\n */\n\npublic cl"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/bean/PhotoGirl.java",
"chars": 1946,
"preview": "package com.lvr.livecircle.meitu.model.bean;\n\n/**\n * Created by lvr on 2017/2/20.\n */\n\npublic class PhotoGirl {\n\n /**"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/model/impl/PhotoModelImpl.java",
"chars": 1108,
"preview": "package com.lvr.livecircle.meitu.model.impl;\n\nimport com.lvr.livecircle.api.ApiService;\nimport com.lvr.livecircle.app.Ap"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/PhotoPresenter.java",
"chars": 168,
"preview": "package com.lvr.livecircle.meitu.presenter;\n\n/**\n * Created by lvr on 2017/2/20.\n */\n\npublic interface PhotoPresenter {\n"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/presenter/impl/PhotoPresenterImpl.java",
"chars": 1427,
"preview": "package com.lvr.livecircle.meitu.presenter.impl;\n\nimport com.lvr.livecircle.client.RxDisposeManager;\nimport com.lvr.live"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/meitu/view/PhotoView.java",
"chars": 273,
"preview": "package com.lvr.livecircle.meitu.view;\n\nimport com.lvr.livecircle.meitu.model.bean.PhotoGirl;\n\nimport java.util.List;\n\n/"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/music/MusicFragment.java",
"chars": 357,
"preview": "package com.lvr.livecircle.music;\n\nimport com.lvr.livecircle.R;\nimport com.lvr.livecircle.base.BaseFragment;\n\n/**\n * Cre"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/nearby/NearByFragment.java",
"chars": 361,
"preview": "package com.lvr.livecircle.nearby;\n\nimport com.lvr.livecircle.R;\nimport com.lvr.livecircle.base.BaseFragment;\n\n/**\n * Cr"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsChannelActivity.java",
"chars": 6082,
"preview": "package com.lvr.livecircle.news.activity;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.c"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsDetailActivity.java",
"chars": 7161,
"preview": "package com.lvr.livecircle.news.activity;\n\nimport android.app.Activity;\nimport android.app.ActivityOptions;\nimport andro"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/activity/NewsPhotoDetailActivity.java",
"chars": 3749,
"preview": "package com.lvr.livecircle.news.activity;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/db/NewsChannelTableManager.java",
"chars": 3662,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/fragment/NewsFragment.java",
"chars": 7375,
"preview": "package com.lvr.livecircle.news.fragment;\n\nimport android.content.Context;\nimport android.support.v4.widget.SwipeRefresh"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsChannelModel.java",
"chars": 542,
"preview": "package com.lvr.livecircle.news.model;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\nimport java.util.Ar"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsDetailModel.java",
"chars": 263,
"preview": "package com.lvr.livecircle.news.model;\n\nimport com.lvr.livecircle.news.model.bean.NewsDetail;\n\nimport io.reactivex.Obser"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/NewsModel.java",
"chars": 423,
"preview": "package com.lvr.livecircle.news.model;\n\nimport com.lvr.livecircle.bean.NewsInfo;\nimport com.lvr.livecircle.news.model.be"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsChannelTable.java",
"chars": 2955,
"preview": "package com.lvr.livecircle.news.model.bean;\n\n\nimport java.io.Serializable;\n\npublic class NewsChannelTable implements Ser"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsDetail.java",
"chars": 25644,
"preview": "package com.lvr.livecircle.news.model.bean;\n\nimport java.util.List;\n\n/**\n * Created by lvr on 2017/2/11.\n */\n\npublic cla"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/bean/NewsPhotoDetail.java",
"chars": 2919,
"preview": "package com.lvr.livecircle.news.model.bean;\n\nimport android.os.Parcel;\nimport android.os.Parcelable;\n\nimport java.util.A"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsChannelModelImpl.java",
"chars": 2877,
"preview": "package com.lvr.livecircle.news.model.impl;\n\nimport com.lvr.livecircle.app.AppApplication;\nimport com.lvr.livecircle.app"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsDetailModelImpl.java",
"chars": 2187,
"preview": "package com.lvr.livecircle.news.model.impl;\n\nimport com.lvr.livecircle.api.ApiService;\nimport com.lvr.livecircle.app.App"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/model/impl/NewsModelImpl.java",
"chars": 3334,
"preview": "package com.lvr.livecircle.news.model.impl;\n\nimport com.lvr.livecircle.api.ApiConstants;\nimport com.lvr.livecircle.api.A"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewPresenter.java",
"chars": 233,
"preview": "package com.lvr.livecircle.news.presenter;\n\n/**\n * Created by lvr on 2017/2/7.\n */\n\npublic interface NewPresenter {\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewsChannelPresenter.java",
"chars": 450,
"preview": "package com.lvr.livecircle.news.presenter;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\nimport java.uti"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/NewsDetailPresenter.java",
"chars": 169,
"preview": "package com.lvr.livecircle.news.presenter;\n\n/**\n * Created by lvr on 2017/2/11.\n */\n\npublic interface NewsDetailPresente"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsChannelPresenterImpl.java",
"chars": 4135,
"preview": "package com.lvr.livecircle.news.presenter.impl;\n\nimport com.lvr.livecircle.bean.HeaderBean;\nimport com.lvr.livecircle.cl"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsDetailPresenterImpl.java",
"chars": 1999,
"preview": "package com.lvr.livecircle.news.presenter.impl;\n\nimport com.lvr.livecircle.client.RxDisposeManager;\nimport com.lvr.livec"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/presenter/impl/NewsPresenterImpl.java",
"chars": 2903,
"preview": "package com.lvr.livecircle.news.presenter.impl;\n\nimport com.lvr.livecircle.bean.HeaderBean;\nimport com.lvr.livecircle.be"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsChannelView.java",
"chars": 350,
"preview": "package com.lvr.livecircle.news.view;\n\nimport com.lvr.livecircle.news.model.bean.NewsChannelTable;\n\nimport java.util.Lis"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsDetailView.java",
"chars": 217,
"preview": "package com.lvr.livecircle.news.view;\n\nimport com.lvr.livecircle.news.model.bean.NewsDetail;\n\n/**\n * Created by lvr on 2"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/news/view/NewsView.java",
"chars": 340,
"preview": "package com.lvr.livecircle.news.view;\n\nimport com.lvr.livecircle.bean.NewsInfo;\nimport com.lvr.livecircle.news.model.bea"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/recommend/RecommendFragment.java",
"chars": 370,
"preview": "package com.lvr.livecircle.recommend;\n\nimport com.lvr.livecircle.R;\nimport com.lvr.livecircle.base.BaseFragment;\n\n/**\n *"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardAdapterHelper.java",
"chars": 1798,
"preview": "package com.lvr.livecircle.recycleviewcardgallery;\n\nimport android.support.v7.widget.RecyclerView;\nimport android.view.V"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardLinearSnapHelper.java",
"chars": 803,
"preview": "package com.lvr.livecircle.recycleviewcardgallery;\n\nimport android.support.annotation.NonNull;\nimport android.support.v7"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/CardScaleHelper.java",
"chars": 4833,
"preview": "package com.lvr.livecircle.recycleviewcardgallery;\n\nimport android.content.Context;\nimport android.support.v7.widget.Rec"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/recycleviewcardgallery/SpeedRecyclerView.java",
"chars": 1258,
"preview": "package com.lvr.livecircle.recycleviewcardgallery;\n\nimport android.content.Context;\nimport android.support.annotation.Nu"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ACache.java",
"chars": 24805,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphi"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/CollectionUtils.java",
"chars": 359,
"preview": "package com.lvr.livecircle.utils;\n\nimport java.util.Collection;\n\n/**\n * 集合操作工具类\n *\n */\npublic class CollectionUtils {\n\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/DisplayUtil.java",
"chars": 6746,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.app.Activity;\nimport android.content.Context;\nimport android.graphics."
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/GlideRoundTransformUtil.java",
"chars": 1739,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.content.Context;\nimport android.graphics.Bitmap;\nimport android.graphi"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ImageLoaderUtils.java",
"chars": 3593,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.content.Context;\nimport android.widget.ImageView;\n\nimport com.bumptech"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/StatusBarSetting.java",
"chars": 24975,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.annotation.TargetApi;\nimport android.app.Activity;\nimport android.cont"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/TUtil.java",
"chars": 857,
"preview": "package com.lvr.livecircle.utils;\n\nimport java.lang.reflect.ParameterizedType;\n\n/**\n * 类转换初始化\n */\npublic class TUtil {\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/TimeUtil.java",
"chars": 31511,
"preview": "/*\n * \n */\npackage com.lvr.livecircle.utils;\n\nimport android.annotation.SuppressLint;\nimport android.text.TextUtils;\nimp"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/utils/ToastUitl.java",
"chars": 3117,
"preview": "package com.lvr.livecircle.utils;\n\nimport android.content.Context;\nimport android.text.TextUtils;\nimport android.view.Gr"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/video/VideoFragment.java",
"chars": 358,
"preview": "package com.lvr.livecircle.video;\n\nimport com.lvr.livecircle.R;\nimport com.lvr.livecircle.base.BaseFragment;\n\n/**\n * Cre"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ClassicRefreshHeaderView.java",
"chars": 3384,
"preview": "package com.lvr.livecircle.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.vie"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ItemDragHelperCallback.java",
"chars": 2921,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadMoreFooterView.java",
"chars": 2792,
"preview": "package com.lvr.livecircle.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.vie"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadingDialog.java",
"chars": 2048,
"preview": "package com.lvr.livecircle.widget;\n\nimport android.app.Activity;\nimport android.app.Dialog;\nimport android.view.LayoutIn"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/LoadingTip.java",
"chars": 4368,
"preview": "package com.lvr.livecircle.widget;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android."
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/ScrollAwareFABBehavior.java",
"chars": 2200,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n "
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/StatusBarView.java",
"chars": 462,
"preview": "package com.lvr.livecircle.widget;\n\nimport android.content.Context;\nimport android.util.AttributeSet;\nimport android.vie"
},
{
"path": "LiveCircle/app/src/main/java/com/lvr/livecircle/widget/URLImageGetter.java",
"chars": 5646,
"preview": "/*\n * Copyright (c) 2016 咖枯 <kaku201313@163.com | 3772304@qq.com>\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "LiveCircle/app/src/main/res/anim/act_fade_in_center.xml",
"chars": 450,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:shar"
},
{
"path": "LiveCircle/app/src/main/res/anim/act_fade_out_center.xml",
"chars": 450,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:shar"
},
{
"path": "LiveCircle/app/src/main/res/anim/fade_in.xml",
"chars": 249,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:int"
},
{
"path": "LiveCircle/app/src/main/res/anim/fade_out.xml",
"chars": 249,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<alpha xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:int"
},
{
"path": "LiveCircle/app/src/main/res/anim/rotate_down.xml",
"chars": 362,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<rotate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:d"
},
{
"path": "LiveCircle/app/src/main/res/anim/rotate_up.xml",
"chars": 334,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<rotate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:d"
},
{
"path": "LiveCircle/app/src/main/res/anim/slide_in_left.xml",
"chars": 221,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <translate\n "
},
{
"path": "LiveCircle/app/src/main/res/anim/slide_in_right.xml",
"chars": 223,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <translate\n "
},
{
"path": "LiveCircle/app/src/main/res/anim/slide_out_left.xml",
"chars": 223,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <translate\n "
},
{
"path": "LiveCircle/app/src/main/res/anim/slide_out_right.xml",
"chars": 221,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <translate\n "
},
{
"path": "LiveCircle/app/src/main/res/drawable/loading_dialog_progressbar.xml",
"chars": 220,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<animated-rotate xmlns:android=\"http://schemas.android.com/apk/res/android\"\n a"
},
{
"path": "LiveCircle/app/src/main/res/drawable/selector_gray.xml",
"chars": 604,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item a"
},
{
"path": "LiveCircle/app/src/main/res/drawable/shape_loading_dialog.xml",
"chars": 201,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n <corners "
},
{
"path": "LiveCircle/app/src/main/res/drawable/tv_rounded_corners.xml",
"chars": 271,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"> \n <solid a"
},
{
"path": "LiveCircle/app/src/main/res/layout/activity_main.xml",
"chars": 952,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v4.widget.DrawerLayout\n xmlns:android=\"http://schemas.android"
},
{
"path": "LiveCircle/app/src/main/res/layout/activity_news_channel.xml",
"chars": 1523,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/activity_news_detail.xml",
"chars": 2412,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.design.widget.CoordinatorLayout\n xmlns:android=\"http://schema"
},
{
"path": "LiveCircle/app/src/main/res/layout/activity_news_photo_detail.xml",
"chars": 1921,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_paren"
},
{
"path": "LiveCircle/app/src/main/res/layout/activty_splash.xml",
"chars": 881,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n an"
},
{
"path": "LiveCircle/app/src/main/res/layout/app_bar.xml",
"chars": 2106,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.design.widget.CoordinatorLayout\n xmlns:android=\"http://schema"
},
{
"path": "LiveCircle/app/src/main/res/layout/dialog_loading.xml",
"chars": 872,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andr"
},
{
"path": "LiveCircle/app/src/main/res/layout/dialog_loading_tip.xml",
"chars": 1522,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_find.xml",
"chars": 408,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_meitu.xml",
"chars": 570,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.aspsine.irecyclerview.IRecyclerView\n xmlns:android=\"http://schemas.androi"
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_music.xml",
"chars": 409,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_nearby.xml",
"chars": 410,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_news.xml",
"chars": 1069,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_recommend.xml",
"chars": 413,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/fragment_video.xml",
"chars": 409,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_card_view.xml",
"chars": 749,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v7.widget.CardView\n xmlns:android=\"http://schemas.android.com"
},
{
"path": "LiveCircle/app/src/main/res/layout/item_channel_card.xml",
"chars": 1328,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n android:id=\"@+id/rl_root\"\n xmlns:android=\"http://schemas.a"
},
{
"path": "LiveCircle/app/src/main/res/layout/item_content_news_detail.xml",
"chars": 1981,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v4.widget.NestedScrollView\n xmlns:android=\"http://schemas.and"
},
{
"path": "LiveCircle/app/src/main/res/layout/item_foot_view.xml",
"chars": 661,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_grid_news_channel.xml",
"chars": 727,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_header_view.xml",
"chars": 498,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_news.xml",
"chars": 2711,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v7.widget.CardView\n xmlns:android=\"http://schemas.android.com"
},
{
"path": "LiveCircle/app/src/main/res/layout/item_news_header.xml",
"chars": 776,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v7.widget.CardView\n style=\"@style/news_summary_card_view\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_news_photo.xml",
"chars": 2434,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v7.widget.CardView\n style=\"@style/news_summary_card_view\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/item_photo_girl.xml",
"chars": 805,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<android.support.v7.widget.CardView\n android:layout_height=\"wrap_content\"\n "
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_classic_refresh_header_view.xml",
"chars": 1419,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<merge xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:lay"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_load_more_footer.xml",
"chars": 222,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.lvr.livecircle.widget.LoadMoreFooterView\n xmlns:android=\"http://schemas.a"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_load_more_footer_error_view.xml",
"chars": 306,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_load_more_footer_loading_view.xml",
"chars": 293,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ProgressBar xmlns:android=\"http://schemas.android.com/apk/res/android\"\n andro"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_load_more_footer_the_end_view.xml",
"chars": 303,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<TextView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_load_more_footer_view.xml",
"chars": 575,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<merge xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:lay"
},
{
"path": "LiveCircle/app/src/main/res/layout/layout_irecyclerview_refresh_header.xml",
"chars": 297,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<com.lvr.livecircle.widget.ClassicRefreshHeaderView xmlns:android=\"http://schemas"
},
{
"path": "LiveCircle/app/src/main/res/layout/toast_custom.xml",
"chars": 1605,
"preview": "<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/too"
},
{
"path": "LiveCircle/app/src/main/res/layout/view_nav.xml",
"chars": 1146,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "LiveCircle/app/src/main/res/menu/menu_nav.xml",
"chars": 835,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n >\n <group"
},
{
"path": "LiveCircle/app/src/main/res/menu/menu_toolabr.xml",
"chars": 619,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<menu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app="
},
{
"path": "LiveCircle/app/src/main/res/values/colors.xml",
"chars": 880,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"colorPrimary\">#ff33b5e5</color>\n <color name=\"col"
},
{
"path": "LiveCircle/app/src/main/res/values/dimens.xml",
"chars": 656,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n <dimen name=\"activity_horizontal"
},
{
"path": "LiveCircle/app/src/main/res/values/ids.xml",
"chars": 189,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item type=\"id\" name=\"statusbarutil_fake_status_bar_view\" />\n "
},
{
"path": "LiveCircle/app/src/main/res/values/news_channel_info.xml",
"chars": 1280,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <string-array name=\"news_channel_name_static\">\n <!--定死不能更改"
},
{
"path": "LiveCircle/app/src/main/res/values/strings.xml",
"chars": 630,
"preview": "<resources>\n <string name=\"app_name\">Live圈</string>\n <string name=\"loading\">请稍候</string>\n <string name=\"net_err"
},
{
"path": "LiveCircle/app/src/main/res/values/styles.xml",
"chars": 3329,
"preview": "<resources>\n <style name=\"MyTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n <item name=\"android:colorPrima"
},
{
"path": "LiveCircle/app/src/main/res/values-v19/dimens.xml",
"chars": 149,
"preview": "<resources>\n <!-- Default screen margins, per the Android Design guidelines. -->\n\n <dimen name=\"toolbar_padding_to"
},
{
"path": "LiveCircle/app/src/main/res/values-w820dp/dimens.xml",
"chars": 358,
"preview": "<resources>\n <!-- Example customization of dimensions originally defined in res/values/dimens.xml\n (such as s"
},
{
"path": "LiveCircle/app/src/test/java/com/lvr/livecircle/ExampleUnitTest.java",
"chars": 396,
"preview": "package com.lvr.livecircle;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * Example local unit test, "
},
{
"path": "LiveCircle/build.gradle",
"chars": 684,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "LiveCircle/gradle/wrapper/gradle-wrapper.properties",
"chars": 233,
"preview": "#Mon Dec 28 10:00:20 PST 2015\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "LiveCircle/gradle.properties",
"chars": 730,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "LiveCircle/gradlew",
"chars": 4971,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "LiveCircle/gradlew.bat",
"chars": 2314,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem "
},
{
"path": "LiveCircle/settings.gradle",
"chars": 15,
"preview": "include ':app'\n"
},
{
"path": "README.md",
"chars": 738,
"preview": "# LiveCircle\nLive圈 边学边做,不断完善\n\n**新闻模块**\n\n1.Toolbar+NavigationView+DrawerLayout 并实现沉浸式状态栏\n\n2.RecycleView+GridView嵌套 实现多布局格"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the LRH1993/LiveCircle GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 172 files (385.8 KB), approximately 101.4k tokens, and a symbol index with 1009 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.