Wiv

Additional

Language
Java
Version
N/A
Created
May 31, 2017
Updated
Jun 2, 2017
Owner
ihsan BAL (ihsanbal)
Contributor
ihsan BAL (ihsanbal)
1
Activity
Badge
Generate
Download
Source code
APK file

Blurb

Wiv

Library of Tweet-ui TweetMediaView component.

Usage

MediaView mediaView;
ArrayList<String> medias;

//medias.add("http://datalook.io/app/uploads/NY.jpg");
mediaView.setOnMediaClickListener(new MediaView.OnMediaClickListener() {
    @Override
    public void onMediaClick(View view, int index) {
        Snackbar.make(view, "onClickIndex :" + index, Snackbar.LENGTH_LONG).show();
    }
});
mediaView.setMedias(medias);
<com.ihsanbal.wiv.AspectRatioLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="?attr/actionBarSize"
        app:aspect_ratio="1"
        app:dimension_to_adjust="height">

        <com.ihsanbal.wiv.MediaView
            android:id="@+id/media.view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="14dp"
            app:background_color="@android:color/white"
            app:corner_radii="15dp"
            app:divider_size="2dp" />

</com.ihsanbal.wiv.AspectRatioLayout>

Download

Gradle:

allprojects {
 repositories {
  ...
  maven { url 'https://jitpack.io' }
 }
}

dependencies {
 compile 'com.github.ihsanbal:Wiv:1.0.0'
}

Maven:

<repository>
   <id>jitpack.io</id>
   <url>https://jitpack.io</url>
</repository>

<dependency>
   <groupId>com.github.ihsanbal</groupId>
   <artifactId>Wiv</artifactId>
   <version>1.0.0</version>
</dependency>

Screenshots