Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
231 changed files
with
4,115 additions
and
355 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
29 changes: 14 additions & 15 deletions
29
com.example.drawable.lightswitch/res/drawable/button_default.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
8 changes: 6 additions & 2 deletions
8
com.vogella.android.actionbar.actionprovider/res/menu/activity_main.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
42 changes: 42 additions & 0 deletions
42
com.vogella.android.actionbar.actionview.search/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
14
com.vogella.android.actionbar.actionview.search/project.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Binary file added
BIN
+1.44 KB
com.vogella.android.actionbar.actionview.search/res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+940 Bytes
com.vogella.android.actionbar.actionview.search/res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.88 KB
com.vogella.android.actionbar.actionview.search/res/drawable-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.1 KB
...vogella.android.actionbar.actionview.search/res/drawable-xxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
com.vogella.android.actionbar.actionview.search/res/menu/main.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.
8 changes: 8 additions & 0 deletions
8
com.vogella.android.actionbar.actionview.search/res/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.
5 changes: 5 additions & 0 deletions
5
com.vogella.android.actionbar.actionview.search/res/xml/search.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
33 changes: 33 additions & 0 deletions
33
...r.actionview.search/src/com/vogella/android/actionbar/actionview/search/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...view.search/src/com/vogella/android/actionbar/actionview/search/SearchResultActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
com.vogella.android.actionbar.actionview.search_draft/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
33
com.vogella.android.actionbar.actionview.search_draft/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Oops, something went wrong.