本文整理匯總了Java中com.example.jingbin.cloudreader.bean.MovieDetailBean類的典型用法代碼示例。如果您正苦於以下問題:Java MovieDetailBean類的具體用法?Java MovieDetailBean怎麽用?Java MovieDetailBean使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MovieDetailBean類屬於com.example.jingbin.cloudreader.bean包,在下文中一共展示了MovieDetailBean類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: transformData
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
/**
* 異步線程轉換數據
*/
private void transformData(final MovieDetailBean movieDetailBean) {
new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < movieDetailBean.getDirectors().size(); i++) {
movieDetailBean.getDirectors().get(i).setType("導演");
}
for (int i = 0; i < movieDetailBean.getCasts().size(); i++) {
movieDetailBean.getCasts().get(i).setType("演員");
}
OneMovieDetailActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
setAdapter(movieDetailBean);
}
});
}
}).start();
}
示例2: setAdapter
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
/**
* 設置導演&演員adapter
*/
private void setAdapter(MovieDetailBean movieDetailBean) {
bindingContentView.xrvCast.setVisibility(View.VISIBLE);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(OneMovieDetailActivity.this);
mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
bindingContentView.xrvCast.setLayoutManager(mLayoutManager);
bindingContentView.xrvCast.setPullRefreshEnabled(false);
bindingContentView.xrvCast.setLoadingMoreEnabled(false);
// 需加,不然滑動不流暢
bindingContentView.xrvCast.setNestedScrollingEnabled(false);
bindingContentView.xrvCast.setHasFixedSize(false);
MovieDetailAdapter mAdapter = new MovieDetailAdapter();
mAdapter.addAll(movieDetailBean.getDirectors());
mAdapter.addAll(movieDetailBean.getCasts());
bindingContentView.xrvCast.setAdapter(mAdapter);
}
示例3: transformData
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
/**
* 異步線程轉換數據
*/
private void transformData(final MovieDetailBean movieDetailBean) {
new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < movieDetailBean.getDirectors().size(); i++) {
movieDetailBean.getDirectors().get(i).setType("導演");
}
for (int i = 0; i < movieDetailBean.getCasts().size(); i++) {
movieDetailBean.getCasts().get(i).setType("演員");
}
MovieDetailActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
setAdapter(movieDetailBean);
}
});
}
}).start();
}
示例4: setAdapter
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
/**
* 設置導演&演員adapter
*/
private void setAdapter(MovieDetailBean movieDetailBean) {
binding.xrvCast.setVisibility(View.VISIBLE);
LinearLayoutManager mLayoutManager = new LinearLayoutManager(MovieDetailActivity.this);
mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
binding.xrvCast.setLayoutManager(mLayoutManager);
binding.xrvCast.setPullRefreshEnabled(false);
binding.xrvCast.setLoadingMoreEnabled(false);
// 需加,不然滑動不流暢
binding.xrvCast.setNestedScrollingEnabled(false);
binding.xrvCast.setHasFixedSize(false);
MovieDetailAdapter mAdapter = new MovieDetailAdapter();
mAdapter.addAll(movieDetailBean.getDirectors());
mAdapter.addAll(movieDetailBean.getCasts());
binding.xrvCast.setAdapter(mAdapter);
}
示例5: loadMovieDetail
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
private void loadMovieDetail() {
Subscription get = HttpClient.Builder.getDouBanService().getMovieDetail(subjectsBean.getId())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<MovieDetailBean>() {
@Override
public void onCompleted() {
showContentView();
}
@Override
public void onError(Throwable e) {
showError();
}
@Override
public void onNext(final MovieDetailBean movieDetailBean) {
// 上映日期
bindingHeaderView.tvOneDay.setText(String.format("上映日期:%s", movieDetailBean.getYear()));
// 製片國家
bindingHeaderView.tvOneCity.setText(String.format("製片國家/地區:%s", StringFormatUtil.formatGenres(movieDetailBean.getCountries())));
bindingHeaderView.setMovieDetailBean(movieDetailBean);
bindingContentView.setBean(movieDetailBean);
bindingContentView.executePendingBindings();
mMoreUrl = movieDetailBean.getAlt();
mMovieName = movieDetailBean.getTitle();
transformData(movieDetailBean);
}
});
addSubscription(get);
}
示例6: loadMovieDetail
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
private void loadMovieDetail() {
// 初始化...
// binding.include.tvOneCity.setText("製片國家/地區:");
// binding.include.tvOneDay.setText("上映日期:");
// binding.tvOneTitle.setText("");
Subscription get = HttpClient.Builder.getDouBanService().getMovieDetail(subjectsBean.getId())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<MovieDetailBean>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(final MovieDetailBean movieDetailBean) {
// 上映日期
binding.include.tvOneDay.setText("上映日期:" + movieDetailBean.getYear());
// 製片國家
binding.include.tvOneCity.setText("製片國家/地區:" + StringFormatUtil.formatGenres(movieDetailBean.getCountries()));
binding.include.setMovieDetailBean(movieDetailBean);
binding.setMovieDetailBean(movieDetailBean);
mMoreUrl = movieDetailBean.getAlt();
mMovieName = movieDetailBean.getTitle();
transformData(movieDetailBean);
}
});
}
示例7: getMovieDetail
import com.example.jingbin.cloudreader.bean.MovieDetailBean; //導入依賴的package包/類
/**
* 獲取電影詳情
*
* @param id 電影bean裏的id
*/
@GET("v2/movie/subject/{id}")
Observable<MovieDetailBean> getMovieDetail(@Path("id") String id);