作者 qin

Merge branch 'master' into zhangtao

不能预览此文件类型
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="XML">
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownExportedFiles">
<htmlFiles />
<imageFiles />
<otherFiles />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings" wasCopied="false">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true" openRemoteLinks="true" replaceUnicodeEmoji="false" lastLayoutSetsDefault="false">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false" emojiShortcuts="1" emojiImages="0">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="false" />
</PegdownExtensions>
<ParserOptions>
<option name="ADMONITION_EXT" value="false" />
<option name="ATTRIBUTES_EXT" value="false" />
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="ENUMERATED_REFERENCES_EXT" value="false" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="false" />
<option name="GITLAB_EXT" value="false" />
<option name="GITLAB_MATH_EXT" value="false" />
<option name="GITLAB_MERMAID_EXT" value="false" />
<option name="HEADER_ID_NON_ASCII_TO_LOWERCASE" value="false" />
<option name="HEADER_ID_NO_DUPED_DASHES" value="false" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="MACROS_EXT" value="false" />
<option name="NO_TEXT_ATTRIBUTES" value="false" />
<option name="PARSE_HTML_ANCHOR_ID" value="false" />
<option name="PLANTUML_FENCED_CODE" value="false" />
<option name="PUML_FENCED_CODE" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true" embedImages="false" embedHttpImages="false" imageUriSerials="false" addDocTypeHtml="true" noParaTags="false" plantUmlConversion="0" mathConversion="0">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="true" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
<cssUriHistory />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetPathType="2" targetExt="" useTargetExt="false" noCssNoScripts="false" useElementStyleAttribute="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
</project>
\ No newline at end of file
<component name="MarkdownNavigator.ProfileManager">
<settings default="" pdf-export="" />
</component>
\ No newline at end of file
... ... @@ -15,10 +15,10 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.dou361.ijkplayer.listener.OnShowThumbnailListener;
import com.dou361.ijkplayer.widget.IjkVideoView;
import com.dou361.ijkplayer.widget.PlayStateParams;
... ... @@ -44,8 +44,9 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import fm.jiecao.jcvideoplayer_lib.JCVideoPlayerStandard;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
/**
... ... @@ -67,12 +68,20 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
MyViewPagerAdapter pagerAdapter;
TextView introduce, tv_list;
TextView titleValue;
String title;
boolean canStudy = false;
TextView time_video;
@Override
public void initView() {
EventBus.getDefault().register(this);
accountOid = SharedPrefrenceUtils.getString(this, "AccountOid");
lessonOid = getIntent().getExtras().getString("lessonOid");
title = getIntent().getExtras().getString("title");
Log.e("AccountOid", "AccountOid " + accountOid + "," + "lessonOid" + lessonOid);
course_A = this.findViewById(R.id.course_A); // 视频
... ... @@ -82,6 +91,12 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
pager = this.findViewById(R.id.pager);
introduce = this.findViewById(R.id.tv_introduce); // 介绍
tv_list = this.findViewById(R.id.tv_list); // 目录
titleValue = this.findViewById(R.id.titleValue);
time_video = this.findViewById(R.id.app_video_endTime);
titleValue.setText(title);
start.setOnClickListener(this);
back.setOnClickListener(this);
... ... @@ -167,6 +182,7 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
Log.e("bean", bean.toString());
playUrl = bean.getChapterLst().get(0).getSectionLst().get(0).getResourceLst().get(0).getPlayUrl(); // html
Log.e("player", playUrl);
canStudy = true;
}
/* 发送消息 */
... ... @@ -205,6 +221,10 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
this.finish();
break;
case R.id.course_detail_start: // 开始学习
if (canStudy == false) {
Toast.makeText(CourseDetailActivity_Video.this, "还未加载完毕...请稍等", Toast.LENGTH_SHORT).show();
return;
}
playVideo(playUrl);
break;
case R.id.tv_introduce: // 介绍
... ... @@ -271,12 +291,16 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
}
})
.setPlaySource((urlA.substring(urlA.length() - 3, urlA.length())).trim().equals("tml") ? "" : urlA)
.setAutoReConnect(true,0)
.startPlay();
time_video.setText(play.getDuration() + "");
course_A.setVisibility(View.VISIBLE);
course_B.setVisibility(View.GONE);
}
}
// 播放视频
... ... @@ -375,6 +399,7 @@ public class CourseDetailActivity_Video extends BaseMvpActivity<CommonPresenter,
return ti;
}
//第一帧
public static Bitmap getNetVideoBitmap(String videoUrl) {
Bitmap bitmap = null;
... ...
... ... @@ -66,7 +66,7 @@ public class CourseXrecAdapter extends RecyclerView.Adapter<CourseXrecAdapter.Vi
@Override
public void onClick(View v) {
if (turn != null) {
turn.turnTo(mlist.get(position).getLessonOid());
turn.turnTo(mlist.get(position).getLessonOid(),mlist.get(position).getLessonName().trim());
}
}
});
... ... @@ -103,6 +103,6 @@ public class CourseXrecAdapter extends RecyclerView.Adapter<CourseXrecAdapter.Vi
}
public interface Turn {
void turnTo(String lessonOid);
void turnTo(String lessonOid,String title);
}
}
... ...
... ... @@ -181,9 +181,10 @@ public class CourseFragment extends BaseMvpFragment<CommonPresenter, LearnModel>
}
@Override
public void turnTo(String lessonOid) {
public void turnTo(String lessonOid,String title) {
Intent intent = new Intent(getActivity(), CourseDetailActivity_Video.class); //CourseDetailActivity
intent.putExtra("lessonOid", lessonOid);
intent.putExtra("title",title);
startActivity(intent);
}
}
... ...
... ... @@ -8,9 +8,13 @@ import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.hh.xuetubao.R;
import com.hh.xuetubao.adapter.ListRecChildAdapter;
import com.hh.xuetubao.adapter.ListRecGroupAdapter;
import com.hh.xuetubao.bean.ChapterLstBean;
import com.hh.xuetubao.model.LearnModel;
... ... @@ -18,8 +22,6 @@ import com.hh.xuetubao.mvp.BaseMvpFragment;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
... ... @@ -37,10 +39,18 @@ public class ListFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
Unbinder unbinder;
@BindView(R.id.rec_group)
RecyclerView recGroup;
@BindView(R.id.image)
ImageView image;
@BindView(R.id.list_linear)
LinearLayout listLinear;
private String lessonOid;
private List<ChapterLstBean.ChapterLstObject> title = new ArrayList<>();
private ListRecGroupAdapter groupAdapter;
RotateAnimation rotateAnimation;
@SuppressLint("ValidFragment")
public ListFragment(String lessonOid) {
this.lessonOid = lessonOid;
... ... @@ -59,6 +69,16 @@ public class ListFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
groupAdapter.setLessonOid(lessonOid);
recGroup.setAdapter(groupAdapter);
rotateAnimation = new RotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
rotateAnimation.setDuration(2000);
rotateAnimation.setFillAfter(true);
rotateAnimation.setRepeatMode(Animation.RESTART);
//让旋转动画一直转,不停顿的重点
rotateAnimation.setInterpolator(new LinearInterpolator());
rotateAnimation.setRepeatCount(-1);
image.setAnimation(rotateAnimation);
}
@Override
... ... @@ -85,6 +105,9 @@ public class ListFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
title.addAll(chapterLst);
groupAdapter.notifyDataSetChanged();
recGroup.setVisibility(View.VISIBLE);
listLinear.setVisibility(View.GONE);
image.clearAnimation();
// onSendPlayUrl(bean.getChapterLst().get(0).getSectionLst().get(0).getResourceLst().get(0).getPlayUrl());
}
}
... ... @@ -118,5 +141,4 @@ public class ListFragment extends BaseMvpFragment<CommonPresenter, LearnModel> i
}
}
... ...
... ... @@ -15,6 +15,12 @@
android:layout_height="wrap_content"
android:visibility="gone">
<com.dou361.ijkplayer.widget.IjkVideoView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100"
android:id="@+id/ss"
></com.dou361.ijkplayer.widget.IjkVideoView>
<!---->
<include
layout="@layout/simple_player_view_player"
android:layout_width="match_parent"
... ... @@ -63,6 +69,7 @@
</FrameLayout>
<TextView
android:id="@+id/titleValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
... ...
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragment.ListFragment">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.hh.xuetubao.Utils.RecyclerViewNesting
android:id="@+id/rec_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>
<com.hh.xuetubao.Utils.RecyclerViewNesting
android:id="@+id/rec_group"
</ScrollView>
<LinearLayout
android:id="@+id/list_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:id="@+id/image"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:layout_gravity="center"
android:src="@mipmap/welcome_load" />
</LinearLayout>
</ScrollView>
\ No newline at end of file
</FrameLayout>
\ No newline at end of file
... ...