Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d98e1ac

Browse files
Added 'RichButtons' sample.
1 parent 11cb222 commit d98e1ac

File tree

17 files changed

+176
-1
lines changed

17 files changed

+176
-1
lines changed

‎app-richbuttons/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

‎app-richbuttons/build.gradle‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apply plugin: 'android'
2+
3+
android {
4+
compileSdkVersion 19
5+
buildToolsVersion "19.1.0"
6+
7+
defaultConfig {
8+
applicationId "com.snippet.richbuttons"
9+
minSdkVersion 9
10+
targetSdkVersion 19
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
runProguard false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
compile 'com.android.support:appcompat-v7:19.+'
25+
compile 'com.github.ksoichiro:richbuttons:0.1.0@aar'
26+
}

‎app-richbuttons/proguard-rules.pro‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Applications/adt-bundle-mac-x86_64-20131030/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.snippet.richbuttons" >
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@drawable/ic_launcher"
8+
android:label="@string/app_name"
9+
android:theme="@style/AppTheme" >
10+
<activity
11+
android:name=".MainActivity"
12+
android:label="@string/app_name" >
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN" />
15+
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
46 KB
Loading[フレーム]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.snippet.richbuttons;
2+
3+
import android.support.v7.app.ActionBarActivity;
4+
import android.os.Bundle;
5+
import android.view.Menu;
6+
import android.view.MenuItem;
7+
8+
9+
public class MainActivity extends ActionBarActivity {
10+
11+
@Override
12+
protected void onCreate(Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
setContentView(R.layout.activity_main);
15+
}
16+
17+
18+
@Override
19+
public boolean onCreateOptionsMenu(Menu menu) {
20+
// Inflate the menu; this adds items to the action bar if it is present.
21+
getMenuInflater().inflate(R.menu.main, menu);
22+
return true;
23+
}
24+
25+
@Override
26+
public boolean onOptionsItemSelected(MenuItem item) {
27+
// Handle action bar item clicks here. The action bar will
28+
// automatically handle clicks on the Home/Up button, so long
29+
// as you specify a parent activity in AndroidManifest.xml.
30+
int id = item.getItemId();
31+
if (id == R.id.action_settings) {
32+
return true;
33+
}
34+
return super.onOptionsItemSelected(item);
35+
}
36+
}
7.6 KB
Loading[フレーム]
3.67 KB
Loading[フレーム]
12.1 KB
Loading[フレーム]
24.2 KB
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /