Skip to content

Commit bcb231a

Browse files
committed
First commit
0 parents  commit bcb231a

File tree

219 files changed

+2383
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+2383
-0
lines changed

.gitattributes

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

.gitignore

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#################
2+
## Eclipse
3+
#################
4+
5+
*.pydevproject
6+
.project
7+
.metadata
8+
bin/
9+
tmp/
10+
*.tmp
11+
*.bak
12+
*.swp
13+
*~.nib
14+
local.properties
15+
.classpath
16+
.settings/
17+
.loadpath
18+
19+
# Locally stored "Eclipse launch configurations"
20+
*.launch
21+
22+
23+
############
24+
## Windows
25+
############
26+
27+
# Windows image file caches
28+
Thumbs.db
29+
30+
# Folder config file
31+
Desktop.ini
32+

android-botones/AndroidManifest.xml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="net.sgoliver.android.botones"
3+
android:versionCode="1"
4+
android:versionName="1.0" >
5+
6+
<uses-sdk
7+
android:minSdkVersion="8"
8+
android:targetSdkVersion="15" />
9+
10+
<application
11+
android:icon="@drawable/ic_launcher"
12+
android:label="@string/app_name"
13+
android:theme="@style/AppTheme" >
14+
<activity
15+
android:name=".MainActivity"
16+
android:label="@string/title_activity_main" >
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
23+
</application>
24+
25+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package net.sgoliver.android.botones;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* AUTO-GENERATED FILE. DO NOT MODIFY.
2+
*
3+
* This class was automatically generated by the
4+
* aapt tool from the resource data it found. It
5+
* should not be modified by hand.
6+
*/
7+
8+
package net.sgoliver.android.botones;
9+
10+
public final class R {
11+
public static final class attr {
12+
}
13+
public static final class drawable {
14+
public static final int ic_action_search=0x7f020000;
15+
public static final int ic_launcher=0x7f020001;
16+
public static final int ok=0x7f020002;
17+
public static final int toggle_off=0x7f020003;
18+
public static final int toggle_on=0x7f020004;
19+
public static final int toggle_style=0x7f020005;
20+
}
21+
public static final class id {
22+
public static final int BtnBoton1=0x7f070001;
23+
public static final int BtnBoton2=0x7f070002;
24+
public static final int BtnBoton3=0x7f070003;
25+
public static final int BtnBoton4=0x7f070004;
26+
public static final int LblMensaje=0x7f070000;
27+
public static final int menu_settings=0x7f070005;
28+
}
29+
public static final class layout {
30+
public static final int activity_main=0x7f030000;
31+
}
32+
public static final class menu {
33+
public static final int activity_main=0x7f060000;
34+
}
35+
public static final class string {
36+
public static final int app_name=0x7f040000;
37+
public static final int hello_world=0x7f040001;
38+
public static final int menu_settings=0x7f040002;
39+
public static final int pulsame=0x7f040004;
40+
public static final int title_activity_main=0x7f040003;
41+
}
42+
public static final class style {
43+
public static final int AppTheme=0x7f050000;
44+
}
45+
}

android-botones/ic_launcher-web.png

36.2 KB
341 KB
Binary file not shown.

android-botones/proguard-project.txt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}

android-botones/project.properties

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-16
2.79 KB
147 Bytes
147 Bytes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_checked="false" android:drawable="@drawable/toggle_off" />
4+
<item android:state_checked="true" android:drawable="@drawable/toggle_on" />
5+
</selector>
2.79 KB
147 Bytes
147 Bytes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_checked="false" android:drawable="@drawable/toggle_off" />
4+
<item android:state_checked="true" android:drawable="@drawable/toggle_on" />
5+
</selector>
2.79 KB
147 Bytes
147 Bytes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_checked="false" android:drawable="@drawable/toggle_off" />
4+
<item android:state_checked="true" android:drawable="@drawable/toggle_on" />
5+
</selector>
2.79 KB
147 Bytes
147 Bytes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:state_checked="false" android:drawable="@drawable/toggle_off" />
4+
<item android:state_checked="true" android:drawable="@drawable/toggle_on" />
5+
</selector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<LinearLayout
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:orientation="vertical" >
6+
7+
<TextView android:id="@+id/LblMensaje"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content" />
10+
11+
<Button android:id="@+id/BtnBoton1"
12+
android:text="@string/pulsame"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content" />
15+
16+
<ToggleButton android:id="@+id/BtnBoton2"
17+
android:textOn="ON"
18+
android:textOff="OFF"
19+
android:layout_width="wrap_content"
20+
android:layout_height="wrap_content" />
21+
22+
<ImageButton android:id="@+id/BtnBoton3"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"
25+
android:contentDescription="Icono Ok"
26+
android:src="@drawable/ok" />
27+
28+
<ToggleButton android:id="@+id/BtnBoton4"
29+
android:textOn="ON"
30+
android:textOff="OFF"
31+
android:padding="10dip"
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"
34+
android:background="@drawable/toggle_style"/>
35+
36+
</LinearLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<menu xmlns:android="http://schemas.android.com/apk/res/android">
2+
<item android:id="@+id/menu_settings"
3+
android:title="@string/menu_settings"
4+
android:orderInCategory="100"
5+
android:showAsAction="never" />
6+
</menu>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
3+
<style name="AppTheme" parent="android:Theme.Holo.Light" />
4+
5+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
3+
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
4+
5+
</resources>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<resources>
2+
3+
<string name="app_name">Android Botones</string>
4+
<string name="hello_world">Hello world!</string>
5+
<string name="menu_settings">Settings</string>
6+
<string name="title_activity_main">Botones</string>
7+
<string name="pulsame">Púlsame</string>
8+
9+
</resources>

