Skip to content

Commit 86b49ce

Browse files
committed
Add existing file
1 parent 0395e56 commit 86b49ce

File tree

31 files changed

+2101
-32
lines changed

31 files changed

+2101
-32
lines changed

.gitignore

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
1-
# Gradle files
2-
.gradle/
3-
build/
1+
bin/
2+
gen/
3+
obj/
4+
libs/*/*.so
45

5-
# Local configuration file (sdk path, etc)
6-
local.properties
7-
8-
# Log/OS Files
9-
*.log
10-
11-
# Android Studio generated files and folders
12-
captures/
13-
.externalNativeBuild/
14-
.cxx/
15-
*.apk
16-
output.json
17-
18-
# IntelliJ
19-
*.iml
20-
.idea/
21-
misc.xml
22-
deploymentTargetDropDown.xml
23-
render.experimental.xml
24-
25-
# Keystore files
26-
*.jks
27-
*.keystore
28-
29-
# Google Services (e.g. APIs or Firebase)
30-
google-services.json
31-
32-
# Android Profiling
33-
*.hprof

app/.gitignore

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

app/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 21
5+
buildToolsVersion "21.1.0"
6+
7+
defaultConfig {
8+
applicationId "com.sdtechtop.ui.colorpicker.demo"
9+
minSdkVersion 14
10+
targetSdkVersion 29
11+
versionCode 1
12+
versionName "1.0"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled 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 project(':ttb-color-picker')
25+
}

app/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 C:\tools\adt-bundle-windows-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+
#}

app/src/main/AndroidManifest.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.sdtechtop.ui.colorpicker.demo" >
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+
android:resizeableActivity = "true">
11+
<activity
12+
android:name=".MainActivity"
13+
android:label="@string/app_name" >
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN" />
16+
17+
<category android:name="android.intent.category.LAUNCHER" />
18+
</intent-filter>
19+
</activity>
20+
</application>
21+
22+
</manifest>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.sdtechtop.ui.colorpicker.demo;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
import android.view.View;
6+
import com.sdtechtop.ui.colorpicker.ColorPickerDialog;
7+
import com.sdtechtop.ui.colorpicker.OnColorSelectedListener;
8+
9+
public class MainActivity extends Activity{
10+
11+
@Override
12+
protected void onCreate(Bundle savedInstanceState) {
13+
super.onCreate(savedInstanceState);
14+
setContentView(R.layout.main);
15+
}
16+
public void pickColor(View v){
17+
new ColorPickerDialog(this)
18+
//.setTitle("Select Background Color")
19+
.setOnColorSelectListener(new OnColorSelectedListener(){
20+
@Override
21+
public void onColorSelected(int color, String hexColor, int[] rgb) {
22+
((View)findViewById(R.id.mainLinearLayout)).setBackgroundColor(color);
23+
}
24+
}).show();
25+
}
26+
27+
}
9.18 KB
Loading
5.11 KB
Loading
14 KB
Loading
18.9 KB
Loading

0 commit comments

Comments
 (0)