Compare commits

...
Author SHA1 Message Date
khanhduytran0 517cd06f94 Allow write log even not enabled (debug) 2020-08-09 20:24:30 +07:00
khanhduytran0 b19df4e430 Another fix CI build error 2020-08-09 20:03:24 +07:00
khanhduytran0 788c51f586 Fix build error compiling hidden API 2020-08-09 19:53:51 +07:00
khanhduytran0 46421a9ee0 Fix build error 2020-08-09 19:27:46 +07:00
LegacyGamerHD ae8e9e21d1 Merge remote-tracking branch 'origin/gl4es' into dalvikvm_gl4es 2020-08-09 13:42:43 +02:00
Tran Khanh Duy 4f2dc7eb25 Update badge branch 2020-08-09 17:37:17 +07:00
Tran Khanh Duy c2ded22c38 .travis.yml: dalvikvm_gl4es 2020-08-09 17:36:06 +07:00
Tran Khanh Duy 6307f6cbcb Merge pull request #274 from PojavLauncherTeam/dalvikvm_gl4es_fixc
Bring latest commits to dalvikvm_gl4es
2020-08-09 17:34:08 +07:00
Tran Khanh Duy d16ca39c59 Merge branch 'dalvikvm_gl4es' into dalvikvm_gl4es_fixc 2020-08-09 17:33:48 +07:00
Tran Khanh Duy 515d2eaa4e Create LICENSE 2020-07-28 06:26:37 +07:00
Tran Khanh Duy 7ab71f5f7a Merge pull request #253 from khanhduytran0/dalvikvm_gl4es_merge
Merge into dalvikvm branch
2020-07-27 21:03:10 +07:00
Tran Khanh Duy 2f575782a1 Merge branch 'dalvikvm_gl4es' into dalvikvm_gl4es_merge 2020-07-27 20:59:56 +07:00
khanhduytran0 8426c2fbda Solution found!
twaik/libcw or shodruky-rhyammer/gl-streaming but I'm busy at v3
2020-05-21 13:11:42 +07:00
khanhduytran0 d0eeef05e2 Update README.md 2020-04-20 05:59:59 +07:00
khanhduytran0 169cf25b28 Update README.md 2020-04-20 05:53:04 +07:00
khanhduytran0 8987d065ce Share EGL context attempt 2020-04-20 05:19:15 +07:00
khanhduytran0 82778a6352 add gen 2020-04-19 13:25:08 +07:00
khanhduytran0 ee30c7e83e More attempt hack EGL 2020-04-19 10:16:05 +07:00
khanhduytran0 1f02968e30 Attempt EGL hack stuff 2020-04-18 20:03:52 +07:00
khanhduytran0 bc702243de Launch using app_process32 2020-04-17 05:15:49 +07:00
khanhduytran0 d542f1c947 Dalvikvm 2020-04-16 08:16:46 +07:00
26 changed files with 146618 additions and 31 deletions

No files matched your search

