Exemplo n.º 1
0
  private MyLocationInfo() {
    context = ZApplication.getInstance();
    locData = new LocationData();

    myListener = new MyLocationListenner();

    mLocClient = new LocationClient(context);
    option = new LocationClientOption();
    init();
  }
Exemplo n.º 2
0
  private void loadVideoData() {
    rlVideoContent = (RelativeLayout) findViewById(R.id.video_view);
    //		rlVideoContent.setOnClickListener(this);

    if (PluginUtils.isPluginMounted()) {
      mEffects = new XEffects();
    }

    userID = ActiveAccount.getInstance(ZApplication.getInstance()).getUID();
    String diaryString = getIntent().getStringExtra("diarystring");
    myDiary = new Gson().fromJson(diaryString, MyDiary.class);
    String diaryEditString =
        getIntent().getStringExtra(DiaryEditPreviewActivity.INTENT_ACTION_EDIT_NOTELIST);
    diaryEditNote = new Gson().fromJson(diaryEditString, DiaryEditNote.class);
    curOriginalVideoPath = diaryEditNote.mediaPath;
    //		diaryUUID = getIntent().getStringExtra("diaryuuid");
    //		myDiary = DiaryManager.getInstance().findMyDiaryByUUID(diaryUUID);
    //		String videoUrl = myDiary.getMainUrl();
    //
    //		MediaValue mediaValue = AccountInfo.getInstance(userID).mediamapping.getMedia(userID,
    // videoUrl);
    //		if (mediaValue != null) {
    //			videoPath =  Environment.getExternalStorageDirectory() + mediaValue.path;
    //		}
    videoPath = myDiary.getMainPath();
    Log.d(TAG, "videoPath = " + videoPath);
    videoDuration = new Mp4InfoUtils(videoPath).totaltime;
    curVideoDuration = videoDuration;
    curVideoPath = videoPath;

    startMontageTime = 0;
    endMontageTime = videoDuration;
    montageView.setTotalTime(videoDuration);
    montageView.setVideoMontageChangeListener(this);
    // 播放时间
    if (null == mMediaPlayer) {
      mMediaPlayer = new XMediaPlayer(this, mEffects, true);
      mMediaPlayer.setUpdateTimePeriod(0.1f);
      mMediaPlayer.setListener(new MyOnInfoListener());
      rlVideoContent.addView((View) mMediaPlayer.getXSurfaceView());
      if (videoPath != null) {
        mMediaPlayer.open(videoPath);
      }
    }
    generateThumbsCovers();
  }
Exemplo n.º 3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_diary_praise);

    diaryID = getIntent().getStringExtra("diaryID");

    userID = ActiveAccount.getInstance(ZApplication.getInstance()).getUID();
    ai = AccountInfo.getInstance(userID);
    ZDialog.show(R.layout.progressdialog, true, true, this);
    Requester2.getDiaryForwardUsers(getHandler(), diaryID, null, null);

    otherUserID = getIntent().getStringExtra(INTENT_ACTION_USERID);

    isShowAllPraise = false;
    inflater = LayoutInflater.from(this);
    findViewById(R.id.iv_back).setOnClickListener(this);
    listView = (PullToRefreshListView) findViewById(R.id.lv_activity_diary_praise);
    listView.setOnRefreshListener(this);
    dpList = new ArrayList<GsonResponse2.getDiaryForwardUsers>();

    lv = listView.getRefreshableView();
  }