-
Notifications
You must be signed in to change notification settings - Fork 953
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from jpxiong/master
release v1.1.6
- Loading branch information
Showing
19 changed files
with
231 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
PLDroidPlayerDemo/app/src/main/java/com/pili/pldroid/playerdemo/widget/AspectLayout.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package com.pili.pldroid.playerdemo.widget; | ||
|
||
import android.annotation.TargetApi; | ||
import android.content.Context; | ||
import android.graphics.Rect; | ||
import android.util.AttributeSet; | ||
import android.util.Log; | ||
import android.util.Pair; | ||
import android.view.View; | ||
import android.widget.RelativeLayout; | ||
|
||
import com.pili.pldroid.player.common.Util; | ||
|
||
/** | ||
* Created by jerikc on 15/11/22. | ||
*/ | ||
public class AspectLayout extends RelativeLayout { | ||
private static final String TAG = "AspectLayout"; | ||
|
||
private int mWidthMeasureSpec; | ||
|
||
private int mRootHeight = 0; | ||
private int mRootWidth = 0; | ||
|
||
public AspectLayout(Context context) { | ||
super(context); | ||
initialize(context); | ||
} | ||
|
||
public AspectLayout(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
initialize(context); | ||
} | ||
|
||
public AspectLayout(Context context, AttributeSet attrs, int defStyleAttr) { | ||
super(context, attrs, defStyleAttr); | ||
initialize(context); | ||
} | ||
|
||
private void initialize(Context ctx) { | ||
} | ||
|
||
@TargetApi(21) | ||
public AspectLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { | ||
super(context, attrs, defStyleAttr, defStyleRes); | ||
} | ||
|
||
@Override | ||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | ||
Log.d(TAG, "onMeasure" + " width=[" + MeasureSpec.toString(widthMeasureSpec) + | ||
"] height=[" + View.MeasureSpec.toString(heightMeasureSpec) + "]"); | ||
|
||
Rect r = new Rect(); | ||
getWindowVisibleDisplayFrame(r); | ||
Pair<Integer, Integer> screenSize = Util.getResolution(getContext()); | ||
|
||
if (mRootWidth == 0 && mRootHeight == 0) { | ||
mRootWidth = getRootView().getWidth(); | ||
mRootHeight = getRootView().getHeight(); | ||
} | ||
int totalHeight = 0; | ||
|
||
if (screenSize.first > screenSize.second) { | ||
// land | ||
totalHeight = mRootWidth > mRootHeight ? mRootHeight : mRootWidth; | ||
} else { | ||
// port | ||
totalHeight = mRootWidth < mRootHeight ? mRootHeight : mRootWidth; | ||
} | ||
|
||
int nowHeight = r.bottom - r.top; | ||
|
||
if (totalHeight - nowHeight > totalHeight / 4) { | ||
// soft keyboard show | ||
super.onMeasure(mWidthMeasureSpec, MeasureSpec.makeMeasureSpec(nowHeight + totalHeight - nowHeight, MeasureSpec.EXACTLY)); | ||
return; | ||
} else { | ||
// soft keyboard hide | ||
} | ||
|
||
mWidthMeasureSpec = widthMeasureSpec; | ||
|
||
super.onMeasure(widthMeasureSpec, heightMeasureSpec); | ||
} | ||
} |
Binary file modified
BIN
+170 KB
(110%)
PLDroidPlayerDemo/app/src/main/jniLibs/arm64-v8a/libpldroidplayer.so
Binary file not shown.
Binary file modified
BIN
+145 KB
(110%)
PLDroidPlayerDemo/app/src/main/jniLibs/armeabi-v7a/libpldroidplayer.so
Binary file not shown.
Binary file modified
BIN
+173 KB
(110%)
PLDroidPlayerDemo/app/src/main/jniLibs/armeabi/libpldroidplayer.so
Binary file not shown.
Binary file modified
BIN
+217 KB
(110%)
PLDroidPlayerDemo/app/src/main/jniLibs/x86/libpldroidplayer.so
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.