android-botones/res/values/styles.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
3+
<style name="AppTheme" parent="android:Theme.Light" />
4+
5+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
package net.sgoliver.android.botones;
2+
3+
import android.os.Bundle;
4+
import android.app.Activity;
5+
import android.view.Menu;
6+
import android.view.View;
7+
import android.widget.Button;
8+
import android.widget.ImageButton;
9+
import android.widget.TextView;
10+
import android.widget.ToggleButton;
11+
12+
public class MainActivity extends Activity {
13+
14+
private TextView lblMensaje;
15+
private Button btnBoton1;
16+
private ToggleButton btnBoton2;
17+
private ImageButton btnBoton3;
18+
private ToggleButton btnBoton4;
19+
20+
21+
@Override
22+
public void onCreate(Bundle savedInstanceState) {
23+
super.onCreate(savedInstanceState);
24+
setContentView(R.layout.activity_main);
25+
26+
lblMensaje = (TextView)findViewById(R.id.LblMensaje);
27+
28+
btnBoton1 = (Button)findViewById(R.id.BtnBoton1);
29+
30+
btnBoton1.setOnClickListener(new View.OnClickListener() {
31+
public void onClick(View arg0)
32+
{
33+
lblMensaje.setText("Botón 1 pulsado!");
34+
}
35+
});
36+
37+
btnBoton2 = (ToggleButton)findViewById(R.id.BtnBoton2);
38+
39+
btnBoton2.setOnClickListener(new View.OnClickListener() {
40+
public void onClick(View arg0)
41+
{
42+
if(btnBoton2.isChecked())
43+
lblMensaje.setText("Botón 2: ON");
44+
else
45+
lblMensaje.setText("Botón 2: OFF");
46+
}
47+
});
48+
49+
btnBoton3 = (ImageButton)findViewById(R.id.BtnBoton3);
50+
51+
btnBoton3.setOnClickListener(new View.OnClickListener() {
52+
public void onClick(View arg0)
53+
{
54+
lblMensaje.setText("Botón 3 pulsado!");
55+
}
56+
});
57+
58+
btnBoton4 = (ToggleButton)findViewById(R.id.BtnBoton4);
59+
60+
btnBoton4.setOnClickListener(new View.OnClickListener() {
61+
public void onClick(View arg0)
62+
{
63+
if(btnBoton4.isChecked())
64+
lblMensaje.setText("Botón 4: ON");
65+
else
66+
lblMensaje.setText("Botón 4: OFF");
67+
}
68+
});
69+
}
70+
71+
@Override
72+
public boolean onCreateOptionsMenu(Menu menu) {
73+
getMenuInflater().inflate(R.menu.activity_main, menu);
74+
return true;
75+
}
76+
}
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="net.sgoliver.android.checkradio"
3+
android:versionCode="1"
4+
android:versionName="1.0" >
5+
6+
<uses-sdk
7+
android:minSdkVersion="8"
8+
android:targetSdkVersion="15" />
9+
10+
<application
11+
android:icon="@drawable/ic_launcher"
12+
android:label="@string/app_name"
13+
android:theme="@style/AppTheme" >
14+
<activity
15+
android:name=".MainActivity"
16+
android:label="@string/title_activity_main" >
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
20+
<category android:name="android.intent.category.LAUNCHER" />
21+
</intent-filter>
22+
</activity>
23+
</application>
24+
25+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package net.sgoliver.android.checkradio;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}

0 commit comments

Comments
 (0)