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

Merge branch 'master' of gitlab.com:xphnx/ameixa

error en mainactivity
parents d7da1973 30d05dc0
Branches
Tags
No related merge requests found
...@@ -43,6 +43,39 @@ public class MainActivity extends AppCompatActivity { ...@@ -43,6 +43,39 @@ public class MainActivity extends AppCompatActivity {
frameLayout.addView( baseLayout ); 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 ) ) ) );
iconButton.setClickable(false);
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 // source code button
...@@ -67,6 +100,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -67,6 +100,7 @@ public class MainActivity extends AppCompatActivity {
Button sourceButton = new Button( this ); Button sourceButton = new Button( this );
sourceButton.setLayoutParams( buttonParams ); sourceButton.setLayoutParams( buttonParams );
sourceButton.setBackground( new BitmapDrawable( getResources(), IceImageUtils.bitmapLoad( getApplicationContext().getResources(), R.drawable.ic_source_button, Math.round( 48 * scale ), Math.round( 48 * scale ) ) ) ); sourceButton.setBackground( new BitmapDrawable( getResources(), IceImageUtils.bitmapLoad( getApplicationContext().getResources(), R.drawable.ic_source_button, Math.round( 48 * scale ), Math.round( 48 * scale ) ) ) );
sourceButton.setClickable(false);
sourceClickLayout.addView( sourceButton ); sourceClickLayout.addView( sourceButton );
TextView sourceText = new TextView( this ); TextView sourceText = new TextView( this );
...@@ -99,6 +133,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -99,6 +133,7 @@ public class MainActivity extends AppCompatActivity {
Button aboutButton = new Button( this ); Button aboutButton = new Button( this );
aboutButton.setLayoutParams( buttonParams ); aboutButton.setLayoutParams( buttonParams );
aboutButton.setBackground( new BitmapDrawable( getResources(), IceImageUtils.bitmapLoad( getApplicationContext().getResources(), R.drawable.ic_license_button, Math.round( 48 * scale ), Math.round( 48 * scale ) ) ) ); aboutButton.setBackground( new BitmapDrawable( getResources(), IceImageUtils.bitmapLoad( getApplicationContext().getResources(), R.drawable.ic_license_button, Math.round( 48 * scale ), Math.round( 48 * scale ) ) ) );
aboutButton.setClickable(false);
aboutClickLayout.addView( aboutButton ); aboutClickLayout.addView( aboutButton );
TextView aboutText = new TextView( this ); TextView aboutText = new TextView( this );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment