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
<com.mindorks.placeholderview.PlaceHolderView | |
android:id="@+id/galleryView" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"/> |
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
@Animate(Animation.ENTER_LEFT_DESC) | |
@NonReusable | |
@Layout(R.layout.gallery_item_big) | |
public class ImageTypeBig { | |
@View(R.id.imageView) | |
private ImageView imageView; | |
private String mUlr; | |
private Context mContext; |
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
PlaceHolderView mGalleryView = (PlaceHolderView)findViewById(R.id.galleryView); | |
mGalleryView | |
.addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url1)); | |
.addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url2)); | |
.addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url3)); | |
.addView(new ImageTypeBig(this.getApplicationContext(), mGalleryView, url4)); |
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
// If customisation is Required then use Builder with the PlaceHolderView | |
placeHolderView.getBuilder() | |
.setHasFixedSize(false) | |
.setItemViewCacheSize(10) | |
.setLayoutManager(new GridLayoutManager(this, 3)); |
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
<?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="wrap_content" | |
android:padding="10dp"> | |
<ImageView | |
android:id="@+id/imageView" | |
android:layout_width="match_parent" | |
android:layout_height="225dp" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<com.mindorks.placeholderview.PlaceHolderView | |
android:id="@+id/galleryView" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
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
@Animate(Animation.CARD_LEFT_IN_DESC) | |
@NonReusable | |
@Layout(R.layout.gallery_item) | |
public class GalleryItem { | |
@View(R.id.imageView) | |
private ImageView imageView; | |
private Drawable mDrawable; |
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
public class MainActivity extends AppCompatActivity { | |
private PlaceHolderView mGalleryView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mGalleryView = (PlaceHolderView)findViewById(R.id.galleryView); | |
mGalleryView |
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
android { | |
... | |
sourceSets { | |
main { | |
assets.srcDirs = ['src/main/assets', 'src/main/assets/'] | |
res.srcDirs = ['src/main/res', 'src/main/res/drawable'] | |
} | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
xmlns:android="http://schemas.android.com/apk/res/android"> | |
<com.mindorks.placeholderview.PlaceHolderView | |
android:id="@+id/galleryView" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:scrollbars="vertical"/> |