Skip to content
This repository was archived by the owner on Mar 1, 2022. It is now read-only.

Commit 584e746

Browse files
committed
Sample material look/feel, icon, fixed/updated preference activity and fragment to work with updated secure prefs library. Renamed some classes to be better indicators of what they are.
1 parent 728808f commit 584e746

24 files changed

+445
-317
lines changed

sample/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
android:icon="@drawable/ic_launcher"
3030
android:label="@string/app_name"
3131
tools:replace="android:allowBackup"
32+
android:name=".App"
3233
android:theme="@style/AppTheme" >
3334
<activity
3435
android:name="com.securepreferences.sample.MainActivity"
@@ -40,10 +41,10 @@
4041
</intent-filter>
4142
</activity>
4243
<activity
43-
android:name="com.securepreferences.sample.OldPreferenceActivity"
44+
android:name=".SamplePreferenceActivity"
4445
android:screenOrientation="portrait" />
4546
<activity
46-
android:name="com.securepreferences.sample.NewPreferenceActivity"
47+
android:name=".ActivityWithPreferenceFragment"
4748
android:screenOrientation="portrait" />
4849
</application>
4950

sample/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ android {
3131
}
3232

3333
dependencies {
34+
compile 'com.android.support:appcompat-v7:21.0.3'
3435
compile fileTree(dir: 'libs', include: '*.jar')
3536
compile project(':library')
3637
}
37-
3838
}
39-
dependencies {
40-
compile project(':library')
41-
}
756 Bytes
Loading
-1.13 KB
Binary file not shown.
743 Bytes
Loading

sample/res/drawable-xxhdpi/ic_launcher.png

100644100755
733 Bytes
Loading

sample/res/drawable-xxxhdpi/ic_launcher.png

100644100755
1.39 KB
Loading

sample/res/layout/activity_main.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,42 +42,42 @@
4242
android:orientation="horizontal" >
4343

4444
<Button
45-
android:layout_width="0dp"
46-
android:layout_height="wrap_content"
47-
android:layout_marginTop="@dimen/activity_vertical_margin"
45+
android:layout_width="match_parent"
46+
android:layout_height="match_parent"
47+
android:layout_marginTop="@dimen/button_vertical_margin"
4848
android:layout_weight="1"
4949
android:minHeight="@dimen/min_button_height"
5050
android:onClick="onGetButtonClick"
5151
android:text="@string/get_button" />
5252

5353
<Button
54-
android:layout_width="0dp"
55-
android:layout_height="wrap_content"
56-
android:layout_marginTop="@dimen/activity_vertical_margin"
54+
android:layout_width="match_parent"
55+
android:layout_height="match_parent"
56+
android:layout_marginTop="@dimen/button_vertical_margin"
5757
android:layout_weight="1"
5858
android:minHeight="@dimen/min_button_height"
5959
android:onClick="onSetButtonClick"
6060
android:text="@string/set_button" />
61-
</LinearLayout>
62-
63-
<LinearLayout
64-
android:layout_width="match_parent"
65-
android:layout_height="wrap_content"
66-
android:orientation="horizontal" >
6761

6862
<Button
69-
android:layout_width="0dp"
70-
android:layout_height="wrap_content"
71-
android:layout_marginTop="@dimen/activity_vertical_margin"
63+
android:layout_width="match_parent"
64+
android:layout_height="match_parent"
65+
android:layout_marginTop="@dimen/button_vertical_margin"
7266
android:layout_weight="1"
7367
android:minHeight="@dimen/min_button_height"
7468
android:onClick="onRemoveButtonClick"
7569
android:text="@string/remove_button" />
70+
</LinearLayout>
71+
72+
<LinearLayout
73+
android:layout_width="match_parent"
74+
android:layout_height="wrap_content"
75+
android:orientation="horizontal" >
7676

7777
<Button
7878
android:layout_width="0dp"
7979
android:layout_height="wrap_content"
80-
android:layout_marginTop="@dimen/activity_vertical_margin"
80+
android:layout_marginTop="@dimen/button_vertical_margin"
8181
android:layout_weight="1"
8282
android:minHeight="@dimen/min_button_height"
8383
android:onClick="onClearAllButtonClick"
@@ -87,14 +87,14 @@
8787
<Button
8888
android:layout_width="match_parent"
8989
android:layout_height="wrap_content"
90-
android:layout_marginTop="@dimen/activity_vertical_margin"
90+
android:layout_marginTop="@dimen/button_vertical_margin"
9191
android:onClick="onActivityButtonClick"
9292
android:text="@string/activity_button" />
9393

9494
<Button
9595
android:layout_width="match_parent"
9696
android:layout_height="wrap_content"
97-
android:layout_marginTop="@dimen/activity_vertical_margin"
97+
android:layout_marginTop="@dimen/button_vertical_margin"
9898
android:onClick="onFragmentButtonClick"
9999
android:text="@string/fragment_button" />
100100

sample/res/menu/menu_main.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
<item android:id="@+id/action_github"
77
android:title="@string/action_github"
88
android:orderInCategory="100"
9+
android:icon="@drawable/ic_action_github"
10+
app:showAsAction="always"
911
/>
1012
</menu>

sample/res/values-v11/styles.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)