Skip to content

Commit

Permalink
Remove "allowBackup" attribute from androidManifest
Browse files Browse the repository at this point in the history
  • Loading branch information
anton46 committed Mar 4, 2015
1 parent 615a3de commit 26df9e6
Show file tree
Hide file tree
Showing 40 changed files with 53 additions and 29 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified build.gradle
100644 → 100755
Empty file.
Empty file modified collectionpicker/.gitignore
100644 → 100755
Empty file.
Empty file modified collectionpicker/build.gradle
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion collectionpicker/collectionpicker.iml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
</component>
</module>

Empty file modified collectionpicker/proguard-rules.pro
100644 → 100755
Empty file.
Empty file.
5 changes: 1 addition & 4 deletions collectionpicker/src/main/AndroidManifest.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.anton46.collectionpicker">

<application android:allowBackup="true" android:label="@string/app_name">

</application>

</manifest>
13 changes: 8 additions & 5 deletions collectionpicker/src/main/java/com/anton46/collectionitempicker/CollectionPicker.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
import android.widget.TextView;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

public class CollectionPicker extends LinearLayout {
Expand All @@ -32,7 +35,7 @@ public class CollectionPicker extends LinearLayout {

private List<Item> mItems = new ArrayList<>();
private LinearLayout mRow;
private Set<String> mCheckedItems;
private HashMap<String, Object> mCheckedItems;
private OnItemClickListener mClickListener;
private int mWidth;
private int mItemMargin = 10;
Expand Down Expand Up @@ -119,11 +122,11 @@ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
/**
* Selected flags
*/
public void setCheckedItems(Set<String> checkedItems) {
public void setCheckedItems(HashMap<String, Object> checkedItems) {
mCheckedItems = checkedItems;
}

public Set<String> getCheckedItems() {
public HashMap<String, Object> getCheckedItems() {
return mCheckedItems;
}

Expand All @@ -141,7 +144,7 @@ public void drawItemView() {

for (int i = 0; i < mItems.size(); i++) {
final Item item = mItems.get(i);
if (mCheckedItems != null && mCheckedItems.contains(item.id)) {
if (mCheckedItems != null && mCheckedItems.containsKey(item.id)) {
item.isSelected = true;
}

Expand All @@ -153,7 +156,7 @@ public void onClick(View v) {
animateView(v);
item.isSelected = !item.isSelected;
if (item.isSelected) {
mCheckedItems.add(item.id);
mCheckedItems.put(item.id, item);
} else {
mCheckedItems.remove(item.id);
}
Expand Down
Empty file.
Empty file.
Empty file.
Empty file modified collectionpicker/src/main/res/layout/item_layout.xml
100644 → 100755
Empty file.
Empty file modified collectionpicker/src/main/res/values/attrs.xml
100644 → 100755
Empty file.
Empty file modified collectionpicker/src/main/res/values/colors.xml
100644 → 100755
Empty file.
Empty file modified collectionpicker/src/main/res/values/strings.xml
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Empty file.
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified image1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified image2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified maven_push.gradle
100644 → 100755
Empty file.
Empty file modified sample/.gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion sample/build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.anton46:collection-picker:1.0.0'
compile 'com.anton46:collection-picker:1.0.+'
}
Empty file modified sample/proguard-rules.pro
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions sample/sample.iml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="collection-picker-1.0.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="collection-picker-1.0.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
</component>
</module>

Empty file.
Empty file modified sample/src/main/AndroidManifest.xml
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions sample/src/main/java/com/anton46/collectionitempicker/sample/MainActivity.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ private List<Item> generateItems() {
items.add(new Item("c", "Pizza"));
items.add(new Item("d", "Burger"));
items.add(new Item("e", "Ice Cream"));
items.add(new Item("c", "Pizza"));
items.add(new Item("d", "Burger"));
items.add(new Item("e", "Ice Cream"));
items.add(new Item("g", "Goods for working"));
items.add(new Item("h", "Romantic Places"));
items.add(new Item("f", "Japanese food"));
items.add(new Item("c", "Pizza"));
items.add(new Item("d", "Burger"));
items.add(new Item("e", "Ice Cream"));
items.add(new Item("c", "Pizza"));
items.add(new Item("d", "Burger"));
items.add(new Item("e", "Ice Cream"));
items.add(new Item("g", "Goods for working"));
items.add(new Item("h", "Romantic Places"));
items.add(new Item("f", "Japanese food"));
items.add(new Item("c", "Pizza"));
items.add(new Item("d", "Burger"));
items.add(new Item("e", "Ice Cream"));
return items;
}
}
38 changes: 22 additions & 16 deletions sample/src/main/res/layout/activity_main.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,36 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="16dp"
android:orientation="vertical">
android:orientation="vertical"
android:paddingTop="16dp">

<com.anton46.collectionitempicker.CollectionPicker
android:id="@+id/collection_item_picker"
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:cp_addIcon="@android:drawable/ic_menu_add"
app:cp_cancelIcon="@android:drawable/ic_menu_close_clear_cancel"
app:cp_itemBackgroundNormal="@color/blue"
app:cp_itemBackgroundPressed="@color/red"
app:cp_itemMargin="5dp"
app:cp_textPaddingBottom="5dp"
app:cp_textPaddingLeft="10dp"
app:cp_textPaddingRight="10dp"
app:cp_textPaddingTop="5dp" />
android:layout_weight="1">

<com.anton46.collectionitempicker.CollectionPicker
android:id="@+id/collection_item_picker"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:cp_addIcon="@android:drawable/ic_menu_add"
app:cp_cancelIcon="@android:drawable/ic_menu_close_clear_cancel"
app:cp_itemBackgroundNormal="@color/blue"
app:cp_itemBackgroundPressed="@color/red"
app:cp_itemMargin="5dp"
app:cp_textPaddingBottom="5dp"
app:cp_textPaddingLeft="10dp"
app:cp_textPaddingRight="10dp"
app:cp_textPaddingTop="5dp" />
</ScrollView>

<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="0 Items Selected"
android:layout_margin="10dp"/>
android:layout_margin="10dp"
android:text="0 Items Selected" />

</LinearLayout>
Empty file modified sample/src/main/res/mipmap-hdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/src/main/res/mipmap-mdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/src/main/res/mipmap-xhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified sample/src/main/res/values/colors.xml
100644 → 100755
Empty file.
Empty file modified sample/src/main/res/values/strings.xml
100644 → 100755
Empty file.
Empty file modified sample/src/main/res/values/styles.xml
100644 → 100755
Empty file.
Empty file modified settings.gradle
100644 → 100755
Empty file.

0 comments on commit 26df9e6

Please sign in to comment.