正在查看: 爱心e站 v1.0.0 应用的 ShowLargerPhotoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 爱心e站 v1.0.0 应用的 ShowLargerPhotoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.newheyd.JZKFcanjiren.LargerPhoto;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.TextView;
import com.newheyd.JZKFcanjiren.BaseActivity;
import com.newheyd.JZKFcanjiren.Bean.AvatarBean;
import com.newheyd.JZKFcanjiren.LargerPhoto.view.HackyViewPager;
import com.newheyd.JZKFcanjiren.R;
import com.newheyd.JZKFcanjiren.model.BaseResult;
import com.newheyd.JZKFcanjiren.net.NewHYTask;
import java.util.ArrayList;
public class ShowLargerPhotoActivity extends BaseActivity {
private LargerPagerAdapter largerPagerAdapter;
private TextView mTvBack;
private TextView mTvIndex;
private ArrayList<AvatarBean> photos;
private int position = 0;
private HackyViewPager viewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_show_larger_photo);
super.onCreate(savedInstanceState);
initPhoto();
}
public void initPhoto() {
this.largerPagerAdapter = new LargerPagerAdapter(this.mContext, this.photos);
this.viewPager.setAdapter(this.largerPagerAdapter);
this.viewPager.setCurrentItem(this.position);
this.mTvIndex.setText(String.valueOf(this.position + 1) + "/" + String.valueOf(this.photos.size()));
this.viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
ShowLargerPhotoActivity.this.mTvIndex.setText(String.valueOf(position + 1) + "/" + String.valueOf(ShowLargerPhotoActivity.this.photos.size()));
}
@Override
public void onPageScrollStateChanged(int state) {
}
});
}
@Override
public void onResponseBefore(NewHYTask task) {
}
@Override
public void onResponseAfter(NewHYTask task) {
}
@Override
public void onResponseSuccessful(NewHYTask task, BaseResult object) {
}
@Override
public void onResponseError(NewHYTask task, BaseResult object) {
}
@Override
public void onServerError(NewHYTask task, int failedType) {
}
@Override
public void initViews() {
this.mTvBack = (TextView) findViewById(R.id.tv_back);
this.mTvIndex = (TextView) findViewById(R.id.tv_index);
this.viewPager = (HackyViewPager) findViewById(R.id.view_pager);
}
@Override
public void getExtraParam() {
this.photos = (ArrayList) getIntent().getSerializableExtra("photos");
this.position = getIntent().getIntExtra("position", 0);
}
@Override
public void setListener() {
this.mTvBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ShowLargerPhotoActivity.this.finish();
}
});
}
}