Subversion Repositories ES

Compare Revisions

Last modification

Ignore whitespace Rev 4 → Rev 5

/trunk/doc/notizen.txt
New file
0,0 → 1,4
Tipps:
- Bearbeitungsfeld nicht editierbar, dann kommt keine Tastatur;
stattdessen numerische Tastatur als Buttons im Grid
- Debug-Zeile einblenden oder
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/doc/Verteilung_ConverterApp.jpg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/jpeg
Index: trunk/doc/Verteilung_ConverterApp.jpg
===================================================================
--- trunk/doc/Verteilung_ConverterApp.jpg (revision 0)
+++ trunk/doc/Verteilung_ConverterApp.jpg (revision 5)
/trunk/doc/Verteilung_ConverterApp.jpg
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+image/jpeg
\ No newline at end of property
Index: trunk/doc/A-UM_Prototyp_V 01.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/pdf
Index: trunk/doc/A-UM_Prototyp_V 01.pdf
===================================================================
--- trunk/doc/A-UM_Prototyp_V 01.pdf (revision 0)
+++ trunk/doc/A-UM_Prototyp_V 01.pdf (revision 5)
/trunk/doc/A-UM_Prototyp_V 01.pdf
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Index: trunk/AndroidManifest.xml
===================================================================
--- trunk/AndroidManifest.xml (revision 4)
+++ trunk/AndroidManifest.xml (revision 5)
@@ -3,16 +3,48 @@
package="ch.ffhs.converter"
android:versionCode="1"
android:versionName="1.0">
- <application android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".MenuActivity"
+
+ <uses-permission android:name="android.permission.VIBRATE" />
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+ <application android:name="ConverterApplication"
+ android:label="@string/app_name"
+ android:icon="@drawable/icon">
+ <uses-sdk android:minSdkVersion="7" />
+
+ <activity android:name="MenuActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
+ <activity android:name=".app.LengthsActivity"
+ android:label="@string/activity_lengths">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name=".app.TemperaturesActivity"
+ android:label="@string/activity_temperatures"
+ android:theme="@android:style/Theme.Dialog">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name=".app.CurrenciesActivity"
+ android:label="@string/activity_currencies">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
</application>
-
-
</manifest>
\ No newline at end of file
/trunk/lib/HTTPClient.java
New file
0,0 → 1,131
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import android.util.Log;
public class WebClient {
private static final String TAG = "WebClient";
private static final DefaultHttpClient sClient;
static {
final HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, "UTF-8");
HttpConnectionParams.setStaleCheckingEnabled(params, false);
HttpConnectionParams.setConnectionTimeout(params, 20 * 1000);
HttpConnectionParams.setSoTimeout(params, 20 * 1000);
HttpConnectionParams.setSocketBufferSize(params, 8192);
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
ClientConnectionManager manager = new ThreadSafeClientConnManager(params, schemeRegistry);
sClient = new DefaultHttpClient(manager, params);
}
/**
* Grab the source code for a given URL, returns null otherwise.
* Method: GET
*
* @param url The URL we want to read
* @return The Source code read from this URL (or null)
*/
public static String readSource(String url) {
HttpGet get = new HttpGet(url);
try {
ResponseHandler<String> handler = new BasicResponseHandler();
String body = sClient.execute(get, handler);
return body;
} catch (ClientProtocolException e) {
Log.e(TAG, e.getMessage());
return null;
} catch (IOException e) {
Log.e(TAG, e.getMessage());
return null;
}
}
/**
* Grab the source code for a given URL, sending POST data specified.
* Method: POST
*
* @param post The HttpPost object for the client to execute
* @return The source code read from this URL (or null)
*/
public static String readSource(HttpPost post) {
try {
ResponseHandler<String> handler = new BasicResponseHandler();
String body = sClient.execute(post, handler);
return body;
} catch (ClientProtocolException e) {
Log.e(TAG, e.getMessage());
return null;
} catch (IOException e) {
Log.e(TAG, e.getMessage());
return null;
}
}
/**
* Return a responses status code as an Integer. Returns 0 on a caught Exception
* Method: GET
*
* @param url The URL we're requesting
* @return The responses status code (ie: 401, 404, 200)
*/
public static int getStatusCode(String url) {
HttpGet get = new HttpGet(url);
try {
HttpResponse response = sClient.execute(get);
return response.getStatusLine().getStatusCode();
} catch (ClientProtocolException e) {
Log.e(TAG, e.getMessage());
return 0;
} catch (IOException e) {
Log.e(TAG, e.getMessage());
return 0;
}
}
/**
* Return a responses status code as an Integer. Returns 0 on a caught Exception
* Method: POST
*
* @param post The HttpPost object for the client to execute
* @return The responses status code (ie: 401, 404, 200)
*/
public static int getStatusCode(HttpPost post) {
try {
HttpResponse response = sClient.execute(post);
return response.getStatusLine().getStatusCode();
} catch (ClientProtocolException e) {
Log.e(TAG, e.getMessage());
return 0;
} catch (IOException e) {
Log.e(TAG, e.getMessage());
return 0;
}
}
}
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/src/ch/ffhs/converter/app/TemperaturesActivity.java
===================================================================
--- trunk/src/ch/ffhs/converter/app/TemperaturesActivity.java (revision 0)
+++ trunk/src/ch/ffhs/converter/app/TemperaturesActivity.java (revision 5)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ffhs.converter.app;
+
+// Need the following import to get access to the app resources, since this
+// class is in a sub-package.
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Window;
+import ch.ffhs.converter.R;
+
+/**
+ * <h3>Dialog Activity</h3>
+ *
+ * <p>
+ * This demonstrates the how to write an activity that looks like a pop-up
+ * dialog.
+ * </p>
+ */
+public class TemperaturesActivity extends Activity
+{
+ /**
+ * Initialization of the Activity after it is first created. Must at least
+ * call {@link android.app.Activity#setContentView setContentView()} to
+ * describe what is to be displayed in the screen.
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ // Be sure to call the super class.
+ super.onCreate(savedInstanceState);
+
+ this.requestWindowFeature(Window.FEATURE_LEFT_ICON);
+
+ // See assets/res/any/layout/dialog_activity.xml for this
+ // view layout definition, which is being set here as
+ // the content of our screen.
+ this.setContentView(R.layout.dialog_activity);
+
+ this.getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,
+ android.R.drawable.ic_dialog_alert);
+ }
+}
/trunk/src/ch/ffhs/converter/app/TemperaturesActivity.java
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/src/ch/ffhs/converter/app/CurrenciesActivity.java
===================================================================
--- trunk/src/ch/ffhs/converter/app/CurrenciesActivity.java (revision 0)
+++ trunk/src/ch/ffhs/converter/app/CurrenciesActivity.java (revision 5)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ffhs.converter.app;
+
+// Need the following import to get access to the app resources, since this
+// class is in a sub-package.
+import android.app.Activity;
+import android.os.Bundle;
+import ch.ffhs.converter.R;
+
+/**
+ * <h3>Dialog Activity</h3>
+ *
+ * <p>
+ * This demonstrates the how to write an activity that looks like a pop-up
+ * dialog with a custom theme using a different text color.
+ * </p>
+ */
+public class CurrenciesActivity extends Activity
+{
+ /**
+ * Initialization of the Activity after it is first created. Must at least
+ * call {@link android.app.Activity#setContentView setContentView()} to
+ * describe what is to be displayed in the screen.
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState)
+ {
+ // Be sure to call the super class.
+ super.onCreate(savedInstanceState);
+
+ // See assets/res/any/layout/dialog_activity.xml for this
+ // view layout definition, which is being set here as
+ // the content of our screen.
+ this.setContentView(R.layout.custom_dialog_activity);
+ }
+}
/trunk/src/ch/ffhs/converter/app/CurrenciesActivity.java
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/src/ch/ffhs/converter/app/LengthsActivity.java
===================================================================
--- trunk/src/ch/ffhs/converter/app/LengthsActivity.java (revision 0)
+++ trunk/src/ch/ffhs/converter/app/LengthsActivity.java (revision 5)
@@ -0,0 +1,19 @@
+package ch.ffhs.converter.app;
+
+import ch.ffhs.converter.R;
+import ch.ffhs.converter.R.layout;
+import android.app.Activity;
+import android.os.Bundle;
+
+public class LengthsActivity extends Activity
+{
+ /** Called when the activity is first created. */
+
+ @Override
+ public void onCreate(Bundle savedInstanceState)
+ {
+ super.onCreate(savedInstanceState);
+ this.setContentView(R.layout.frm_laengen);
+ }
+
+}
/trunk/src/ch/ffhs/converter/app/LengthsActivity.java
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/src/ch/ffhs/converter/MenuActivity.java
===================================================================
--- trunk/src/ch/ffhs/converter/MenuActivity.java (revision 4)
+++ trunk/src/ch/ffhs/converter/MenuActivity.java (revision 5)
@@ -1,13 +1,147 @@
package ch.ffhs.converter;
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
-import android.app.Activity;
+
+
+import android.app.ListActivity;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.os.Bundle;
+import android.view.View;
+import android.widget.ListView;
+import android.widget.SimpleAdapter;
-public class MenuActivity extends Activity {
- /** Called when the activity is first created. */
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MenuActivity extends ListActivity {
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
+
+ Intent intent = getIntent();
+ String path = intent.getStringExtra("ch.ffhs.converter.Path");
+
+ if (path == null) {
+ path = "";
+ }
+
+ setListAdapter(new SimpleAdapter(this, getData(path),
+ android.R.layout.simple_list_item_1, new String[] { "title" },
+ new int[] { android.R.id.text1 }));
+ getListView().setTextFilterEnabled(true);
}
-}
\ No newline at end of file
+
+ protected List getData(String prefix) {
+ List<Map> myData = new ArrayList<Map>();
+
+ Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
+ mainIntent.addCategory(Intent.CATEGORY_SAMPLE_CODE);
+
+ PackageManager pm = getPackageManager();
+ List<ResolveInfo> list = pm.queryIntentActivities(mainIntent, 0);
+
+ if (null == list)
+ return myData;
+
+ String[] prefixPath;
+
+ if (prefix.equals("")) {
+ prefixPath = null;
+ } else {
+ prefixPath = prefix.split("/");
+ }
+
+ int len = list.size();
+
+ Map<String, Boolean> entries = new HashMap<String, Boolean>();
+
+ for (int i = 0; i < len; i++) {
+ ResolveInfo info = list.get(i);
+ CharSequence labelSeq = info.loadLabel(pm);
+ String label = labelSeq != null
+ ? labelSeq.toString()
+ : info.activityInfo.name;
+
+ if (prefix.length() == 0 || label.startsWith(prefix)) {
+
+ String[] labelPath = label.split("/");
+
+ String nextLabel = prefixPath == null ? labelPath[0] : labelPath[prefixPath.length];
+
+ if ((prefixPath != null ? prefixPath.length : 0) == labelPath.length - 1) {
+ addItem(myData, nextLabel, activityIntent(
+ info.activityInfo.applicationInfo.packageName,
+ info.activityInfo.name));
+ } else {
+ if (entries.get(nextLabel) == null) {
+ addItem(myData, nextLabel, browseIntent(prefix.equals("") ? nextLabel : prefix + "/" + nextLabel));
+ entries.put(nextLabel, true);
+ }
+ }
+ }
+ }
+
+ Collections.sort(myData, sDisplayNameComparator);
+
+ return myData;
+ }
+
+ private final static Comparator<Map> sDisplayNameComparator = new Comparator<Map>() {
+ private final Collator collator = Collator.getInstance();
+
+ public int compare(Map map1, Map map2) {
+ return collator.compare(map1.get("title"), map2.get("title"));
+ }
+ };
+
+ protected Intent activityIntent(String pkg, String componentName) {
+ Intent result = new Intent();
+ result.setClassName(pkg, componentName);
+ return result;
+ }
+
+ protected Intent browseIntent(String path) {
+ Intent result = new Intent();
+ result.setClass(this, MenuActivity.class);
+ result.putExtra("ch.ffhs.converter.Path", path);
+ return result;
+ }
+
+ protected void addItem(List<Map> data, String name, Intent intent) {
+ Map<String, Object> temp = new HashMap<String, Object>();
+ temp.put("title", name);
+ temp.put("intent", intent);
+ data.add(temp);
+ }
+
+ @Override
+ protected void onListItemClick(ListView l, View v, int position, long id) {
+ Map map = (Map) l.getItemAtPosition(position);
+
+ Intent intent = (Intent) map.get("intent");
+ startActivity(intent);
+ }
+
+}
/trunk/src/ch/ffhs/converter/ConverterApplication.java
New file
0,0 → 1,52
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
 
