Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
尝试修改termux-x11居中全屏
Browse files Browse the repository at this point in the history
  • Loading branch information
ewt45 committed May 27, 2023
1 parent 7850fd9 commit 5004c0a
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 9 deletions.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libGL.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libXegw.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libc++_shared.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libegwRenderer.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libglapi.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/libxkbcomp.so
Binary file not shown.
Binary file removed app/src/main/00jniLibs/armeabi-v7a/swrast_dri.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public WDesktop(){
}
@Override // com.eltechs.axs.configuration.startup.StartupAction
public void execute() {
requestUserInput(MainActivity.class);
requestUserInput(EDMainActivity.class);
// requestUserInput(
// QH.isTesting()
// ? MainActivity.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public LorieView(Context context, AttributeSet attrs, int defStyleAttr, int defS
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
try {
// SharedPreferences sp = getContext().getSharedPreferences("com.eltechs.ed.CONTAINER_CONFIG_0",Context.MODE_PRIVATE);
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
SharedPreferences sp = getContext().getSharedPreferences("com.eltechs.ed.CONTAINER_CONFIG_0",Context.MODE_PRIVATE);
// SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
String ratioStr = sp.getString("full_screen_with_ratio","");
if(ratioStr!=null && ratioStr.contains(":") ){
String[] strings1 = ratioStr.split(":");
Expand All @@ -36,11 +36,11 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int height = MeasureSpec.getSize(heightMeasureSpec);
//左右黑边
if(width*1f/height > ratio){
heightMeasureSpec = MeasureSpec.makeMeasureSpec((int) (width/ratio), MeasureSpec.EXACTLY);
widthMeasureSpec = MeasureSpec.makeMeasureSpec((int) (height*ratio), MeasureSpec.EXACTLY);
}
//上下黑边
else{
widthMeasureSpec = MeasureSpec.makeMeasureSpec((int) (height*ratio), MeasureSpec.EXACTLY);
heightMeasureSpec = MeasureSpec.makeMeasureSpec((int) (width/ratio), MeasureSpec.EXACTLY);
}
}
}catch (Exception e){
Expand Down
17 changes: 13 additions & 4 deletions app/src/main/res/layout/fragment_slideshow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="200dp"/>-->
<com.example.datainsert.exagear.test.LorieView
android:id="@+id/surfaceview"
app:layout_constraintBottom_toBottomOf="parent"
<FrameLayout
android:background="@color/primary"
android:layout_width="match_parent"
android:layout_height="200dp"/>
app:layout_constraintBottom_toBottomOf="parent"

android:layout_height="match_parent">
<com.example.datainsert.exagear.test.LorieView
android:background="#54717E"
android:id="@+id/surfaceview"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="200dp"/>

</FrameLayout>
</android.support.constraint.ConstraintLayout>

0 comments on commit 5004c0a

Please sign in to comment.