Fixes
This commit is contained in:
parent
c5b52b2781
commit
1feccdc26d
|
@ -176,7 +176,7 @@ public class HashtagTimelineFragment extends StatusListFragment{
|
|||
}
|
||||
|
||||
private void updateHeader(){
|
||||
if(hashtag==null)
|
||||
if(hashtag==null || getActivity()==null)
|
||||
return;
|
||||
|
||||
if(hashtag.history!=null && !hashtag.history.isEmpty()){
|
||||
|
|
|
@ -822,7 +822,9 @@ public class PhotoViewer implements ZoomPanView.Listener{
|
|||
@Override
|
||||
public boolean onError(MediaPlayer mp, int what, int extra){
|
||||
Log.e(TAG, "video player onError() called with: mp = ["+mp+"], what = ["+what+"], extra = ["+extra+"]");
|
||||
return false;
|
||||
Toast.makeText(activity, R.string.error_playing_video, Toast.LENGTH_SHORT).show();
|
||||
onStartSwipeToDismissTransition(0f);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void prepareAndStartPlayer(){
|
||||
|
|
|
@ -193,6 +193,9 @@ public class ZoomPanView extends FrameLayout implements ScaleGestureDetector.OnS
|
|||
|
||||
private float prepareTransitionCropRect(Rect rect){
|
||||
float initialScale;
|
||||
if(rect.isEmpty()){
|
||||
rect.set(rect.centerX()-child.getWidth()/2, rect.centerY()-child.getHeight()/2, rect.centerX()+child.getWidth()/2, rect.centerY()+child.getWidth()/2);
|
||||
}
|
||||
float scaleW=rect.width()/(float)child.getWidth();
|
||||
float scaleH=rect.height()/(float)child.getHeight();
|
||||
if(scaleW>scaleH){
|
||||
|
|
|
@ -608,4 +608,6 @@
|
|||
<item quantity="one">%,d post today</item>
|
||||
<item quantity="other">%,d posts today</item>
|
||||
</plurals>
|
||||
|
||||
<string name="error_playing_video">Error playing video</string>
|
||||
</resources>
|
Loading…
Reference in New Issue