package ch.ffhs.converter;
 
import android.app.Application;
import android.preference.PreferenceManager;
 
/**
* This is an example of a {@link android.app.Application} class. Ordinarily you
* would use
* a class like this as a central repository for information that might be
* shared between multiple
* activities.
*
* In this case, we have not defined any specific work for this Application.
*
* See samples/ApiDemos/tests/src/ch.ffhs.converter/ApiDemosApplicationTests for
* an example
* of how to perform unit tests on an Application object.
*/
public class ConverterApplication extends Application
{
 
@Override
public void onCreate()
{
/*
* This populates the default values from the preferences XML file. See
* {@link DefaultValues} for more details.
*/
PreferenceManager.setDefaultValues(this, R.xml.default_values, false);
}
 
@Override
public void onTerminate()
{
}
}
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/bin/resources.ap_
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/resources.ap_
===================================================================
--- trunk/bin/resources.ap_ (revision 0)
+++ trunk/bin/resources.ap_ (revision 5)
/trunk/bin/resources.ap_
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/MenuActivity$1.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/MenuActivity$1.class
===================================================================
--- trunk/bin/ch/ffhs/converter/MenuActivity$1.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/MenuActivity$1.class (revision 5)
/trunk/bin/ch/ffhs/converter/MenuActivity$1.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$xml.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$xml.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$xml.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$xml.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$xml.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$drawable.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$drawable.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$drawable.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$drawable.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$drawable.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/ConverterApplication.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/ConverterApplication.class
===================================================================
--- trunk/bin/ch/ffhs/converter/ConverterApplication.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/ConverterApplication.class (revision 5)
/trunk/bin/ch/ffhs/converter/ConverterApplication.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$string.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$string.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$string.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$string.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$string.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/app/LengthsActivity.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/app/LengthsActivity.class
===================================================================
--- trunk/bin/ch/ffhs/converter/app/LengthsActivity.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/app/LengthsActivity.class (revision 5)
/trunk/bin/ch/ffhs/converter/app/LengthsActivity.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/app/TemperaturesActivity.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/app/TemperaturesActivity.class
===================================================================
--- trunk/bin/ch/ffhs/converter/app/TemperaturesActivity.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/app/TemperaturesActivity.class (revision 5)
/trunk/bin/ch/ffhs/converter/app/TemperaturesActivity.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/app/CurrenciesActivity.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/app/CurrenciesActivity.class
===================================================================
--- trunk/bin/ch/ffhs/converter/app/CurrenciesActivity.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/app/CurrenciesActivity.class (revision 5)
/trunk/bin/ch/ffhs/converter/app/CurrenciesActivity.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$raw.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$raw.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$raw.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$raw.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$raw.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$attr.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$attr.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$attr.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$attr.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$attr.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/MenuActivity.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/MenuActivity.class
===================================================================
--- trunk/bin/ch/ffhs/converter/MenuActivity.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/MenuActivity.class (revision 5)
/trunk/bin/ch/ffhs/converter/MenuActivity.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R.class (revision 5)
/trunk/bin/ch/ffhs/converter/R.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$id.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$id.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$id.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$id.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$id.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$layout.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$layout.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$layout.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$layout.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$layout.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/ch/ffhs/converter/R$array.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/ch/ffhs/converter/R$array.class
===================================================================
--- trunk/bin/ch/ffhs/converter/R$array.class (revision 0)
+++ trunk/bin/ch/ffhs/converter/R$array.class (revision 5)
/trunk/bin/ch/ffhs/converter/R$array.class
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/classes.dex
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/classes.dex
===================================================================
--- trunk/bin/classes.dex (revision 0)
+++ trunk/bin/classes.dex (revision 5)
/trunk/bin/classes.dex
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/bin/FFHS-Converter.apk
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/bin/FFHS-Converter.apk
===================================================================
--- trunk/bin/FFHS-Converter.apk (revision 0)
+++ trunk/bin/FFHS-Converter.apk (revision 5)
/trunk/bin/FFHS-Converter.apk
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/res/drawable-ldpi/aum.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/res/drawable-ldpi/aum.png
===================================================================
--- trunk/res/drawable-ldpi/aum.png (revision 0)
+++ trunk/res/drawable-ldpi/aum.png (revision 5)
/trunk/res/drawable-ldpi/aum.png
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/res/drawable-mdpi/aum.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/res/drawable-mdpi/aum.png
===================================================================
--- trunk/res/drawable-mdpi/aum.png (revision 0)
+++ trunk/res/drawable-mdpi/aum.png (revision 5)
/trunk/res/drawable-mdpi/aum.png
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: trunk/res/raw/main_new.xml
===================================================================
--- trunk/res/raw/main_new.xml (revision 0)
+++ trunk/res/raw/main_new.xml (revision 5)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+
+
+<TextView
+ style="@android:style/TextAppearance.Large"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Android Einheiten Umrechner"
+ />
+
+<Button
+ android:id="@+id/sf_starte_menue01"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/activity_length" />
+
+<Button
+ android:id="@+id/sf_starte_menue02"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/activity_temperatures" />
+
+<Button
+ android:id="@+id/sf_starte_menue03"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/activity_currencies" />
+
+<ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center_horizontal"
+ android:src="@drawable/aum" />
+
+</LinearLayout>
/trunk/res/raw/main_new.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/frm_currency.xml
===================================================================
--- trunk/res/layout/frm_currency.xml (revision 0)
+++ trunk/res/layout/frm_currency.xml (revision 5)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/prompt01"
+ />
+
+<EditText android:id="@+id/et_amount"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal" />
+
+<Spinner android:id="@+id/sp_s_currencies"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/cur_display"
+ android:entryValues="@array/cur_values" />
+
+<Spinner android:id="@+id/sp_t_currencies"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/cur_display"
+ android:entryValues="@array/cur_values" />
+
+</LinearLayout>
/trunk/res/layout/frm_currency.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/frm_temperatures.xml
===================================================================
--- trunk/res/layout/frm_temperatures.xml (revision 0)
+++ trunk/res/layout/frm_temperatures.xml (revision 5)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/prompt02"
+ />
+
+<EditText android:id="@+id/et_temperatur"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal" />
+
+<Spinner android:id="@+id/sp_s_tunit"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/tem_display"
+ android:entryValues="@array/tem_values" />
+
+<Spinner android:id="@+id/sp_t_tunit"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/tem_display"
+ android:entryValues="@array/tem_values" />
+
+
+</LinearLayout>
/trunk/res/layout/frm_temperatures.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/main.xml
===================================================================
--- trunk/res/layout/main.xml (revision 4)
+++ trunk/res/layout/main.xml (revision 5)
@@ -4,9 +4,17 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/hello"
- />
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/title"
+ />
+
+ <ListView android:id="@id/android:list"
+ android:background="#00FF00"
+ android:layout_weight="1"
+ android:drawSelectorOnTop="false"
+ />
+
</LinearLayout>
Index: trunk/res/layout/custom_dialog_activity.xml
===================================================================
--- trunk/res/layout/custom_dialog_activity.xml (revision 0)
+++ trunk/res/layout/custom_dialog_activity.xml (revision 5)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Demonstrates an activity with a custom dialog theme.
+ See corresponding Java code com.android.sdk.app.CustomDialogActivity.java. -->
+
+<!-- This screen consists of a single text field that displays some text. -->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:gravity="center_vertical|center_horizontal"
+ android:text="@string/custom_dialog_activity_text"/>
/trunk/res/layout/custom_dialog_activity.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/hello_world.xml
===================================================================
--- trunk/res/layout/hello_world.xml (revision 0)
+++ trunk/res/layout/hello_world.xml (revision 5)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Demonstrates basic application screen.
+ See corresponding Java code com.android.sdk.app.HelloWorld.java. -->
+
+<!-- This screen consists of a single text field that
+ displays our "Hello, World!" text. -->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:gravity="center_vertical|center_horizontal"
+ android:text="@string/hello_world"/>
/trunk/res/layout/hello_world.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/dialog_activity.xml
===================================================================
--- trunk/res/layout/dialog_activity.xml (revision 0)
+++ trunk/res/layout/dialog_activity.xml (revision 5)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Demonstrates an activity with a dialog theme.
+ See corresponding Java code com.android.sdk.app.DialogActivity.java. -->
+
+<!-- This screen consists of a single text field that displays some text. -->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:gravity="center_vertical|center_horizontal"
+ android:text="@string/dialog_activity_text"/>
/trunk/res/layout/dialog_activity.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/layout/frm_laengen.xml
===================================================================
--- trunk/res/layout/frm_laengen.xml (revision 0)
+++ trunk/res/layout/frm_laengen.xml (revision 5)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+
+ <TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/prompt03"
+ />
+
+ <EditText android:id="@+id/et_maass"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:inputType="numberDecimal" />
+
+ <Spinner android:id="@+id/sp_s_maass"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/mas_display"
+ android:entryValues="@array/mas_values" />
+
+ <Spinner android:id="@+id/sp_t_maass"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:drawSelectorOnTop="true"
+ android:entries="@array/mas_display"
+ android:entryValues="@array/mas_values" />
+
+</LinearLayout>
/trunk/res/layout/frm_laengen.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/values/strings.xml
===================================================================
--- trunk/res/values/strings.xml (revision 4)
+++ trunk/res/values/strings.xml (revision 5)
@@ -1,5 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="hello">Hello World, MenuActivity!</string>
<string name="app_name">Converter</string>
+ <string name="title">Android Einheiten-Umrechner</string>
+
+ <string name="activity_lengths">Längenmasse</string>
+ <string name="hello_world"><b>Hello, <i>World!</i></b></string>
+
+ <string name="activity_temperatures">Temperaturen</string>
+ <string name="dialog_activity_text">Example of how you can use the
+ Theme.Dialog theme to make an activity that looks like a
+ dialog.</string>
+
+ <string name="activity_currencies">Wechselkurse</string>
+ <string name="custom_dialog_activity_text">Example of how you can use a
+ custom Theme.Dialog theme to make an activity that looks like a
+ customized dialog, here with an ugly frame.</string>
+
+ <string name="prompt01">Geben Sie den Betrag der Quellwährung ein:</string>
+ <string name="prompt02">Geben Sie die Ausgangstemperatur ein:</string>
+ <string name="prompt03">Geben Sie das Ausgangsmass ein:</string>
+
+ <string name="title_checkbox_preference">Checkbox preference</string>
+ <string name="summary_checkbox_preference">This is a checkbox</string>
+
+ <string name="title_edittext_preference">Edit text preference</string>
+ <string name="summary_edittext_preference">An example that uses an edit text dialog</string>
+ <string name="dialog_title_edittext_preference">Enter your favorite animal</string>
+
+ <string name="title_list_preference">List preference</string>
+ <string name="summary_list_preference">An example that uses a list dialog</string>
+ <string name="dialog_title_list_preference">Choose one</string>
+
+ <string name="default_value_list_preference">beta</string>
+ <string name="default_value_edittext_preference">Default value</string>
</resources>
Index: trunk/res/values/arrays.xml
===================================================================
--- trunk/res/values/arrays.xml (revision 0)
+++ trunk/res/values/arrays.xml (revision 5)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<resources>
+
+ <array name="cur_display">
+ <item>CHF</item>
+ <item>EUR</item>
+ <item>DOLLAR</item>
+ </array>
+
+ <array name="cur_values">
+ <item>CHF</item>
+ <item>EUR</item>
+ <item>DOL</item>
+ </array>
+
+ <array name="tem_display">
+ <item>Celsius</item>
+ <item>Fahrenheit</item>
+ <item>Kelvin</item>
+ </array>
+
+ <array name="tem_values">
+ <item>CEL</item>
+ <item>FAH</item>
+ <item>KEL</item>
+ </array>
+
+ <array name="mas_display">
+ <item>Meter</item>
+ <item>Zoll (inch)</item>
+ <item>Kilometer</item>
+ <item>Meile</item>
+ </array>
+
+ <array name="mas_values">
+ <item>met</item>
+ <item>inc</item>
+ <item>kme</item>
+ <item>mle</item>
+ </array>
+
+ <!-- Used in app/menu examples -->
+ <string-array name="entries_list_preference">
+ <item>Alpha Option 01</item>
+ <item>Beta Option 02</item>
+ <item>Charlie Option 03</item>
+ </string-array>
+
+ <!-- Used in app/menu examples -->
+ <string-array name="entryvalues_list_preference">
+ <item>alpha</item>
+ <item>beta</item>
+ <item>charlie</item>
+ </string-array>
+</resources>
/trunk/res/values/arrays.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/xml/default_values.xml
===================================================================
--- trunk/res/xml/default_values.xml (revision 0)
+++ trunk/res/xml/default_values.xml (revision 5)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- This is a primitive example showing how to set default values for preferences.
+ See DefaultValues.java for more information. -->
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <CheckBoxPreference
+ android:key="default_toggle"
+ android:defaultValue="true"
+ android:title="@string/title_checkbox_preference"
+ android:summary="@string/summary_checkbox_preference" />
+
+ <EditTextPreference
+ android:key="default_edittext"
+ android:defaultValue="@string/default_value_edittext_preference"
+ android:title="@string/title_edittext_preference"
+ android:summary="@string/summary_edittext_preference"
+ android:dialogTitle="@string/dialog_title_edittext_preference" />
+
+ <ListPreference
+ android:key="default_list"
+ android:defaultValue="@string/default_value_list_preference"
+ android:title="@string/title_list_preference"
+ android:summary="@string/summary_list_preference"
+ android:entries="@array/entries_list_preference"
+ android:entryValues="@array/entryvalues_list_preference"
+ android:dialogTitle="@string/dialog_title_list_preference" />
+
+</PreferenceScreen>
/trunk/res/xml/default_values.xml
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: trunk/res/drawable-hdpi/aum.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/res/drawable-hdpi/aum.png
===================================================================
--- trunk/res/drawable-hdpi/aum.png (revision 0)
+++ trunk/res/drawable-hdpi/aum.png (revision 5)
/trunk/res/drawable-hdpi/aum.png
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property