Skip to content

Commit a964a38

Browse files
committed
improve home activity styling, add github link
1 parent 2e8aaf5 commit a964a38

5 files changed

Lines changed: 65 additions & 34 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:2.1.0'
7+
classpath 'com.android.tools.build:gradle:2.1.2'
88
}
99
}
1010

sample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ dependencies {
2929
compile project (':AndroidBootstrap') // replace with Maven dependency in your app
3030

3131
compile 'com.jakewharton:butterknife:7.0.1'
32-
compile 'com.android.support:appcompat-v7:23.3.0'
33-
compile 'com.android.support:support-annotations:23.3.0'
32+
compile 'com.android.support:appcompat-v7:23.4.0'
33+
compile 'com.android.support:support-annotations:23.4.0'
3434
}

sample/src/main/java/com/fractalwrench/androidbootstrap/sample/HomeActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package com.fractalwrench.androidbootstrap.sample;
22

33
import android.content.Intent;
4+
import android.net.Uri;
45
import android.os.Bundle;
56
import android.support.v7.app.AppCompatActivity;
67

7-
import com.beardedhen.androidbootstrap.BootstrapProgressBarGroup;
8-
98
import butterknife.ButterKnife;
109
import butterknife.OnClick;
1110

@@ -17,6 +16,12 @@ public class HomeActivity extends AppCompatActivity {
1716
ButterKnife.bind(this);
1817
}
1918

19+
@OnClick(R.id.github_btn) void onGithubClicked() {
20+
Intent intent = new Intent(Intent.ACTION_VIEW); startActivity(intent);
21+
intent.setData(Uri.parse("https://github.com/Bearded-Hen/Android-Bootstrap"));
22+
startActivity(intent);
23+
}
24+
2025
@OnClick(R.id.example_bootstrap_button) void onBootstrapButtonExampleClicked() {
2126
startActivity(new Intent(this, BootstrapButtonExample.class));
2227
}

sample/src/main/res/layout/activity_main.xml

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,88 +2,109 @@
22

33
<ScrollView
44
xmlns:android="http://schemas.android.com/apk/res/android"
5+
xmlns:app="http://schemas.android.com/apk/res-auto"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
78
>
89

910
<LinearLayout
1011
android:layout_width="match_parent"
1112
android:layout_height="wrap_content"
12-
android:padding="16dp"
1313
android:orientation="vertical"
14+
android:padding="16dp"
1415
>
1516

16-
<Button
17+
<com.beardedhen.androidbootstrap.BootstrapButton
18+
android:id="@+id/github_btn"
19+
style="@style/home_button"
20+
app:bootstrapBrand="danger"
21+
app:bootstrapText="{fa-github} Fork me on Github {fa-heart}"
22+
/>
23+
24+
<com.beardedhen.androidbootstrap.BootstrapButton
1725
android:id="@+id/example_bootstrap_button"
1826
style="@style/home_button"
1927
android:text="BootstrapButton"
2028
/>
2129

22-
<Button
30+
<com.beardedhen.androidbootstrap.BootstrapButton
2331
android:id="@+id/example_bootstrap_btn_group"
2432
style="@style/home_button"
2533
android:text="BootstrapButtonGroup"
2634
/>
2735

28-
<Button
36+
<com.beardedhen.androidbootstrap.BootstrapButton
2937
android:id="@+id/example_fontawesometext"
3038
style="@style/home_button"
3139
android:text="AwesomeTextView"
3240
/>
3341

34-
<Button
42+
<com.beardedhen.androidbootstrap.BootstrapButton
43+
android:id="@+id/example_bootstrap_label"
44+
style="@style/home_button"
45+
android:text="BootstrapLabel"
46+
/>
47+
48+
<com.beardedhen.androidbootstrap.BootstrapButton
3549
android:id="@+id/example_bootstrap_progress"
3650
style="@style/home_button"
3751
android:text="BootstrapProgressBar"
52+
app:bootstrapBrand="success"
3853
/>
3954

40-
<Button
55+
<com.beardedhen.androidbootstrap.BootstrapButton
4156
android:id="@+id/example_bootstrap_progress_group"
4257
style="@style/home_button"
4358
android:text="BootstrapProgressBarGroup"
59+
app:bootstrapBrand="success"
4460
/>
4561

46-
<Button
47-
android:id="@+id/example_bootstrap_label"
48-
style="@style/home_button"
49-
android:text="BootstrapLabel"
50-
/>
51-
52-
<Button
53-
android:id="@+id/example_bootstrap_edit_text"
54-
style="@style/home_button"
55-
android:text="BootstrapEditText"
56-
/>
57-
58-
<Button
62+
<com.beardedhen.androidbootstrap.BootstrapButton
5963
android:id="@+id/example_bootstrap_cricle_thumbnail"
6064
style="@style/home_button"
6165
android:text="BootstrapCircleThumbnail"
66+
app:bootstrapBrand="warning"
6267
/>
6368

64-
<Button
69+
<com.beardedhen.androidbootstrap.BootstrapButton
6570
android:id="@+id/example_bootstrap_thumbnail"
6671
style="@style/home_button"
6772
android:text="BootstrapThumbnail"
73+
app:bootstrapBrand="warning"
6874
/>
69-
<Button
75+
76+
<com.beardedhen.androidbootstrap.BootstrapButton
77+
android:id="@+id/example_bootstrap_edit_text"
78+
style="@style/home_button"
79+
android:text="BootstrapEditText"
80+
app:bootstrapBrand="info"
81+
/>
82+
83+
<com.beardedhen.androidbootstrap.BootstrapButton
7084
android:id="@+id/example_bootstrap_well"
7185
style="@style/home_button"
72-
android:text="BootstrapWell"/>
73-
74-
<Button
86+
android:text="BootstrapWell"
87+
app:bootstrapBrand="regular"
88+
/>
89+
90+
<com.beardedhen.androidbootstrap.BootstrapButton
7591
android:id="@+id/example_bootstrap_dropdown"
7692
style="@style/home_button"
77-
android:text="BootstrapDropdown"/>
93+
android:text="BootstrapDropdown"
94+
/>
7895

79-
<Button
96+
<com.beardedhen.androidbootstrap.BootstrapButton
8097
android:id="@+id/example_bootstrap_alert"
8198
style="@style/home_button"
82-
android:text="BootstrapAlert"/>
99+
android:text="BootstrapAlert"
100+
app:bootstrapBrand="danger"
101+
/>
83102

84-
<Button
103+
<com.beardedhen.androidbootstrap.BootstrapButton
85104
android:id="@+id/example_bootstrap_badge"
86105
style="@style/home_button"
87-
android:text="BootstrapBadge"/>
106+
android:text="BootstrapBadge"
107+
app:bootstrapBrand="warning"
108+
/>
88109
</LinearLayout>
89110
</ScrollView>

sample/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
<style name="home_button">
5959
<item name="android:layout_width">match_parent</item>
6060
<item name="android:layout_height">wrap_content</item>
61+
<item name="android:layout_margin">8dp</item>
62+
<item name="bootstrapBrand">primary</item>
63+
<item name="bootstrapSize">lg</item>
64+
<item name="showOutline">true</item>
65+
<item name="roundedCorners">true</item>
6166
</style>
6267

6368
</resources>

0 commit comments

Comments
 (0)