+1 -1
View File
@@ -56,4 +56,4 @@ deploy:
overwrite: true
target_commitish: $TRAVIS_COMMIT
on:
branch: gl4es
branch: dalvikvm_gl4es
+13 -3
View File
@@ -1,4 +1,4 @@
![badge](https://api.travis-ci.com/PojavLauncherTeam/PojavLauncher.svg?branch=gl4es)
![badge](https://api.travis-ci.com/PojavLauncherTeam/PojavLauncher.svg?branch=dalvikvm_gl4es)
# PojavLauncher
An open source Minecraft: Java Edition launcher for Android based from Boardwalk. Support up-to Minecraft 1.11
(Codes has not been sorted yet, it contains ton of classes without packing to module).
@@ -9,8 +9,14 @@ Discord server: https://discord.gg/6RpEJda
- Impossible for directly run. There's RoboVM but is AOT Compiler. You could also try UTM with Android-x86.
- OpenJDK 9 and GL4ES has iOS port so maybe run in a jailbreaked device. I don't have a Mac OS X device to build one.
## Installing OptiFine?
Follow steps [here](https://github.com/khanhduytran0/PojavLauncher/wiki/Install-OptiFine).
## About this branch
- This branch attempt to launch Minecraft using command line like `dalvikvm` and `app_process`.
- Status: working partial, EGL Context not yet shared, process get crashed if attempt to execute OpenGL command.
## Anything if this successful?
- Able to custom min/max RAM heap.
- Solve some incompatible issues.
## Installing Forge?
Not implemented yet.
@@ -131,6 +137,9 @@ Increase max DX references. Launcher Options -> Settings -> Increase max DX refe
## A note about 1.12.x
- Minecraft 1.12.x can be run on Android 8.0 and above by use d8 for desugar and dexing in the latest v2, but will crash in singleplayer.
## Solution found!
- [twaik/libcw](https://github.com/twaik/libcw) or [shodruky-rhyammer/gl-streaming](https://github.com/shodruky-rhyammer/gl-streaming) but I'm busy at v3.
## License
- PojavLauncher is licensed under [GNU GPLv3](https://github.com/khanhduytran0/PojavLauncher/blob/master/LICENSE).
@@ -144,3 +153,4 @@ Increase max DX references. Launcher Options -> Settings -> Increase max DX refe
- (v3) PRoot: [GNU GPLv2 License](https://github.com/termux/proot/blob/master/COPYING).<br>
- (v3) XVnc: [GNU GPLv3 License](https://github.com/theqvd/qvd-client-android/blob/master/LICENSE.txt).
- (all) LWJGL 2: [Legacy LWJGL License](http://legacy.lwjgl.org/license.php.html).<br>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package net.kdt.pojavlaunch;
public final class BuildConfig {
public final static boolean DEBUG = true;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gles_jni;
import javax.microedition.khronos.egl.*;
import javax.microedition.khronos.opengles.*;
public class EGLContextImpl extends EGLContext
{
public EGLContextImpl(long ctx) {
}
@Override
public GL getGL() {
return null;
}
@Override
public boolean equals(Object o) {
return false;
}
@Override
public int hashCode() {
return 0;
}
}
@@ -0,0 +1,129 @@
package com.kdt.minecraftegl;
import android.app.*;
import android.content.*;
import android.os.*;
import android.system.*;
import dalvik.system.*;
import java.lang.reflect.*;
import java.util.*;
import javax.microedition.khronos.egl.*;
import net.kdt.pojavlaunch.*;
import net.kdt.pojavlaunch.exit.*;
import static org.lwjgl.opengl.AndroidContextImplementation.*;
import android.content.pm.*;
public class MinecraftEGLInitializer
{
public static void main(String[] args) throws Throwable {
try {
// long surfaceAddress = Long.parseLong(args[0]);
// Disable for testing
ExitManager.disableSystemExit();
MainActivity.launchClassPath = args[0];
MainActivity.launchOptimizedDirectory = args[1];
MainActivity.launchLibrarySearchPath = args[2];
// System.out.println("Received EGL context address: " + Long.toString(eglAddress));
String minecraftMainClass = args[3];
List<String> minecraftArgs = new ArrayList<String>();
for (int i = 5; i < args.length; i++) {
if (args[i] != null && !args[i].isEmpty())
minecraftArgs.add(args[i]);
}
initEnvs();
EGL10 egl;
theEgl = egl = (EGL10) EGLContext.getEGL(); // context.getEGL();
context = egl.eglGetCurrentContext(); // new EGLContextImpl(eglAddress);
display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
read = egl.eglGetCurrentSurface(EGL10.EGL_READ);
draw = egl.eglGetCurrentSurface(EGL10.EGL_DRAW);
boolean makeCurrBool = theEgl.eglMakeCurrent(display, read, draw, context);
System.out.println("Gave up context: " + context + ", makeCurrent: " + Boolean.toString(makeCurrBool));
int eglGetError = egl.eglGetError();
System.out.println("eglGetError: " + Integer.toString(eglGetError) + ", success: " + Boolean.toString(eglGetError == EGL10.EGL_SUCCESS));
System.out.println("user.home: " + System.getProperty("user.home"));
// ActivityThread.currentActivityThread().getSystemContext().startActivity(new Intent().setComponent(new ComponentName("net.kdt.pojavlaunch", ".CustomControlsActivity")));
/*
GL10 gl = ((GL10) context.getGL());
gl.glColor4f(0.5f, 0.5f, 0.5f, 0.5f);
gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
int glErr = gl.glGetError();
*/
DexClassLoader classLoader = new DexClassLoader(args[0], args[1], args[2], MinecraftEGLInitializer.class.getClassLoader());
Class minecraftClass = classLoader.loadClass(minecraftMainClass);
Method minecraftMethod = minecraftClass.getMethod("main", String[].class);
minecraftMethod.invoke(null, new Object[]{minecraftArgs.toArray(new String[0])});
} catch (Throwable th) {
System.err.println("UNEXCEPTED SHUTTING DOWN");
th.printStackTrace();
System.exit(1);
}
}
private static EGLConfig getEglConfig(EGL10 egl, EGLDisplay eglDisplay, int[] configAttributes) {
EGLConfig[] configs = new EGLConfig[1];
int[] numConfigs = new int[1];
if (!egl.eglChooseConfig(eglDisplay, configAttributes, configs, configs.length, numConfigs)) {
throw new RuntimeException(
"eglChooseConfig failed: 0x" + Integer.toHexString(egl.eglGetError()));
}
if (numConfigs[0] <= 0) {
throw new RuntimeException("Unable to find any matching EGL config");
}
final EGLConfig eglConfig = configs[0];
if (eglConfig == null) {
throw new RuntimeException("eglChooseConfig returned null");
}
return eglConfig;
}
public static void forceUserHome(String s) throws Exception {
Properties props = System.getProperties();
Class clazz = props.getClass();
Field f = null;
while (clazz != null) {
try {
f = clazz.getDeclaredField("defaults");
break;
} catch (Exception e) {
clazz = clazz.getSuperclass();
}
}
if (f != null) {
f.setAccessible(true);
Properties p = ((Properties) f.get(props));
p.put("user.home", s);
// p.put("user.dir", s);
}
}
public static void initEnvs() throws Exception {
Os.setenv("LIBGL_MIPMAP", "3", true);
System.setProperty("user.home", Tools.MAIN_PATH);
if (!System.getProperty("user.home", "/").equals(Tools.MAIN_PATH)) {
forceUserHome(Tools.MAIN_PATH);
}
System.setProperty("org.apache.logging.log4j.level", "INFO");
System.setProperty("org.apache.logging.log4j.simplelog.level", "INFO");
// Disable javax management for smaller launcher.
System.setProperty("log4j2.disable.jmx", "true");
//System.setProperty("net.zhuoweizhang.boardwalk.org.apache.logging.log4j.level", "INFO");
//System.setProperty("net.zhuoweizhang.boardwalk.org.apache.logging.log4j.simplelog.level", "INFO");
// Change info for useful dump
System.setProperty("java.vm.info", Build.MANUFACTURER + " " + Build.MODEL + ", Android " + Build.VERSION.RELEASE);
}
}
@@ -0,0 +1,32 @@
package com.kdt.minecraftegl;
import android.view.*;
import java.lang.reflect.*;
public class SurfaceUtils
{
public static long getSurfaceAddress(Surface surface) {
try {
Field field = surface.getClass().getDeclaredField("mNativeObject");
field.setAccessible(true);
return (long) field.get(surface);
} catch (Throwable th) {
System.err.println("Unable to get surface address!");
th.printStackTrace();
}
return -1l;
}
public static Surface createSurfaceByAddress(long surfaceAddress) {
try {
Constructor c = Surface.class.getDeclaredConstructor(long.class);
c.setAccessible(true);
return (Surface) c.newInstance(surfaceAddress);
} catch (Throwable th) {
System.err.println("Unable to create surface by address!");
th.printStackTrace();
}
return null;
}
}
+23 -1
View File
@@ -37,6 +37,9 @@ import android.graphics.*;
import java.awt.image.*;
import javax.imageio.stream.*;
import java.io.*;
import java.lang.reflect.*;
import java.util.jar.*;
import java.util.zip.*;
/**
* The ImageIO class provides static methods to perform reading and writing
@@ -428,7 +431,26 @@ public final class ImageIO {
if (input == null) {
throw new IllegalArgumentException("input == null!");
}
// DEBUG
/*
if (input.getClass().getName().equals("libcore.net.url.JarURLConnectionImpl$JarURLConnectionInputStream")) {
try {
Field f = input.getClass().getDeclaredField("jarFile");
f.setAccessible(true);
JarFile jf = (JarFile) f.get(input);
Field f2 = input.getClass().getField("fileName");
f2.setAccessible(true);
System.out.println("Found JarFile = " + f2.get(jf).toString());
} catch (Throwable th) {
System.err.println("Unable to get jarFile.");
System.err.println("__________ BEGIN ERR");
th.printStackTrace();
System.err.println("__________ ENDED ERR");
}
}
*/
ImageInputStream stream = createImageInputStream(input);
return read(stream);
}
@@ -24,6 +24,7 @@ package javax.imageio.spi;
import java.io.File;
import java.io.IOException;
import javax.imageio.stream.ImageInputStream;
import net.kdt.pojavlaunch.*;
/**
* The ImageInputStreamSpi abstract class is a service provider interface (SPI)
@@ -126,6 +127,6 @@ public abstract class ImageInputStreamSpi extends IIOServiceProvider implements
* if an I/O exception has occurred.
*/
public ImageInputStream createInputStreamInstance(Object input) throws IOException {
return createInputStreamInstance(input, true, null);
return createInputStreamInstance(input, true, new File(Tools.datapath, "cache"));
}
}
@@ -33,6 +33,11 @@ import org.lwjgl.opengl.*;
import sun.security.jca.*;
import android.app.AlertDialog;
import android.graphics.drawable.Drawable;
import net.kdt.pojavlaunch.value.customcontrols.*;
import com.google.android.gles_jni.*;
import com.kdt.minecraftegl.*;
public class MainActivity extends AppCompatActivity implements OnTouchListener, OnClickListener
{
@@ -151,6 +156,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
}
});
/*
ExitManager.setExitTrappedListener(new ExitManager.ExitTrappedListener(){
@Override
public void onExitTrapped()
@@ -202,16 +208,17 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
Log.w(Tools.APP_NAME, "Could not disable System.exit() method!", th);
}
*/
File optDir = getDir("dalvik-cache", 0);
optDir.mkdirs();
launchOptimizedDirectory = optDir.getAbsolutePath();
mProfile = PojavProfile.getCurrentProfileContent(this);
mVersionInfo = Tools.getVersionInfo(mProfile.getVersion());
setTitle("Minecraft " + mProfile.getVersion());
initEnvs();
//System.loadLibrary("gl4es");
/*
if (mVersionInfo.arguments != null) {
@@ -659,6 +666,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
});
glSurfaceView.setOnTouchListener(glTouchListener);
glSurfaceView.setRenderer(new GLTextureView.Renderer() {
private volatile long eglContext = 0l;
@Override
public void onSurfaceDestroyed(GL10 gl) {
Log.d(Tools.APP_NAME, "Surface destroyed.");
@@ -670,6 +678,8 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
calculateMcScale();
EGL10 egl10 = (EGL10) EGLContext.getEGL();
/*
AndroidContextImplementation.theEgl = egl10;
AndroidContextImplementation.context = egl10.eglGetCurrentContext();
AndroidContextImplementation.display = egl10.eglGetCurrentDisplay();
@@ -678,7 +688,20 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
egl10.eglMakeCurrent(AndroidContextImplementation.display, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
System.out.println(new StringBuffer().append("Gave up context: ").append(AndroidContextImplementation.context).toString());
AndroidDisplay.windowWidth += navBarHeight;
*/
EGLContextImpl eglContextImpl = (EGLContextImpl) egl10.eglGetCurrentContext();
try {
Field eglContextField = eglContextImpl.getClass().getDeclaredField("mEGLContext");
eglContextField.setAccessible(true);
eglContext = (long) eglContextField.get(eglContextImpl);
} catch (Throwable th) {
Tools.showError(MainActivity.this, th, true);
}
new Thread(new Runnable(){
@@ -687,7 +710,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
{
try {
Thread.sleep(200);
runCraft();
runCraft(eglContext);
} catch (Throwable e) {
Tools.showError(MainActivity.this, e, true);
}
@@ -905,7 +928,6 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
Tools.showError(MainActivity.this, e, true);
}
}
private boolean isPointerCaptureSupported() {
return Build.VERSION.SDK_INT >= 26;
}
@@ -1001,7 +1023,8 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
public static String launchClassPath;
public static String launchOptimizedDirectory;
public static String launchLibrarySearchPath;
private void runCraft() throws Throwable //oncreate
private void runCraft(long eglContext) throws Throwable
{
LoggerJava.OnStringPrintListener printLog = new LoggerJava.OnStringPrintListener(){
@Override
@@ -1027,14 +1050,14 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
launchClassPath = Tools.generateLaunchClassPath(mProfile.getVersion());
launchLibrarySearchPath = getApplicationInfo().nativeLibraryDir;
/* gl4es
if (mVersionInfo.mainClass.equals("net.minecraft.launchwrapper.Launch")) {
net.minecraft.launchwrapper.Launch.main(launchArgs);
} else {
/*
PrintStream theStreamErr = new PrintStream(new LoggerJava.LoggerOutputStream(System.err, printLog));
System.setErr(theStreamErr);
*/
fixRSAPadding(this);
appendlnToLog("Running Minecraft with classpath: \n" + launchClassPath + "\n", false);
@@ -1042,17 +1065,77 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
// Load classpath
DexClassLoader launchBaseLoader = new DexClassLoader(launchClassPath, launchOptimizedDirectory, launchLibrarySearchPath, getClassLoader());
// Launch Minecraft
Class mainClass = launchBaseLoader.loadClass(mVersionInfo.mainClass);
Method mainMethod = mainClass.getMethod("main", String[].class);
mainMethod.setAccessible(true);
mainMethod.invoke(null, new Object[]{launchArgs});
LoggerJava.OnStringPrintListener printLog = new LoggerJava.OnStringPrintListener(){
@Override
public void onCharPrint(char c) {
appendToLog(Character.toString(c));
}
};
*/
fixRSAPadding(this);
System.out.println("> Running Minecraft with classpath:");
System.out.println(launchClassPath);
System.out.println();
ShellProcessOperation shell = new ShellProcessOperation(new ShellProcessOperation.OnPrintListener(){
@Override
public void onPrintLine(String text) {
appendToLog(text);
}
}, "sh");
shell.initInputStream(this);
shell.writeToProcess("base=/system");
shell.writeToProcess("export CLASSPATH=" + getApplicationInfo().publicSourceDir); // ":" + launchClassPath + "\n");
shell.writeToProcess("export HOME=" + Tools.MAIN_PATH);
String argStr = "";
for (String arg : launchArgs) {
argStr = argStr + " " + arg;
}
// app_process32 because this app is 32-bit only.
String execAppProcessStr = (
"exec app_process32 " +
"-Xmx512M " + // Max heap
"-Djava.library.path=/system/lib:" + getApplicationInfo().nativeLibraryDir + " " +
"$base/bin com.kdt.minecraftegl.MinecraftEGLInitializer " +
/* Long.toString(SurfaceUtils.getSurfaceAddress(((SurfaceView) glSurfaceView).getHolder().getSurface())) + "" + */ launchClassPath + " " + launchOptimizedDirectory + " " + launchLibrarySearchPath + " " +
this.mVersionInfo.mainClass + argStr
);
System.out.println(execAppProcessStr);
shell.writeToProcess(execAppProcessStr);
final int waitFor = shell.waitFor();
runOnUiThread(new Runnable(){
@Override
public void run()
{
AlertDialog.Builder d = new AlertDialog.Builder(MainActivity.this);
d.setTitle(R.string.mcn_exit_title);
d.setMessage("Exited with code " + waitFor);
d.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface p1, int p2)
{
// finish();
}
});
d.setCancelable(false);
d.show();
}
});
}
public static void fixRSAPadding(final Activity act) {
/*
private void createEGLHackStuff() {
}
*/
// welcome to the territory of YOLO; I'll be your tour guide for today.
final boolean isLegacyPatch = Build.VERSION.SDK_INT < 24;
@@ -1323,7 +1406,11 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
}
private void appendToLog(final String text, boolean checkAllow) {
if (checkAllow && !isLogAllow) return;
// if (checkAllow && !isLogAllow) return;
/*
private void appendToLog(final String text) {
*/
// if (!isLogAllow) r
textLog.post(new Runnable(){
@Override
public void run()
@@ -1418,6 +1505,11 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
// Toast.makeText(MainActivity.this, "Could not exit. Please force close this app.", Toast.LENGTH_LONG).show();
}
private void fullyExit()
{
// TODO: Implement this method
}
})
.show();
}
@@ -9,15 +9,18 @@ public class ShellProcessOperation
private Process process;
public ShellProcessOperation(OnPrintListener listener) throws IOException {
this.listener = listener;
process = Runtime.getRuntime().exec("/system/bin/sh");
this(listener, "sh");
}
public ShellProcessOperation(OnPrintListener listener, String command) throws IOException {
this.listener = listener;
process = Runtime.getRuntime().exec(
command
); //"/system/bin/sh -c \"" + command + "\"");
ProcessBuilder builder = new ProcessBuilder(command);
builder.redirectErrorStream(true);
process = builder.start();
//"/system/bin/sh -c \"" + command + "\"");
}
public void writeToProcess(String cmd) throws IOException {
@@ -7,12 +7,12 @@ public class ExitManager {
private static ExitTrappedListener listener;
private static Thread exitTrappedHook = new Thread(new Runnable(){
private boolean isFirst = true;
@Override
public void run()
{
if (listener != null) listener.onExitTrapped();
stopLoop = false;
while (!stopLoop) {
@@ -47,8 +47,11 @@ public class ExitManager {
{
// changeRuntimeExitDisabled(false);
Runtime.getRuntime().removeShutdownHook(exitTrappedHook);
try {
Runtime.getRuntime().removeShutdownHook(exitTrappedHook);
} catch (Throwable th) {
stopExitLoop();
}
}
// It's not safe. Add/Remove shutdown hooks will cause error.
@@ -26,6 +26,7 @@ public class AlphaVanillaTweakInjector implements IClassTransformer {
public LauncherFake(Map map) {
this.map = map;
this.map.put("fullscreen", "true");
}
public void appletResize(int width, int height) {
+2 -1
View File
@@ -115,7 +115,8 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_margin="10dp">
android:layout_margin="10dp"
android:visibility="gone">
<TextView
android:layout_height="wrap_content"