1
0
Fork 0
mirror of https://github.com/vanitasvitae/Spherical synced 2025-12-10 22:31:11 +01:00

Fix warnings, add german translation

This commit is contained in:
vanitasvitae 2017-09-15 01:30:36 +02:00
parent a0d7071861
commit bd921bfc1b
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 73 additions and 19 deletions

View file

@ -112,7 +112,7 @@ public class MainActivity extends AppCompatActivity {
//App was launched via launcher icon
//TODO: Remove later together with launcher intent filter
default:
Toast.makeText(this, R.string.prompt_share_image, Toast.LENGTH_LONG).show();
Toast.makeText(this, R.string.toast_prompt_share_image, Toast.LENGTH_LONG).show();
}
}
@ -139,9 +139,8 @@ public class MainActivity extends AppCompatActivity {
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
handleSentImageIntent(cachedIntent);
} else {
Toast.makeText(this, R.string.missing_permission, Toast.LENGTH_LONG).show();
Toast.makeText(this, R.string.toast_missing_permission, Toast.LENGTH_LONG).show();
}
return;
}
}
}
@ -173,7 +172,7 @@ public class MainActivity extends AppCompatActivity {
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_force_sphere:
Toast.makeText(this, R.string.not_yet_implemented, Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.toast_not_yet_implemented, Toast.LENGTH_SHORT).show();
return true;
}
@ -191,7 +190,7 @@ public class MainActivity extends AppCompatActivity {
Uri imageUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
if (imageUri == null) {
Toast.makeText(this, R.string.file_not_found, Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.toast_file_not_found, Toast.LENGTH_SHORT).show();
return;
}
@ -227,9 +226,11 @@ public class MainActivity extends AppCompatActivity {
}
} catch (FileNotFoundException e) {
e.printStackTrace();
Log.e(TAG, "File not found.", e);
Toast.makeText(this, R.string.toast_file_not_found, Toast.LENGTH_SHORT).show();
} catch (IOException e) {
e.printStackTrace();
Log.e(TAG, "IOException: ", e);
Toast.makeText(this, R.string.toast_io_error, Toast.LENGTH_SHORT).show();
}
}
@ -252,10 +253,10 @@ public class MainActivity extends AppCompatActivity {
} catch (FileNotFoundException e) {
Log.e(TAG, "File not found.", e);
Toast.makeText(this, R.string.file_not_found, Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.toast_file_not_found, Toast.LENGTH_SHORT).show();
} catch (IOException e) {
Log.e(TAG, "IOException: ", e);
Toast.makeText(this, R.string.ioerror, Toast.LENGTH_SHORT).show();
Toast.makeText(this, R.string.toast_io_error, Toast.LENGTH_SHORT).show();
}
}

View file

@ -10,8 +10,55 @@ import android.util.Log;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import static android.opengl.GLES20.*;
import static android.opengl.GLUtils.getEGLErrorString;
import static android.opengl.GLES20.GL_COLOR_BUFFER_BIT;
import static android.opengl.GLES20.GL_COMPILE_STATUS;
import static android.opengl.GLES20.GL_CULL_FACE;
import static android.opengl.GLES20.GL_CW;
import static android.opengl.GLES20.GL_DEPTH_BUFFER_BIT;
import static android.opengl.GLES20.GL_DEPTH_TEST;
import static android.opengl.GLES20.GL_FLOAT;
import static android.opengl.GLES20.GL_FRAGMENT_SHADER;
import static android.opengl.GLES20.GL_LINEAR;
import static android.opengl.GLES20.GL_LINK_STATUS;
import static android.opengl.GLES20.GL_NEAREST;
import static android.opengl.GLES20.GL_TEXTURE0;
import static android.opengl.GLES20.GL_TEXTURE_2D;
import static android.opengl.GLES20.GL_TEXTURE_MAG_FILTER;
import static android.opengl.GLES20.GL_TEXTURE_MIN_FILTER;
import static android.opengl.GLES20.GL_TRIANGLES;
import static android.opengl.GLES20.GL_TRUE;
import static android.opengl.GLES20.GL_UNSIGNED_SHORT;
import static android.opengl.GLES20.GL_VERTEX_SHADER;
import static android.opengl.GLES20.glActiveTexture;
import static android.opengl.GLES20.glAttachShader;
import static android.opengl.GLES20.glBindTexture;
import static android.opengl.GLES20.glClear;
import static android.opengl.GLES20.glClearColor;
import static android.opengl.GLES20.glCompileShader;
import static android.opengl.GLES20.glCreateProgram;
import static android.opengl.GLES20.glCreateShader;
import static android.opengl.GLES20.glDeleteProgram;
import static android.opengl.GLES20.glDeleteShader;
import static android.opengl.GLES20.glDisableVertexAttribArray;
import static android.opengl.GLES20.glDrawElements;
import static android.opengl.GLES20.glEnable;
import static android.opengl.GLES20.glEnableVertexAttribArray;
import static android.opengl.GLES20.glFrontFace;
import static android.opengl.GLES20.glGenTextures;
import static android.opengl.GLES20.glGetAttribLocation;
import static android.opengl.GLES20.glGetProgramInfoLog;
import static android.opengl.GLES20.glGetProgramiv;
import static android.opengl.GLES20.glGetShaderInfoLog;
import static android.opengl.GLES20.glGetShaderiv;
import static android.opengl.GLES20.glGetUniformLocation;
import static android.opengl.GLES20.glLinkProgram;
import static android.opengl.GLES20.glShaderSource;
import static android.opengl.GLES20.glTexParameteri;
import static android.opengl.GLES20.glUniform1i;
import static android.opengl.GLES20.glUniformMatrix4fv;
import static android.opengl.GLES20.glUseProgram;
import static android.opengl.GLES20.glVertexAttribPointer;
import static android.opengl.GLES20.glViewport;
public class Renderer implements GLSurfaceView.Renderer {