Skip to content

Commit edb4d5f

Browse files
committed
Renamed layout
1 parent 81f82be commit edb4d5f

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

cardstackview/src/main/java/com/yuyakaido/android/cardstackview/CardStackView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void initializeViews() {
120120

121121
for (int i = 0; i < option.visibleCount; i++) {
122122
CardContainerView view = (CardContainerView) LayoutInflater.from(getContext())
123-
.inflate(R.layout.card_container_view, this, false);
123+
.inflate(R.layout.card_container, this, false);
124124
view.setDraggable(false);
125125
view.setCardStackOption(option);
126126
view.setOverlay(option.leftOverlay, option.rightOverlay);

cardstackview/src/main/java/com/yuyakaido/android/cardstackview/internal/CardContainerView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ public CardContainerView(Context context, AttributeSet attrs, int defStyleAttr)
6767
@Override
6868
protected void onFinishInflate() {
6969
super.onFinishInflate();
70-
inflate(getContext(), R.layout.view_card, this);
71-
contentContainer = (ViewGroup) findViewById(R.id.view_card_container_content);
72-
overlayContainer = (ViewGroup) findViewById(R.id.view_card_container_overlay);
70+
inflate(getContext(), R.layout.card_frame, this);
71+
contentContainer = (ViewGroup) findViewById(R.id.card_frame_content_container);
72+
overlayContainer = (ViewGroup) findViewById(R.id.card_frame_overlay_container);
7373
}
7474

7575
@Override

cardstackview/src/main/res/layout/view_card.xml renamed to cardstackview/src/main/res/layout/card_frame.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
android:layout_height="match_parent">
77

88
<FrameLayout
9-
android:id="@+id/view_card_container_content"
9+
android:id="@+id/card_frame_content_container"
1010
android:layout_width="match_parent"
1111
android:layout_height="match_parent">
1212
</FrameLayout>
1313

1414
<FrameLayout
15-
android:id="@+id/view_card_container_overlay"
15+
android:id="@+id/card_frame_overlay_container"
1616
android:layout_width="match_parent"
1717
android:layout_height="match_parent">
1818
</FrameLayout>

sample/src/main/java/com/yuyakaido/android/cardstackview/sample/TouristSpotCardAdapter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public View getView(int position, View contentView, ViewGroup parent) {
2222

2323
if (contentView == null) {
2424
LayoutInflater inflater = LayoutInflater.from(getContext());
25-
contentView = inflater.inflate(R.layout.item_card_stack, parent, false);
25+
contentView = inflater.inflate(R.layout.item_tourist_spot_card, parent, false);
2626
holder = new ViewHolder(contentView);
2727
contentView.setTag(holder);
2828
} else {
@@ -44,9 +44,9 @@ private static class ViewHolder {
4444
public ImageView image;
4545

4646
public ViewHolder(View view) {
47-
this.name = (TextView) view.findViewById(R.id.item_card_stack_name);
48-
this.city = (TextView) view.findViewById(R.id.item_card_stack_city);
49-
this.image = (ImageView) view.findViewById(R.id.item_card_stack_image);
47+
this.name = (TextView) view.findViewById(R.id.item_tourist_spot_card_name);
48+
this.city = (TextView) view.findViewById(R.id.item_tourist_spot_card_city);
49+
this.image = (ImageView) view.findViewById(R.id.item_tourist_spot_card_image);
5050
}
5151
}
5252

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
app:elevationEnabled="true"
2121
app:swipeEnabled="true"
2222
app:swipeDirection="horizontal"
23-
app:leftOverlay="@layout/view_overlay_left"
24-
app:rightOverlay="@layout/view_overlay_right"/>
23+
app:leftOverlay="@layout/overlay_left"
24+
app:rightOverlay="@layout/overlay_right"/>
2525

2626
<ProgressBar
2727
android:id="@+id/activity_main_progress_bar"

sample/src/main/res/layout/item_card_stack.xml renamed to sample/src/main/res/layout/item_tourist_spot_card.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
android:layout_height="match_parent">
1616

1717
<ImageView
18-
android:id="@+id/item_card_stack_image"
18+
android:id="@+id/item_tourist_spot_card_image"
1919
android:layout_width="match_parent"
2020
android:layout_height="match_parent"
2121
android:scaleType="centerCrop"/>
@@ -29,15 +29,15 @@
2929
android:layout_alignParentBottom="true">
3030

3131
<TextView
32-
android:id="@+id/item_card_stack_name"
32+
android:id="@+id/item_tourist_spot_card_name"
3333
android:layout_width="wrap_content"
3434
android:layout_height="wrap_content"
3535
android:textStyle="bold"
3636
android:textColor="@android:color/white"
3737
android:textSize="26sp"/>
3838

3939
<TextView
40-
android:id="@+id/item_card_stack_city"
40+
android:id="@+id/item_tourist_spot_card_city"
4141
android:layout_width="wrap_content"
4242
android:layout_height="wrap_content"
4343
android:textStyle="bold"

sample/src/main/res/layout/view_overlay_left.xml renamed to sample/src/main/res/layout/overlay_left.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
android:layout_width="wrap_content"
1515
android:layout_height="wrap_content"
1616
android:layout_gravity="center"
17-
android:src="@mipmap/icon_overlay_left"/>
17+
android:src="@mipmap/overlay_left"/>
1818

1919
</android.support.v7.widget.CardView>

sample/src/main/res/layout/view_overlay_right.xml renamed to sample/src/main/res/layout/overlay_right.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
android:layout_width="wrap_content"
1515
android:layout_height="wrap_content"
1616
android:layout_gravity="center"
17-
android:src="@mipmap/icon_overlay_right"/>
17+
android:src="@mipmap/overlay_right"/>
1818

1919
</android.support.v7.widget.CardView>

0 commit comments

Comments
 (0)