Skip to content

Commit

Permalink
feat: fix section number display in viewpager sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Manabu-GT committed Mar 25, 2017
1 parent 61103c8 commit d8884f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
View numberText = view.findViewById(R.id.number_text);
if (numberText != null && numberText instanceof TextView) {
((TextView) numberText).setText(String.valueOf(getArguments().getInt(ARG_SECTION_NUMBER)));
((TextView) numberText).setText(String.valueOf(getArguments().getInt(ARG_SECTION_NUMBER) + 1));
}
}

Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/fragment_place_holder_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
android:id="@+id/number_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="64dp"
android:layout_gravity="center_horizontal|top"
android:layout_marginTop="32dp"
android:textSize="64dp"
android:textColor="@android:color/black"
tools:text="1"/>
Expand Down

0 comments on commit d8884f7

Please sign in to comment.