grishka / appkit Goto Github PK
View Code? Open in Web Editor NEWAndroid app boilerplate + image loader
Android app boilerplate + image loader
Kotlin is the First-class language for Android now. :)
Here we have the following screenshot, which showcases this piece of code:
public static void insetPopupMenuIcon(MenuItem item, ColorStateList iconTint, int addWidth) {
Drawable icon=item.getIcon().mutate();
if(Build.VERSION.SDK_INT>=26) item.setIconTintList(iconTint);
else icon.setTintList(iconTint);
int pad=V.dp(8);
boolean rtl=icon.getLayoutDirection()==View.LAYOUT_DIRECTION_RTL;
icon=new InsetDrawable(icon, rtl ? pad+addWidth : pad, 0, rtl ? pad : addWidth+pad, 0);
item.setIcon(icon);
SpannableStringBuilder ssb = new SpannableStringBuilder(item.getTitle());
item.setTitle(ssb);
}
And this one showcases the same piece of code, but without the InsetDrawable:
public static void insetPopupMenuIcon(MenuItem item, ColorStateList iconTint, int addWidth) {
Drawable icon=item.getIcon().mutate();
if(Build.VERSION.SDK_INT>=26) item.setIconTintList(iconTint);
else icon.setTintList(iconTint);
int pad=V.dp(8);
boolean rtl=icon.getLayoutDirection()==View.LAYOUT_DIRECTION_RTL;
// icon=new InsetDrawable(icon, rtl ? pad+addWidth : pad, 0, rtl ? pad : addWidth+pad, 0);
item.setIcon(icon);
SpannableStringBuilder ssb = new SpannableStringBuilder(item.getTitle());
item.setTitle(ssb);
}
And here is the same code as the first piece, but instead being on an earlier build of Android 14:
It would be nice if you provide any kind of documentation to read. :)
https://github.com/mastodon/mastodon-android/blob/master/mastodon/build.gradle
Mastodon use the version of 1.2.7 , but the latest version in maven is 1.2.6
https://search.maven.org/search?q=g:me.grishka.appkit
vHow do I get a telegram code or do I enter without a code?
Everytime an animation lags I get the '"Unable to match desired swap behavior" log entry. It started happening after upgrading to appkit 1.2.10 (1.2.9 didn't have the issue), and I am still unable to debug the weird animation hiccups that usually happen in the ripple animations. Do you have any clue as for where this issue might be originating, considering that the Mastodon app doesn't have it?
Thank you!
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean androidx.recyclerview.widget.RecyclerView$ViewHolder.shouldIgnore()' on a null object reference
at androidx.recyclerview.widget.RecyclerView.findMinMaxChildLayoutPositions(RecyclerView.java:4476)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4206)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4001)
at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1991)
at androidx.recyclerview.widget.RecyclerView.focusSearch(RecyclerView.java:2922)
at android.view.ViewGroup.focusSearch(ViewGroup.java:1080)
at android.view.ViewGroup.focusSearch(ViewGroup.java:1080)
at android.view.ViewGroup.focusSearch(ViewGroup.java:1080)
at android.view.View.focusSearch(View.java:13286)
at android.widget.TextView.hasEditorInFocusSearchDirection(TextView.java:8996)
at android.widget.TextView.onCreateInputConnection(TextView.java:9016)
at android.view.inputmethod.InputMethodManager.startInputInner(InputMethodManager.java:2308)
at android.view.inputmethod.InputMethodManager$DelegateImpl.startInput(InputMethodManager.java:666)
at android.view.ImeFocusController.checkFocus(ImeFocusController.java:167)
at android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.java:2507)
at android.view.inputmethod.InputMethodManager.showSoftInput(InputMethodManager.java:1869)
at android.view.inputmethod.InputMethodManager.showSoftInput(InputMethodManager.java:1856)
at android.view.inputmethod.InputMethodManager.showSoftInput(InputMethodManager.java:1794)
at org.joinmastodon.android.fragments.discover.SearchQueryFragment.onShown(SearchQueryFragment.java:283)
at me.grishka.appkit.fragments.AppKitFragment.onResume(AppKitFragment.java:546)
at android.app.Fragment.performResume(Fragment.java:2551)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1346)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642)
at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2220)
org...stodon.android.moshinda.debug E at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
at android.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:822)
at me.grishka.appkit.FragmentStackActivity.showFragment(FragmentStackActivity.java:122)
at me.grishka.appkit.Nav.goForResult(Nav.java:57)
I haven't gotten this working without using a sketchy workaround on the app side. Therefore I believe its better for the changing of the empty view color at the appkit side.
Request for Lamda support.
The code without lambdas looks untidy and bulky.
Problem: can't build mastodon-android out of the box because it now depends on appkit 1.2.16
. Latest available in public maven repos is 1.2
.
Issue has a workaround:
signing
in maven-push.gradle
./gradlew publishToMavenLocal
But for ease of building mastodon-android, please publish the 1.2.16 appkit version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.