Skip to content

Commit

Permalink
Android projects updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vogella committed May 2, 2013
1 parent fc5ab33 commit e93c859
Show file tree
Hide file tree
Showing 231 changed files with 4,115 additions and 355 deletions.
21 changes: 0 additions & 21 deletions aaa_test/res/layout/activity_second.xml

This file was deleted.

14 changes: 0 additions & 14 deletions aaa_test/src/com/example/aaa_test/MainActivity.java

This file was deleted.

67 changes: 0 additions & 67 deletions aaa_test/src/com/example/aaa_test/MyView.java

This file was deleted.

29 changes: 14 additions & 15 deletions com.example.drawable.lightswitch/res/drawable/button_default.xml
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="2dp"
android:color="#FFFFFFFF" />
<gradient
android:endColor="#DDBBBBBB"
android:startColor="#DD777777"
android:angle="90" />
<corners
android:bottomRightRadius="7dp"
android:bottomLeftRadius="7dp"
android:topLeftRadius="7dp"
android:topRightRadius="7dp" />
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >

<stroke
android:width="2dp"
android:color="#FFFFFFFF" />

<gradient
android:angle="90"
android:endColor="#DDBBBBBB"
android:startColor="#DD777777" />

<corners android:radius="7dp" />

</shape>
@@ -1,11 +1,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

<item
android:id="@+id/refresh"
android:orderInCategory="20"
android:showAsAction="always|collapseActionView"
android:title="Refresh">
</item>
<item
android:id="@+id/menu_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/menu_settings"/>
<item android:id="@+id/item1" android:title="Refresh" android:showAsAction="always|collapseActionView" android:orderInCategory="20"></item>
<item android:id="@+id/item2" android:title="Start" android:orderInCategory="10" android:showAsAction="always"></item>

</menu>
Expand Up @@ -52,7 +52,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
// case R.id.menu_share:
// doShare();
// break;
case R.id.item1:
case R.id.refresh:
// Get the ActionProvider
findItem = item;
MenuItem setActionView = findItem.setActionView(R.layout.progress);
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions com.vogella.android.actionbar.actionview.search/.project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.vogella.android.actionbar.actionview.search</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vogella.android.actionbar.actionview.search"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<activity android:name="SearchResultActivity" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>

<meta-data
android:name="android.app.searchable"
android:resource="@xml/search" />
</activity>
<activity
android:name="com.vogella.android.actionbar.actionview.search.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<meta-data
android:name="android.app.default_searchable"
android:value=".SearchResultActivity" />
</activity>

</application>

</manifest>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions com.vogella.android.actionbar.actionview.search/project.properties
@@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-17
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -11,15 +11,6 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lars"
android:text="@string/hello_world" />

<com.example.aaa_test.MyView
android:id="@+id/myView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/lars"
android:layout_centerHorizontal="true"
android:layout_marginTop="92dp" />

</RelativeLayout>
11 changes: 11 additions & 0 deletions com.vogella.android.actionbar.actionview.search/res/menu/main.xml
@@ -0,0 +1,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_search"
android:orderInCategory="100"
android:showAsAction="always"
android:icon="@drawable/ic_launcher"
android:title="@string/action_search"
android:actionViewClass="android.widget.SearchView"/>

</menu>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">Search</string>
<string name="action_search">Search</string>
<string name="hello_world">Hello world!</string>

</resources>
File renamed without changes.
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="Example string" >
</searchable>
@@ -0,0 +1,33 @@
package com.vogella.android.actionbar.actionview.search;

import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.widget.SearchView;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
// Get the SearchView and set the searchable configuration
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
SearchView searchView = (SearchView) menu.findItem(R.id.action_search)
.getActionView();
searchView.setSearchableInfo(searchManager
.getSearchableInfo(getComponentName()));
// searchView.setIconifiedByDefault(false);

return true;
}

}
@@ -0,0 +1,15 @@
package com.vogella.android.actionbar.actionview.search;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

public class SearchResultActivity extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Toast.makeText(this, "Hello", Toast.LENGTH_LONG).show();
}
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions com.vogella.android.actionbar.actionview.search_draft/.project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.vogella.android.actionbar.actionview.search_draft</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

0 comments on commit e93c859

Please sign in to comment.