Skip to content

Commit

Permalink
修复选中图片后图片会稍微上移再放大的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Sausure committed Aug 29, 2015
1 parent 7e3e5cc commit fe7d18c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.github.obsessive.simplifyreader.ui.fragment;

import android.graphics.Rect;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -276,8 +277,14 @@ public void onClick(View v) {

@Override
public void onItemClick(PLAAdapterView<?> parent, View view, int position, long id) {
Rect frame = new Rect();
getActivity().getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);
int statusBarHeight = frame.top;

int[] location = new int[2];
view.getLocationOnScreen(location);
location[1] += statusBarHeight;

int width = view.getWidth();
int height = view.getHeight();

Expand Down

0 comments on commit fe7d18c

Please sign in to comment.