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

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
ewt45 committed Jan 23, 2023
1 parent 5d8db4b commit 52d1a8a
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
// return true;
// });
// popupMenu.show();
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("*/*");//仅显示obb类型
startActivityForResult(intent, 123);

// Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
// intent.addCategory(Intent.CATEGORY_OPENABLE);
// intent.setType("*/*");//仅显示obb类型
// startActivityForResult(intent, 123);

ProcessInstallObb.startest(this);

});
SensitivitySeekBar.create(binding.getRoot());
Expand All @@ -114,7 +117,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat


//防止多次添加
ProcessInstallObb.startest(this);




Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/com/example/datainsert/exagear/S.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class S {
"具有该文件夹的读取权限",
"具有该文件夹的写入权限",
"应用文件存储权限被禁止",
"无法找到obb数据包。请检查数据包名称和位置,或手动选择obb文件。\n*安卓11及以上,无法选择Android/obb及Android/data目录内的文件",
"无法找到obb数据包。请检查数据包名称和位置,或手动选择obb文件。",//*安卓11及以上,无法选择Android/obb及Android/data目录内的文件
"手动选择",
"所选文件不是obb数据包",
"使用自定义分辨率",
Expand Down Expand Up @@ -93,7 +93,8 @@ public class S {
"App is allowed to read the directory",
"App is allowed to write to the directory",
"App's storage permission is not granted",
"can't find exagear obb file, please check its name and location or select it manually.\n on Android11+, Android/obb and Android/data directory can't be seen in system file picker.",
"No obb detected, please try Selecting it manually",// "can't find exagear obb file, please check its name and location or select it manually.\n on Android11+, Android/obb and Android/data directory can't be seen in system file picker.",

"select manually",
"selected file is not an obb file",
"using custom resolution",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public static void start(ZipInstallerObb zipInstallerObb){
//显示fragment
edStartupActivity.getSupportFragmentManager().beginTransaction().show(fragment).addToBackStack(null).commit();

//高度怎么不wrapcontent了呢
// startupAdButtons.requestLayout();
// startupAdButtons.invalidate();
}

public static void startest(HomeFragment homeFragment){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ public void onClick(View v) {
});
LinearLayout l2 = new LinearLayout(requireContext());
l2.setOrientation(LinearLayout.HORIZONTAL);
l2.setVerticalGravity(Gravity.CENTER);
// l2.setVerticalGravity(Gravity.CENTER);
l2.addView(btn);
l2.addView(mTv);
root.addView(l2);
root.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
// l2.setMinimumHeight(50);
root.addView(l2,new ViewGroup.LayoutParams(-1,-2));

// root.addView(btn);
// root.addView(mTv);
root.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
return root;
}

Expand Down
137 changes: 75 additions & 62 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,100 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.home.HomeFragment">
<LinearLayout
android:id="@+id/touch_outer"

<ScrollView
android:id="@+id/touch_outer_scroll"
android:layout_width="match_parent"
android:background="#EFB6B6"
android:layout_height="200dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/toggle_input"
android:orientation="vertical" >
<android.support.design.widget.TextInputLayout
app:layout_constraintTop_toTopOf="parent">

android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- <Spinner-->
<!-- android:autofillHints="1111"-->
<!-- android:entries="@array/cont_pref_screen_size_entries"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"/>-->
<AutoCompleteTextView
android:inputType="none"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.design.widget.TextInputLayout>
<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="111"
android:inputType="text" />
<TextView
android:id="@+id/startupAdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:visibility="gone"
android:id="@+id/startupAdButtons"
android:layout_width="wrap_content"
android:id="@+id/touch_outer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:src="@drawable/side_nav_bar"
android:layout_width="20dp"
android:layout_height="60dp"
/>
android:background="#EFB6B6"
android:orientation="vertical">

<android.support.design.widget.TextInputLayout

android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- <Spinner-->
<!-- android:autofillHints="1111"-->
<!-- android:entries="@array/cont_pref_screen_size_entries"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"/>-->
<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="none" />
</android.support.design.widget.TextInputLayout>

<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="111"
android:inputType="text" />

<TextView
android:layout_gravity="center"
android:text="aaaaaaaa"
android:id="@+id/startupAdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
android:layout_height="wrap_content" />

<LinearLayout
android:id="@+id/startupAdButtons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">

<ImageView
android:layout_width="20dp"
android:layout_height="60dp"
android:src="@drawable/side_nav_bar" />

</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="aaaaaaaa" />
</LinearLayout>


</LinearLayout>
</ScrollView>

<Button
android:text="显示键盘"
android:id="@+id/toggle_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/touch_outer" />
android:text="显示键盘"
app:layout_constraintTop_toBottomOf="@id/touch_outer_scroll" />

<android.support.v7.widget.AppCompatButton
android:id="@+id/test_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="测试样式"
app:layout_constraintTop_toBottomOf="@id/text_home"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<!-- <LinearLayout-->
<!-- app:layout_constraintTop_toTopOf="@id/text_home"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <Button-->
<!-- android:text="111"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- style="?android:attr/buttonBarButtonStyle" />-->
<!-- <Button-->
<!-- android:text="1111"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- style="?android:attr/buttonBarButtonStyle" />-->
<!-- </LinearLayout>-->
app:layout_constraintTop_toBottomOf="@id/text_home" />
<!-- <LinearLayout-->
<!-- app:layout_constraintTop_toTopOf="@id/text_home"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content">-->
<!-- <Button-->
<!-- android:text="111"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- style="?android:attr/buttonBarButtonStyle" />-->
<!-- <Button-->
<!-- android:text="1111"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- style="?android:attr/buttonBarButtonStyle" />-->
<!-- </LinearLayout>-->
<TextView
android:id="@+id/text_home"
android:layout_width="match_parent"
Expand Down

0 comments on commit 52d1a8a

Please sign in to comment.