-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/sdsmdg/hareshkh/lectureassignment/Utils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.sdsmdg.hareshkh.lectureassignment; | ||
|
||
import android.graphics.Bitmap; | ||
|
||
public class Utils { | ||
|
||
public static Bitmap scaleToFitWidth(Bitmap b, int width) | ||
{ | ||
float factor = width / (float) b.getWidth(); | ||
return Bitmap.createScaledBitmap(b, width, (int) (b.getHeight() * factor), true); | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/sdsmdg/hareshkh/lectureassignment/movies.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.sdsmdg.hareshkh.lectureassignment; | ||
|
||
public class movies { | ||
|
||
String title; | ||
String year; | ||
String imageResId; | ||
|
||
public movies(String title, String year, String imageResId) { | ||
this.title = title; | ||
this.year = year; | ||
this.imageResId = imageResId; | ||
} | ||
|
||
public String getYear() { | ||
return year; | ||
} | ||
|
||
public void setYear(String year) { | ||
this.year = year; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getImageResId() { | ||
return imageResId; | ||
} | ||
|
||
public void setImageResId(String imageResId) { | ||
this.imageResId = imageResId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<android.support.v7.widget.CardView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
</LinearLayout> |