Skip to content
Snippets Groups Projects
Commit b4606a96 authored by xphnx's avatar xphnx
Browse files

cleaning code and road to 307

parent 593019af
No related branches found
No related tags found
No related merge requests found
Showing
with 52 additions and 3227 deletions
......@@ -8,8 +8,8 @@ android {
applicationId "org.xphnx.ameixa"
minSdkVersion 16
targetSdkVersion 25
versionCode 45
versionName "3.0.6"
versionCode 46
versionName "3.0.7"
}
buildTypes {
release {
......@@ -18,10 +18,12 @@ android {
}
}
lintOptions {
/* lintOptions {
checkReleaseBuilds false
abortOnError false
}
*/
}
dependencies {
......
......@@ -48,7 +48,6 @@
</intent-filter>
</activity>
<activity android:name=".LicenseActivity" />
<activity android:name=".IconActivity"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -2,24 +2,9 @@ package org.xphnx.ameixa;
import android.content.Context;
public class IceScreenUtils {
class IceScreenUtils {
public static boolean isPortrait( Context context ) {
return context.getResources().getDisplayMetrics().widthPixels < context.getResources().getDisplayMetrics().heightPixels;
}
public static int width( Context context ) {
return IceScreenUtils.isPortrait( context ) ? context.getResources().getDisplayMetrics().widthPixels : context.getResources().getDisplayMetrics().heightPixels;
}
public static int height( Context context ) {
return IceScreenUtils.isPortrait( context ) ? context.getResources().getDisplayMetrics().heightPixels : context.getResources().getDisplayMetrics().widthPixels;
}
public static float densityScale( Context context ) {
static float densityScale(Context context) {
return ( context.getResources().getDisplayMetrics().density );
}
......
This diff is collapsed.
package org.xphnx.ameixa;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
......@@ -39,7 +36,7 @@ public class LicenseActivity extends AppCompatActivity {
LinearLayout baseLayout = new LinearLayout( this );
baseLayout.setOrientation( LinearLayout.VERTICAL );
baseLayout.setLayoutParams( new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT ) );
baseLayout.setGravity( Gravity.LEFT );
baseLayout.setGravity( Gravity.START );
frameLayout.addView( baseLayout );
// gpl button
......@@ -63,7 +60,7 @@ public class LicenseActivity extends AppCompatActivity {
});
TextView sourceText = new TextView( this );
sourceText.setText( "This program's source code is avaiable under the GNU General Public License v3." );
sourceText.setText( R.string.codelicense);
sourceText.setTextSize( 16 );
sourceText.setTextColor( ContextCompat.getColor( getApplicationContext(), R.color.colorPrimaryDark) );
sourceText.setPadding( padding, padding, padding, padding );
......@@ -91,7 +88,7 @@ public class LicenseActivity extends AppCompatActivity {
});
TextView aboutText = new TextView( this );
aboutText.setText( "The images included in this program are avaiable under the Creative Commons Attribution Share Alike 4.0 license, except for non-compatible derivates licenses (See credits)." );
aboutText.setText( R.string.imageslicense );
aboutText.setTextSize( 16 );
aboutText.setTextColor( 0xffffffff );
aboutText.setPadding( padding, padding, padding, padding );
......@@ -101,14 +98,14 @@ public class LicenseActivity extends AppCompatActivity {
public void gplLink( View v ) {
Uri uri = Uri.parse( "http://choosealicense.com/licenses/gpl-3.0/" );
Uri uri = Uri.parse( getString(R.string.urlgplv3) );
Intent intent = new Intent( Intent.ACTION_VIEW, uri );
startActivity( intent );
}
public void ccLink( View v ) {
Uri uri = Uri.parse( "https://creativecommons.org/licenses/by-sa/4.0/" );
Uri uri = Uri.parse( getString(R.string.urlccbysa4) );
Intent intent = new Intent( Intent.ACTION_VIEW, uri );
startActivity( intent );
}
......
......@@ -39,41 +39,10 @@ public class MainActivity extends AppCompatActivity {
LinearLayout baseLayout = new LinearLayout( this );
baseLayout.setOrientation( LinearLayout.VERTICAL );
baseLayout.setLayoutParams( new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT ) );
baseLayout.setGravity( Gravity.LEFT );
baseLayout.setGravity( Gravity.START );
frameLayout.addView( baseLayout );
// icon view button
LinearLayout iconLayout = new LinearLayout( this );
iconLayout.setOrientation( LinearLayout.HORIZONTAL );
iconLayout.setLayoutParams( smallLayoutParams );
iconLayout.setGravity( Gravity.CENTER_VERTICAL );
baseLayout.addView( iconLayout );
LinearLayout iconClickLayout = new LinearLayout( this );
iconClickLayout.setOrientation( LinearLayout.HORIZONTAL );
iconClickLayout.setLayoutParams( new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT ) );
iconClickLayout.setGravity( Gravity.CENTER );
iconLayout.addView( iconClickLayout );
iconClickLayout.setOnClickListener( new View.OnClickListener() {
@Override
public void onClick( View v ) {
iconView( v );
}
});
Button iconButton = new Button( this );
iconButton.setLayoutParams( buttonParams );
iconButton.setBackground( new BitmapDrawable( getResources(), IceImageUtils.bitmapLoad( getApplicationContext().getResources(), R.drawable.ic_icon_button, Math.round( 48 * scale ), Math.round( 48 * scale ) ) ) );
iconClickLayout.addView( iconButton );
TextView iconText = new TextView( this );
iconText.setText( "view icons" );
iconText.setTextSize( 24 );
iconText.setTextColor( ContextCompat.getColor( getApplicationContext(), R.color.colorPrimaryDark) );
iconText.setPadding( 64, 64, 64, 64 );
iconClickLayout.addView( iconText );
// source code button
......@@ -101,7 +70,7 @@ public class MainActivity extends AppCompatActivity {
sourceClickLayout.addView( sourceButton );
TextView sourceText = new TextView( this );
sourceText.setText( "source code" );
sourceText.setText( R.string.sourcecodetext );
sourceText.setTextSize( 24 );
sourceText.setTextColor( ContextCompat.getColor( getApplicationContext(), R.color.colorPrimaryDark) );
sourceText.setPadding(64, 64, 64, 64);
......@@ -133,7 +102,7 @@ public class MainActivity extends AppCompatActivity {
aboutClickLayout.addView( aboutButton );
TextView aboutText = new TextView( this );
aboutText.setText( "license" );
aboutText.setText( R.string.licensetext );
aboutText.setTextSize( 24 );
aboutText.setTextColor( ContextCompat.getColor( getApplicationContext(), R.color.colorPrimaryDark) );
aboutText.setPadding(64, 64, 64, 64);
......@@ -143,16 +112,11 @@ public class MainActivity extends AppCompatActivity {
public void gitLink( View v ) {
Uri uri = Uri.parse( "https://gitlab.com/xphnx/ameixa" );
Uri uri = Uri.parse( getString(R.string.sourcecodelink) );
Intent intent = new Intent( Intent.ACTION_VIEW, uri );
startActivity( intent );
}
public void iconView( View v ) {
Intent intent = new Intent( this, IconActivity.class );
startActivity( intent );
}
public void licenseShow( View v ) {
......
app/src/main/res/drawable-hdpi/onetime.png

2.33 KiB

app/src/main/res/drawable-mdpi/onetime.png

1.51 KiB

app/src/main/res/drawable-nodpi/nodpi_onetime.png

15.3 KiB

app/src/main/res/drawable-xhdpi/onetime.png

3.31 KiB

app/src/main/res/drawable-xxhdpi/onetime.png

5.1 KiB

app/src/main/res/drawable-xxxhdpi/onetime.png

7.07 KiB

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I am a TextView"
android:layout_alignParentTop="true"
android:layout_alignLeft="@+id/button"
android:layout_alignStart="@+id/button"
android:layout_marginTop="74dp" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, I am a Button"
android:layout_marginLeft="28dp"
android:layout_marginStart="28dp"
android:layout_marginTop="35dp"
android:layout_below="@+id/text"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<resources>
<string name="app_name">Ameixa</string>
<string name="sourcecodetext">source code</string>
<string name="licensetext">license</string>
<string name="sourcecodelink">https://gitlab.com/xphnx/ameixa</string>
<string name="codelicense">This program\'s source code is avaiable under the GNU General Public License v3.</string>
<string name="imageslicense">The images included in this program are avaiable under the Creative Commons Attribution Share Alike 4.0 license, except for non-compatible derivates licenses (See credits).</string>
<string name="urlgplv3">http://choosealicense.com/licenses/gpl-3.0/</string>
<string name="urlccbysa4">https://creativecommons.org/licenses/by-sa/4.0/</string>
<bool name="config_iconpack">true</bool>
</resources>
fastlane/metadata/android/en-US/images/featureGraphic.jpg

27.5 KiB

fastlane/metadata/android/en-US/images/icon.png

18.3 KiB

fastlane/metadata/android/es-ES/images/featureGraphic.jpg

27.5 KiB

fastlane/metadata/android/es-ES/images/icon.png

18.3 KiB

This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment