1
0
mirror of https://gitlab.shinice.net/pixeldroid/PixelDroid synced 2024-12-26 15:04:04 +01:00

Remove duplicate drawable

This commit is contained in:
Matthieu 2024-01-03 12:00:22 +01:00
parent 9b1573dd8b
commit 49ec982464
11 changed files with 30 additions and 879 deletions

View File

@ -27,7 +27,7 @@ android {
}
defaultConfig {
minSdkVersion 23
versionCode 25
versionCode 26
targetSdkVersion 34
versionName "1.0.beta" + versionCode
@ -220,7 +220,7 @@ dependencies {
implementation 'com.mikepenz:materialdrawer-iconics:9.0.1'
implementation 'com.mikepenz:iconics-views:5.4.0'
implementation 'com.mikepenz:google-material-typeface:4.0.0.2-kotlin@aar'
implementation 'com.github.ligi:tracedroid:4.1'
implementation 'me.relex:circleindicator:2.1.6'

View File

@ -18,6 +18,9 @@ import androidx.recyclerview.widget.*
import org.pixeldroid.app.R
import org.pixeldroid.app.databinding.ImageCarouselBinding
import me.relex.circleindicator.CircleIndicator2
import org.pixeldroid.common.dpToPx
import org.pixeldroid.common.getSnapPosition
import org.pixeldroid.common.spToPx
class ImageCarousel(
context: Context,

View File

@ -1,52 +0,0 @@
package org.pixeldroid.app.postCreation.carousel
import android.content.Context
import android.util.DisplayMetrics
import android.util.TypedValue
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SnapHelper
/**
* This method converts device specific pixels to density independent pixels.
*/
fun Int.pxToDp(context: Context): Int {
return (this / (context.resources.displayMetrics.densityDpi.toFloat() / DisplayMetrics.DENSITY_DEFAULT)).toInt()
}
/**
* This method converts dp unit to equivalent pixels, depending on device density.
*/
fun Int.dpToPx(context: Context): Int {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
this.toFloat(),
context.resources.displayMetrics
).toInt()
}
/**
* This method converts sp unit to equivalent pixels, depending on device density.
*/
fun Int.spToPx(context: Context): Int {
return TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_SP,
this.toFloat(),
context.resources.displayMetrics
).toInt()
}
/**
* Get current snap item position of a recyclerView.
*
* @param layoutManager Target recyclerView
* @return Position of the item or RecyclerView.NO_POSITION (-1)
*/
fun SnapHelper.getSnapPosition(layoutManager: RecyclerView.LayoutManager?): Int {
if (layoutManager == null) {
return RecyclerView.NO_POSITION
}
val snapView: View = this.findSnapView(layoutManager) ?: return RecyclerView.NO_POSITION
return layoutManager.getPosition(snapView)
}

View File

@ -1,8 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
android:viewportWidth="201.8771"
android:viewportHeight="218.8104"
android:width="254dp"
android:height="275dp">
android:viewportWidth="403.75"
android:viewportHeight="437.6"
android:width="100dp"
android:height="108dp">
<group android:translateX="100"
android:translateY="115">
<group
android:translateX="-1.41459"
android:translateY="-24.00768">
@ -808,4 +811,5 @@
android:strokeColor="#000000"
android:strokeWidth="1.32292"
android:strokeLineCap="round" />
</group>
</vector>

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,9 @@
<ImageView
android:id="@+id/mascotImage"
android:layout_width="match_parent"
android:layout_width="508dp"
android:layout_marginTop="-130dp"
android:adjustViewBounds="true"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:contentDescription="@string/mascot_description"
@ -30,6 +32,7 @@
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/login_activity_instance_input_layout"
android:layout_width="250dp"
android:layout_marginTop="-130dp"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="@string/domain_of_your_instance"

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/mascot" />

View File

@ -6,9 +6,8 @@
<item name="windowSplashScreenBackground">?android:attr/colorBackground</item>
<!-- Use windowSplashScreenAnimatedIcon to add either a drawable or an
animated drawable. One of these is required. -->
<!-- TODO get rid of duplicated mascot/mascot_small somehow -->
<item name="windowSplashScreenAnimatedIcon">@drawable/mascot_small</item>
animated drawable. One of these is required.-->
<item name="windowSplashScreenAnimatedIcon">@drawable/mascot</item>
<!-- Set the theme of the Activity that directly follows your splash screen. -->
<!-- Required -->

View File

@ -53,7 +53,12 @@
android:targetPackage="@string/application_id"
android:targetClass="org.pixeldroid.common.AboutActivity">
<extra android:name="buildVersion" android:value="@string/versionName" />
<extra android:name="appImage" android:value="@drawable/mascot" />
<extra android:name="appImage" android:value="mascot" />
<extra android:name="appImageWidth" android:value="508" />
<extra android:name="appImageTopMargin" android:value="-130" />
<extra android:name="appImageBottomMargin" android:value="-130" />
<extra android:name="appImageLeftMargin" android:value="0" />
<extra android:name="appImageRightMargin" android:value="0" />
<extra android:name="appName" android:value="@string/app_name" />
<extra android:name="aboutAppDescription" android:value="@string/license_info" />
<extra android:name="website" android:value="@string/project_website" />

View File

@ -0,0 +1 @@
Bug fixes & improvements ;)

@ -1 +1 @@
Subproject commit 037995fc3c9a40c30ab22b199cdc4b7d43ca1976
Subproject commit e143ee98284c7974f468eddd03294fa11b7935f3