Skip to content

Commit

Permalink
Replacing http->https only if at start
Browse files Browse the repository at this point in the history
  • Loading branch information
knjk04 committed Aug 16, 2018
1 parent 416773c commit ee86c7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/presentedbykaran/bookshelf/Book.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void setSelfLink(String selfLink) {
// One problem with this is that it will replace 'http' with 'https' regardless of where 'http'
// appears in the URL
private void changeHttpToHttps(String strImageURL) {
this.strImageURL = strImageURL.replace("http","https");
this.strImageURL = strImageURL.replaceFirst("http", "https");
Log.d(TAG, "strImageURL: " + this.strImageURL);
}
}
4 changes: 2 additions & 2 deletions app/src/main/res/layout/preview2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
android:background="?android:attr/listDivider"
app:layout_constraintBottom_toTopOf="@+id/imageView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/previewRatingTxt"
app:layout_constraintVertical_bias="0.015" />
app:layout_constraintVertical_bias="0.016" />
</android.support.constraint.ConstraintLayout>

0 comments on commit ee86c7e

Please sign in to comment.