Skip to content

Commit b9f01a4

Browse files
committed
initial commit
0 parents  commit b9f01a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1627
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
TriangleLabelView
2+
====================
3+
Show triangle view.
4+
5+
Install
6+
=====
7+
Just add the dependency to your `build.gradle`:
8+
9+
```groovy
10+
dependencies {
11+
compile 'XXXXXXXXXXXXXXXXXXXXXXX'
12+
}
13+
```
14+
15+
To see how the TriangleLabelView are added to your xml layouts, check the sample project.
16+
17+
Credits
18+
=======
19+
I used [LabelView](https://github.com/corerzhang/LabelView) library by [Corer](https://github.com/corerzhang) as a base for development.
20+
21+
License
22+
=======
23+
24+
Copyright (C) 2016 Shota Saito
25+
26+
Licensed under the Apache License, Version 2.0 (the "License");
27+
you may not use this file except in compliance with the License.
28+
You may obtain a copy of the License at
29+
30+
http://www.apache.org/licenses/LICENSE-2.0
31+
32+
Unless required by applicable law or agreed to in writing, software
33+
distributed under the License is distributed on an "AS IS" BASIS,
34+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35+
See the License for the specific language governing permissions and
36+
limitations under the License.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.2"
6+
7+
dataBinding {
8+
enabled = true
9+
}
10+
defaultConfig {
11+
applicationId "jp.shts.android.trianglelabelview"
12+
minSdkVersion 10
13+
targetSdkVersion 23
14+
versionCode 1
15+
versionName "1.0"
16+
}
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
}
24+
25+
dependencies {
26+
compile fileTree(dir: 'libs', include: ['*.jar'])
27+
testCompile 'junit:junit:4.12'
28+
compile 'com.android.support:appcompat-v7:23.1.1'
29+
compile 'com.android.support:design:23.1.1'
30+
compile 'com.android.support:cardview-v7:23.1.1'
31+
compile project(':library')
32+
}

app/proguard-rules.pro

+17
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+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package jp.shts.android.trianglelabelview;
2+
3+
import android.app.Application;
4+
import android.test.ApplicationTestCase;
5+
6+
/**
7+
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8+
*/
9+
public class ApplicationTest extends ApplicationTestCase<Application> {
10+
public ApplicationTest() {
11+
super(Application.class);
12+
}
13+
}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="jp.shts.android.trianglelabelview">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity
12+
android:name=".MainActivity"
13+
android:label="@string/app_name"
14+
android:theme="@style/AppTheme.NoActionBar">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package jp.shts.android.trianglelabelview;
2+
3+
import android.os.Bundle;
4+
import android.support.v7.app.AppCompatActivity;
5+
import android.support.v7.widget.Toolbar;
6+
7+
public class MainActivity extends AppCompatActivity {
8+
9+
@Override
10+
protected void onCreate(Bundle savedInstanceState) {
11+
super.onCreate(savedInstanceState);
12+
setContentView(R.layout.activity_main);
13+
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
14+
toolbar.setTitle(R.string.app_name);
15+
}
16+
}
51.1 KB
Loading
24.1 KB
Loading
37.2 KB
Loading
32.4 KB
Loading
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true"
8+
tools:context="jp.shts.android.trianglelabelview.MainActivity">
9+
10+
<android.support.design.widget.AppBarLayout
11+
android:layout_width="match_parent"
12+
android:layout_height="wrap_content"
13+
android:theme="@style/AppTheme.AppBarOverlay">
14+
15+
<android.support.v7.widget.Toolbar
16+
android:id="@+id/toolbar"
17+
android:layout_width="match_parent"
18+
android:layout_height="?attr/actionBarSize"
19+
android:background="?attr/colorPrimary"
20+
app:popupTheme="@style/AppTheme.PopupOverlay" />
21+
22+
</android.support.design.widget.AppBarLayout>
23+
24+
<include layout="@layout/content_main" />
25+
26+
</android.support.design.widget.CoordinatorLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent">
6+
7+
<RelativeLayout
8+
android:layout_width="match_parent"
9+
android:layout_height="match_parent">
10+
<ImageView
11+
android:id="@+id/image"
12+
android:src="@drawable/s_image_1"
13+
android:scaleType="centerCrop"
14+
android:layout_width="match_parent"
15+
android:layout_height="match_parent" />
16+
<jp.shts.android.library.TriangleLabelView
17+
android:layout_width="match_parent"
18+
android:layout_height="match_parent"
19+
android:layout_alignParentLeft="true"
20+
android:layout_alignParentBottom="true"
21+
app:backgroundColor="@color/blue_900"
22+
app:corner="leftBottom"
23+
app:labelTopPadding="10dp"
24+
app:labelCenterPadding="5dp"
25+
app:labelBottomPadding="0dp"
26+
app:primaryText="New"
27+
app:primaryTextColor="@color/blue_500"
28+
app:primaryTextSize="16sp"
29+
app:secondaryText="01"
30+
app:secondaryTextColor="@color/blue_100"
31+
app:secondaryTextSize="11sp" />
32+
</RelativeLayout>
33+
</android.support.v7.widget.CardView>

0 commit comments

Comments
 (0)