-
Notifications
You must be signed in to change notification settings - Fork 8
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
14 changed files
with
75 additions
and
40 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
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
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
48 changes: 48 additions & 0 deletions
48
app/src/main/java/com/arcao/geocaching4locus/settings/widget/PoweredByPreference.kt
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,48 @@ | ||
package com.arcao.geocaching4locus.settings.widget | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.ViewGroup | ||
import android.widget.ImageView | ||
import android.widget.TextView | ||
import androidx.core.content.res.TypedArrayUtils | ||
import androidx.core.view.doOnLayout | ||
import androidx.core.view.updateLayoutParams | ||
import androidx.preference.Preference | ||
import androidx.preference.PreferenceViewHolder | ||
import androidx.preference.R | ||
|
||
class PoweredByPreference @JvmOverloads constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = TypedArrayUtils.getAttr( | ||
context, | ||
R.attr.preferenceStyle, | ||
android.R.attr.preferenceStyle | ||
) | ||
) : Preference(context, attrs, defStyleAttr) { | ||
init { | ||
widgetLayoutResource = com.arcao.geocaching4locus.R.layout.preference_powered_by_widget | ||
} | ||
|
||
override fun onBindViewHolder(holder: PreferenceViewHolder) { | ||
super.onBindViewHolder(holder) | ||
|
||
(holder.findViewById(android.R.id.icon) as? ImageView)?.let { imageView -> | ||
imageView.maxWidth = Integer.MAX_VALUE | ||
imageView.maxHeight = Integer.MAX_VALUE | ||
} | ||
|
||
(holder.findViewById(android.R.id.summary) as? TextView)?.let { textView -> | ||
textView.maxHeight = Integer.MAX_VALUE | ||
} | ||
|
||
holder.findViewById(android.R.id.title)?.let { view -> | ||
view.doOnLayout { | ||
holder.findViewById(android.R.id.widget_frame)?.updateLayoutParams<ViewGroup.MarginLayoutParams> { | ||
topMargin = view.height | ||
} | ||
} | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
app/src/main/java/com/arcao/geocaching4locus/settings/widget/UnlimitedIconSizePreference.kt
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-42.1 KB
(6.6%)
app/src/main/res/drawable-xhdpi/ic_authorized_developer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-63.6 KB
(6.4%)
app/src/main/res/drawable-xxhdpi/ic_authorized_developer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-84.7 KB
(6.6%)
app/src/main/res/drawable-xxxhdpi/ic_authorized_developer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent"> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="top|center_horizontal" | ||
android:layout_marginTop="16dp" | ||
android:contentDescription="@null" | ||
android:src="@drawable/ic_authorized_developer" /> | ||
</FrameLayout> |
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