-
2.idea/misc.xml
-
14app/src/main/AndroidManifest.xml
-
64app/src/main/java/de/mal_richtig/toney/MainActivity.java
-
75app/src/main/java/de/mal_richtig/toney/SplashActivity.java
-
13app/src/main/res/drawable/activity_splash.xml
-
194app/src/main/res/layout/activity_main.xml
-
BINapp/src/main/res/mipmap-hdpi/logo_toney.png
-
BINapp/src/main/res/mipmap-mdpi/logo_toney.png
-
BINapp/src/main/res/mipmap-xhdpi/logo_toney.png
-
BINapp/src/main/res/mipmap-xxhdpi/logo_toney.png
-
BINapp/src/main/res/mipmap-xxxhdpi/logo_toney.png
-
7app/src/main/res/values/colors.xml
-
4app/src/main/res/values/styles.xml
-
BINlogo-toney.png
-
198logo-toney.svg
@ -0,0 +1,75 @@ |
|||||
|
package de.mal_richtig.toney; |
||||
|
|
||||
|
import android.Manifest; |
||||
|
import android.content.Context; |
||||
|
import android.content.Intent; |
||||
|
import android.content.pm.PackageManager; |
||||
|
import android.os.Bundle; |
||||
|
import android.support.v4.app.ActivityCompat; |
||||
|
import android.support.v4.content.ContextCompat; |
||||
|
import android.support.v7.app.AppCompatActivity; |
||||
|
import android.util.Log; |
||||
|
import android.widget.Toast; |
||||
|
|
||||
|
/** |
||||
|
* Created by ermo on 07.06.17. |
||||
|
*/ |
||||
|
|
||||
|
public class SplashActivity extends AppCompatActivity { |
||||
|
|
||||
|
private static final int PERMISSION_REQUEST_CODE = 1; |
||||
|
private static final int MAX_REQUESTS = 3; |
||||
|
private int requestTryCounter = 0; |
||||
|
|
||||
|
@Override |
||||
|
protected void onResume() { |
||||
|
super.onResume(); |
||||
|
|
||||
|
if (ContextCompat.checkSelfPermission(getApplicationContext(), |
||||
|
Manifest.permission.RECORD_AUDIO) |
||||
|
!= PackageManager.PERMISSION_GRANTED) { |
||||
|
|
||||
|
// request the permission. |
||||
|
if(requestTryCounter < MAX_REQUESTS) { |
||||
|
ActivityCompat.requestPermissions(this, |
||||
|
new String[]{Manifest.permission.RECORD_AUDIO}, |
||||
|
PERMISSION_REQUEST_CODE); |
||||
|
|
||||
|
requestTryCounter++; |
||||
|
} |
||||
|
|
||||
|
} else { |
||||
|
Intent intent = new Intent(this, MainActivity.class); |
||||
|
startActivity(intent); |
||||
|
finish(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void onRequestPermissionsResult(int requestCode, |
||||
|
String permissions[], int[] grantResults) { |
||||
|
|
||||
|
Context context = getApplicationContext(); |
||||
|
|
||||
|
switch (requestCode) { |
||||
|
case PERMISSION_REQUEST_CODE: { |
||||
|
// If request is cancelled, the result arrays are empty. |
||||
|
if (grantResults.length > 0 |
||||
|
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) { |
||||
|
|
||||
|
// permission was granted, yay! |
||||
|
Log.i("XDE", "yay!"); |
||||
|
|
||||
|
} else { |
||||
|
Log.i("XDE", "doom"); |
||||
|
// permission denied, boo! |
||||
|
Toast.makeText(context, "Toney can't work without audio permission!", |
||||
|
Toast.LENGTH_LONG).show(); |
||||
|
} |
||||
|
return; |
||||
|
} |
||||
|
default: |
||||
|
Log.e("RequestPermission", "unexpected permission code"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
|
||||
|
<item |
||||
|
android:drawable="@color/colorPrimary"/> |
||||
|
|
||||
|
<item> |
||||
|
<bitmap |
||||
|
android:gravity="center" |
||||
|
android:src="@mipmap/logo_toney"/> |
||||
|
</item> |
||||
|
|
||||
|
</layer-list> |
||||
|
After Width: 72 | Height: 72 | Size: 7.0 KiB |
|
After Width: 48 | Height: 48 | Size: 3.9 KiB |
|
After Width: 96 | Height: 96 | Size: 10 KiB |
|
After Width: 144 | Height: 144 | Size: 17 KiB |
|
After Width: 192 | Height: 192 | Size: 23 KiB |
@ -1,7 +1,6 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<resources> |
<resources> |
||||
<color name="colorPrimary">#ccc</color> |
|
||||
<color name="colorPrimaryDark">#777</color> |
|
||||
<color name="colorAccent">#000</color> |
|
||||
<color name="colorAccent">#000</color> |
|
||||
|
<color name="colorPrimary">#fa0</color> |
||||
|
<color name="colorPrimaryDark">#d30</color> |
||||
|
<color name="colorAccent">#f3d</color> |
||||
</resources> |
</resources> |
||||
|
After Width: 667 | Height: 667 | Size: 104 KiB |
@ -0,0 +1,198 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) --> |
||||
|
|
||||
|
<svg |
||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/" |
||||
|
xmlns:cc="http://creativecommons.org/ns#" |
||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
||||
|
xmlns:svg="http://www.w3.org/2000/svg" |
||||
|
xmlns="http://www.w3.org/2000/svg" |
||||
|
xmlns:xlink="http://www.w3.org/1999/xlink" |
||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
||||
|
width="67.73333mm" |
||||
|
height="67.73333mm" |
||||
|
viewBox="0 0 67.73333 67.73333" |
||||
|
version="1.1" |
||||
|
id="svg8" |
||||
|
inkscape:version="0.92.1 r15371" |
||||
|
sodipodi:docname="logo-toney.svg"> |
||||
|
<defs |
||||
|
id="defs2"> |
||||
|
<linearGradient |
||||
|
id="linearGradient4614" |
||||
|
inkscape:collect="always"> |
||||
|
<stop |
||||
|
id="stop4606" |
||||
|
offset="0" |
||||
|
style="stop-color:#ffffff;stop-opacity:1" /> |
||||
|
<stop |
||||
|
id="stop4612" |
||||
|
offset="1" |
||||
|
style="stop-color:#ffffff;stop-opacity:0.06910569" /> |
||||
|
</linearGradient> |
||||
|
<linearGradient |
||||
|
inkscape:collect="always" |
||||
|
id="linearGradient4524-5"> |
||||
|
<stop |
||||
|
style="stop-color:#ffffff;stop-opacity:0" |
||||
|
offset="0" |
||||
|
id="stop4520" /> |
||||
|
<stop |
||||
|
id="stop4530" |
||||
|
offset="0.83688796" |
||||
|
style="stop-color:#ffffff;stop-opacity:0.247" /> |
||||
|
<stop |
||||
|
id="stop4528" |
||||
|
offset="0.91082156" |
||||
|
style="stop-color:#ffffff;stop-opacity:0.49803922;" /> |
||||
|
<stop |
||||
|
style="stop-color:#ffffff;stop-opacity:1" |
||||
|
offset="1" |
||||
|
id="stop4522" /> |
||||
|
</linearGradient> |
||||
|
<radialGradient |
||||
|
inkscape:collect="always" |
||||
|
xlink:href="#linearGradient4524-5" |
||||
|
id="radialGradient4526" |
||||
|
cx="102.13165" |
||||
|
cy="-8.7344589" |
||||
|
fx="102.13165" |
||||
|
fy="-8.7344589" |
||||
|
r="65.047386" |
||||
|
gradientUnits="userSpaceOnUse" /> |
||||
|
<radialGradient |
||||
|
inkscape:collect="always" |
||||
|
xlink:href="#linearGradient4524-5" |
||||
|
id="radialGradient4574" |
||||
|
gradientUnits="userSpaceOnUse" |
||||
|
gradientTransform="matrix(1,0,0,2.8179612,0,-154.30218)" |
||||
|
cx="114.17415" |
||||
|
cy="84.876495" |
||||
|
fx="114.17415" |
||||
|
fy="84.876495" |
||||
|
r="28.84428" /> |
||||
|
<radialGradient |
||||
|
inkscape:collect="always" |
||||
|
xlink:href="#linearGradient4524-5" |
||||
|
id="radialGradient4576" |
||||
|
gradientUnits="userSpaceOnUse" |
||||
|
gradientTransform="matrix(1,0,0,2.8179612,0,-154.30218)" |
||||
|
cx="114.17415" |
||||
|
cy="84.876495" |
||||
|
fx="114.17415" |
||||
|
fy="84.876495" |
||||
|
r="28.84428" /> |
||||
|
<radialGradient |
||||
|
inkscape:collect="always" |
||||
|
xlink:href="#linearGradient4614" |
||||
|
id="radialGradient4595" |
||||
|
gradientUnits="userSpaceOnUse" |
||||
|
gradientTransform="matrix(0.882734,-0.05084415,0.02703824,0.46942615,-3.3117865,131.01388)" |
||||
|
cx="-0.22907677" |
||||
|
cy="121.49178" |
||||
|
fx="-0.22907677" |
||||
|
fy="121.49178" |
||||
|
r="28.84428" /> |
||||
|
</defs> |
||||
|
<sodipodi:namedview |
||||
|
id="base" |
||||
|
pagecolor="#ffffff" |
||||
|
bordercolor="#666666" |
||||
|
borderopacity="1.0" |
||||
|
inkscape:pageopacity="0.0" |
||||
|
inkscape:pageshadow="2" |
||||
|
inkscape:zoom="0.41584232" |
||||
|
inkscape:cx="646.76853" |
||||
|
inkscape:cy="48.370314" |
||||
|
inkscape:document-units="mm" |
||||
|
inkscape:current-layer="layer1" |
||||
|
showgrid="false" |
||||
|
fit-margin-top="0" |
||||
|
fit-margin-left="0" |
||||
|
fit-margin-right="0" |
||||
|
fit-margin-bottom="0" |
||||
|
inkscape:window-width="1366" |
||||
|
inkscape:window-height="704" |
||||
|
inkscape:window-x="0" |
||||
|
inkscape:window-y="27" |
||||
|
inkscape:window-maximized="1" /> |
||||
|
<metadata |
||||
|
id="metadata5"> |
||||
|
<rdf:RDF> |
||||
|
<cc:Work |
||||
|
rdf:about=""> |
||||
|
<dc:format>image/svg+xml</dc:format> |
||||
|
<dc:type |
||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
||||
|
<dc:title></dc:title> |
||||
|
</cc:Work> |
||||
|
</rdf:RDF> |
||||
|
</metadata> |
||||
|
<g |
||||
|
inkscape:label="Ebene 1" |
||||
|
inkscape:groupmode="layer" |
||||
|
id="layer1" |
||||
|
transform="translate(-41.890749,13.826533)"> |
||||
|
<g |
||||
|
id="g4534" |
||||
|
transform="matrix(0.48593635,0,0,0.48593635,25.20039,26.448793)"> |
||||
|
<circle |
||||
|
r="69.693626" |
||||
|
cy="-13.188271" |
||||
|
cx="104.04043" |
||||
|
id="path4503" |
||||
|
style="opacity:1;fill:#009ff9;fill-opacity:1;stroke:none;stroke-width:10.61299992;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> |
||||
|
<circle |
||||
|
r="65.047386" |
||||
|
cy="-13.188271" |
||||
|
cx="104.04043" |
||||
|
id="path4503-3" |
||||
|
style="opacity:0.79799996;fill:url(#radialGradient4526);fill-opacity:1;stroke:none;stroke-width:9.90499973;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> |
||||
|
</g> |
||||
|
<g |
||||
|
id="g4623" |
||||
|
transform="matrix(0.52102564,0,0,0.52102564,20.064595,25.819975)"> |
||||
|
<g |
||||
|
transform="matrix(0.61514188,0,0,0.61514188,36.657448,-63.304289)" |
||||
|
id="g4501"> |
||||
|
<g |
||||
|
id="g4538"> |
||||
|
<ellipse |
||||
|
transform="rotate(-38.680051)" |
||||
|
ry="18.017612" |
||||
|
rx="28.188845" |
||||
|
cy="183.54636" |
||||
|
cx="-0.10398614" |
||||
|
id="path4485" |
||||
|
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.52916664;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> |
||||
|
<path |
||||
|
sodipodi:nodetypes="ccccccccc" |
||||
|
inkscape:connector-curvature="0" |
||||
|
d="M 106.79515,50.125604 90.52202,6.14843 l 16.27313,43.977174 -7.522507,8.451595 c 10.843987,1.469307 25.069137,-1.722909 41.158477,-3.894093 -11.25977,7.945214 -41.254091,22.822855 -52.51387,30.768047 14.17178,-1.340824 31.7157,-6.16079 41.15851,-3.894114 l -7.52246,8.451602 14.75816,39.883049" |
||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5.17612696;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
||||
|
id="path4489" /> |
||||
|
</g> |
||||
|
</g> |
||||
|
<g |
||||
|
transform="matrix(0.61514188,0,0,0.61514188,36.657448,-63.304289)" |
||||
|
id="g4538-7" |
||||
|
style="fill:url(#radialGradient4576);fill-opacity:1;stroke:none"> |
||||
|
<ellipse |
||||
|
style="opacity:0.75;fill:url(#radialGradient4595);fill-opacity:1;stroke:none;stroke-width:0.52916664;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" |
||||
|
id="path4485-5" |
||||
|
cx="-0.10398614" |
||||
|
cy="183.54636" |
||||
|
rx="28.188845" |
||||
|
ry="18.017612" |
||||
|
transform="rotate(-38.680051)" /> |
||||
|
<path |
||||
|
id="path4489-3" |
||||
|
style="fill:url(#radialGradient4574);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.17612696;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
||||
|
d="M 106.79515,50.125604 90.52202,6.14843 l 16.27313,43.977174 -7.522507,8.451595 c 10.843987,1.469307 25.069137,-1.722909 41.158477,-3.894093 -11.25977,7.945214 -41.254091,22.822855 -52.51387,30.768047 14.17178,-1.340824 31.7157,-6.16079 41.15851,-3.894114 l -7.52246,8.451602 14.75816,39.883049" |
||||
|
inkscape:connector-curvature="0" |
||||
|
sodipodi:nodetypes="ccccccccc" /> |
||||
|
</g> |
||||
|
</g> |
||||
|
</g> |
||||
|
</svg> |
||||