Skip to content

Commit c727c7b

Browse files
committed
moved project to github
1 parent 5d008c9 commit c727c7b

File tree

34 files changed

+632
-232
lines changed

34 files changed

+632
-232
lines changed

.gitignore

-26
This file was deleted.

LICENSE

-202
This file was deleted.

README.md

-4
This file was deleted.

app/build.gradle

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 20
5+
buildToolsVersion "20.0.0"
6+
7+
defaultConfig {
8+
applicationId "pl.polak.taggerstring.demo"
9+
minSdkVersion 7
10+
targetSdkVersion 20
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:20.0.0'
25+
26+
compile project (':library');
27+
}

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/Android Studio.app/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 pl.polak.taggerstring;
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

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="pl.polak.taggerstring.demo" >
4+
5+
<application
6+
android:icon="@drawable/ic_launcher"
7+
android:label="@string/app_name"
8+
android:theme="@style/AppTheme" >
9+
<activity
10+
android:name=".MainActivity"
11+
android:label="@string/app_name" >
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
15+
<category android:name="android.intent.category.LAUNCHER" />
16+
</intent-filter>
17+
</activity>
18+
</application>
19+
20+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package pl.polak.taggerstring.demo;
2+
3+
import android.support.v7.app.ActionBarActivity;
4+
import android.os.Bundle;
5+
import android.widget.TextView;
6+
7+
import java.util.HashMap;
8+
import java.util.Map;
9+
10+
import pl.polak.taggerstring.TaggerString;
11+
import pl.polak.taggerstring.TaggerStyleType;
12+
13+
14+
public class MainActivity extends ActionBarActivity {
15+
16+
@Override
17+
protected void onCreate(Bundle savedInstanceState) {
18+
super.onCreate(savedInstanceState);
19+
setContentView(R.layout.activity_main);
20+
21+
TextView tvExampleOne = (TextView) findViewById(R.id.tv_example_one);
22+
23+
TaggerString taggerString = TaggerString.from(getString(R.string.example_one));
24+
taggerString.with("user_name", "Marcin", TaggerStyleType.BOLD);
25+
taggerString.with("developer_role", "Android Software Developer", TaggerStyleType.UNDERLINE);
26+
27+
tvExampleOne.setText(taggerString.formatCustom());
28+
29+
Map<String, Object> map = new HashMap<String, Object>();
30+
map.put("user_name", "Marcin");
31+
map.put("developer_role", "Android Software Developer");
32+
33+
TaggerString taggerStringMap = TaggerString.from(getString(R.string.example_one));
34+
taggerStringMap.with(map);
35+
36+
TextView tvExampleMap = (TextView) findViewById(R.id.tv_example_map);
37+
tvExampleMap.setText(taggerStringMap.format());
38+
39+
40+
}
41+
}
9.18 KB
Loading
5.11 KB
Loading
Loading
18.9 KB
Loading
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingLeft="@dimen/activity_horizontal_margin"
6+
android:paddingRight="@dimen/activity_horizontal_margin"
7+
android:paddingTop="@dimen/activity_vertical_margin"
8+
android:paddingBottom="@dimen/activity_vertical_margin"
9+
tools:context=".MainActivity">
10+
11+
<TextView
12+
android:id="@+id/tv_example_one"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content" />
15+
16+
<TextView
17+
android:id="@+id/tv_example_map"
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"
20+
android:layout_below="@id/tv_example_one"/>
21+
22+
</RelativeLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources>
2+
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
3+
(such as screen margins) for screens with more than 820dp of available width. This
4+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
5+
<dimen name="activity_horizontal_margin">64dp</dimen>
6+
</resources>

app/src/main/res/values/dimens.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources>
2+
<!-- Default screen margins, per the Android Design guidelines. -->
3+
<dimen name="activity_horizontal_margin">16dp</dimen>
4+
<dimen name="activity_vertical_margin">16dp</dimen>
5+
</resources>

0 commit comments

Comments
 (0)