1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 14:47:29 +00:00

Update most of the png images to their xml counterparts and remove unused png

This commit is contained in:
Ammar Githam 2020-09-13 20:28:40 +09:00
parent ad36331a06
commit 490956565a
33 changed files with 88 additions and 21 deletions

View File

@ -47,8 +47,9 @@ public final class DiscoverAdapter extends MultiSelectListAdapter<DiscoverItemMo
holder.itemView.setOnClickListener(v -> getInternalOnItemClickListener().onItemClick(itemModel, position));
holder.itemView.setOnLongClickListener(v -> getInternalOnLongItemClickListener().onItemLongClick(itemModel, position));
final MediaItemType mediaType = itemModel.getItemType();
holder.typeIcon.setVisibility(mediaType == MediaItemType.MEDIA_TYPE_VIDEO || mediaType == MediaItemType.MEDIA_TYPE_SLIDER ? View.VISIBLE : View.GONE);
holder.typeIcon.setImageResource(mediaType == MediaItemType.MEDIA_TYPE_SLIDER ? R.drawable.slider : R.drawable.video);
holder.typeIcon.setVisibility(
mediaType == MediaItemType.MEDIA_TYPE_VIDEO || mediaType == MediaItemType.MEDIA_TYPE_SLIDER ? View.VISIBLE : View.GONE);
holder.typeIcon.setImageResource(mediaType == MediaItemType.MEDIA_TYPE_SLIDER ? R.drawable.ic_slider_24 : R.drawable.ic_video_24);
holder.selectedView.setVisibility(itemModel.isSelected() ? View.VISIBLE : View.GONE);
holder.postImage.setImageURI(itemModel.getDisplayUrl());
}

View File

@ -35,7 +35,7 @@ public final class PostViewHolder extends RecyclerView.ViewHolder {
binding.isDownloaded.setVisibility(postModel.isDownloaded() ? View.VISIBLE : View.GONE);
binding.typeIcon.setVisibility(itemType == MediaItemType.MEDIA_TYPE_VIDEO || isSlider ? View.VISIBLE : View.GONE);
binding.typeIcon.setImageResource(isSlider ? R.drawable.slider : R.drawable.video);
binding.typeIcon.setImageResource(isSlider ? R.drawable.ic_slider_24 : R.drawable.ic_video_24);
binding.selectedView.setVisibility(postModel.isSelected() ? View.VISIBLE : View.GONE);
binding.postImage.setImageURI(postModel.getThumbnailUrl());

View File

@ -34,6 +34,6 @@ public class GroupViewHolder extends RecyclerView.ViewHolder implements View.OnC
}
public void toggle(final boolean expand) {
arrow.setImageResource(expand ? R.drawable.collapse : R.drawable.expand);
arrow.setImageResource(expand ? R.drawable.ic_keyboard_arrow_up_24 : R.drawable.ic_keyboard_arrow_down_24);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM17,13l-5,5 -5,-5h3V9h4v4h3z" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M22,16L22,4c0,-1.1 -0.9,-2 -2,-2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zM11,12l2.03,2.71L16,11l4,5L8,16l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2L4,20L4,6L2,6z"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:strokeColor="@color/black"
android:strokeWidth="0.2"
android:pathData="M8,6.82v10.36c0,0.79 0.87,1.27 1.54,0.84l8.14,-5.18c0.62,-0.39 0.62,-1.29 0,-1.69L9.54,5.98C8.87,5.55 8,6.03 8,6.82z" />
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -21,7 +22,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold" />
<ImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/collapsingArrow"
android:layout_width="32dp"
android:layout_height="match_parent"
@ -32,5 +33,5 @@
android:layout_marginEnd="3dp"
android:layout_marginRight="3dp"
android:contentDescription="@null"
android:src="@drawable/expand" />
app:srcCompat="@drawable/ic_keyboard_arrow_down_24" />
</RelativeLayout>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/slider_item_size"
android:layout_height="@dimen/slider_item_size"
android:layout_marginStart="2dp"
@ -23,7 +24,9 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:visibility="gone"
app:srcCompat="@drawable/downloaded" />
app:srcCompat="@drawable/ic_cloud_download_24"
app:tint="@color/green_400"
tools:visibility="visible" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/selectedView"

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@ -16,25 +17,26 @@
<androidx.viewpager.widget.ViewPager
android:id="@+id/media_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
tools:background="@color/semi_transparent_black" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/slider" />
app:srcCompat="@drawable/ic_slider_24" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/mediaCounter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:background="@drawable/rounder_corner_semi_black_bg"
android:gravity="center"
android:padding="5dp"
android:textColor="@android:color/white"
android:background="@drawable/rounder_corner_semi_black_bg"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textColor="@android:color/white" />
</FrameLayout>
<include

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?android:selectableItemBackground">
@ -10,7 +11,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:actualImageScaleType="centerCrop"
app:viewAspectRatio="1"/>
app:viewAspectRatio="1"
tools:background="@mipmap/ic_launcher" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/isDownloaded"
@ -19,7 +21,9 @@
android:layout_gravity="start|top"
android:layout_margin="8dp"
android:visibility="gone"
app:srcCompat="@drawable/downloaded" />
app:srcCompat="@drawable/ic_cloud_download_24"
app:tint="@color/green_400"
tools:visibility="gone" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/typeIcon"
@ -27,7 +31,8 @@
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/video" />
app:srcCompat="@drawable/ic_video_24"
tools:visibility="visible" />
<!--<ProgressBar-->
<!-- android:id="@+id/progressView"-->
@ -41,13 +46,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#8A000000"
android:visibility="gone">
android:visibility="gone"
tools:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/check" />
app:srcCompat="@drawable/ic_check_24"
app:tint="@color/blue_300"
tools:visibility="visible" />
</FrameLayout>
</FrameLayout>

View File

@ -17,5 +17,5 @@
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/video" />
app:srcCompat="@drawable/ic_video_24" />
</FrameLayout>

View File

@ -31,6 +31,6 @@
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/video" />
app:srcCompat="@drawable/ic_video_24" />
</FrameLayout>
</LinearLayout>

View File

@ -29,7 +29,7 @@
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/video" />
app:srcCompat="@drawable/ic_video_24" />
</FrameLayout>
<awais.instagrabber.customviews.RamboTextView

View File

@ -23,7 +23,7 @@
android:layout_gravity="end|top"
android:layout_margin="8dp"
android:visibility="gone"
app:srcCompat="@drawable/video" />
app:srcCompat="@drawable/ic_video_24" />
</FrameLayout>
<awais.instagrabber.customviews.RamboTextView

View File

@ -65,4 +65,6 @@
<color name="blue_A200">#448AFF</color>
<color name="blue_A400">#2979FF</color>
<color name="blue_A700">#2962FF</color>
<color name="green_400">#66BB6A</color>
</resources>