Skip to content

Commit

Permalink
Merge pull request #1 from Wamae/fix-vectors
Browse files Browse the repository at this point in the history
Try to Fix vectors.
  • Loading branch information
Wamae authored May 23, 2019
2 parents 01dd51d + 4189cc7 commit f6e7e22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions material-intro-screen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android {
versionName "1.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,13 @@ public void pageSelected(int position) {
private void nextButtonBehaviour(final int position, final SlideFragment fragment) {
boolean hasPermissionToGrant = fragment.hasNeededPermissionsToGrant();
if (hasPermissionToGrant) {
nextButton.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_next));
nextButton.setImageResource(R.drawable.ic_next);
nextButton.setOnClickListener(permissionNotGrantedClickListener);
} else if (adapter.isLastSlide(position)) {
nextButton.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_finish));
nextButton.setImageResource(R.drawable.ic_finish);
nextButton.setOnClickListener(finishScreenClickListener);
} else {
nextButton.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_next));
nextButton.setImageResource(R.drawable.ic_next);
nextButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void updateViewWithValues() {
descriptionTextView.setText(description);

if (image != 0) {
imageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), image));
imageView.setImageResource(image);
imageView.setVisibility(View.VISIBLE);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:layout_marginLeft="16dp"
android:background="@drawable/button_background"
android:padding="16dp"
android:src="@drawable/ic_previous"
app:srcCompat="@drawable/ic_previous"
android:visibility="invisible" />

<ImageButton
Expand All @@ -59,7 +59,7 @@
android:layout_marginLeft="16dp"
android:background="@drawable/button_background"
android:padding="16dp"
android:src="@drawable/ic_skip"
app:srcCompat="@drawable/ic_skip"
android:visibility="gone" />

<agency.tango.materialintroscreen.widgets.InkPageIndicator
Expand All @@ -83,7 +83,7 @@
android:layout_marginRight="16dp"
android:background="@drawable/button_background"
android:padding="16dp"
android:src="@drawable/ic_next" />
app:srcCompat="@drawable/ic_next" />
</LinearLayout>
</LinearLayout>

Expand Down

0 comments on commit f6e7e22

Please sign in to comment.