Questions tagged [anko]

Anko is a deprecated JetBrains library for Android application development

Anko is JetBrains library for Android application development (wrapper for Android SDK for Java), written in .

It was deprecated on the 1st of December 2019 and its use is no longer recommended.

258 questions
0
votes
1 answer

Variable is declared as var but compiler is saying it val

Compiler is giving me the error Error:(97, 17) Val cannot be reassigned but the variable is declared as var. Edit: You can see comments in my code. When i assign rcv = recyclerView and chkStrictSearch = checkBox I get red underline here with above…
Rahul
  • 675
  • 6
  • 18
0
votes
2 answers

How to use call wrappers for Intent Anko?

I am learning Anko commons and in that, I see Intent for easy to write code to startActivity. It's working. But in that I see Anko has call wrappers for some widely used Intents: Goal Solution ------------ …
Patel Pinkal
  • 8,984
  • 4
  • 28
  • 50
0
votes
1 answer

Trouble setting an image for a Kotlin/Anko DSL defined ImageView

I'm trying to use Kotlin and Anko's DSL to create an alert dialog that lets a user pick an image, and then loads it into an ImageView. Right now I'm just trying go get the ImageView to work, so I have the button click to load a preselected image…
Parker
  • 8,539
  • 10
  • 69
  • 98
0
votes
2 answers

How to make universal AppBar with Anko DSL?

I'm trying to make a toolbar that I can insert into other Anko components. Here is an example of what I am going for: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { …
Phito
  • 1,195
  • 3
  • 10
  • 20
0
votes
1 answer

Anko plugin can not run in Androidstudio version > 2.1

I just want to learn kotlin,But when I download the anko plugin and restart my Android studio,I found that I can not open my project, I found that Android studio which has version > 2.1 can not run anko, and I also don not want to download a…
Andy
  • 3
  • 2
0
votes
1 answer

Anko + Content Provider, Doesn't update data on change

I had this weird issue where I used Anko and Android's content provider together, I implemented my fragment using LoaderCallbacks and at the first time data got loaded and my fun onLoadFinished(loader: Loader?, data: Cursor?) {} got…
Rez
  • 4,501
  • 1
  • 30
  • 27
0
votes
0 answers

Anko - alternative to hide one view and show another

Should I just initialise and keep both, and set visibility to VISIBLE or GONE depending on the state? Is there a better method? What about memory issues? I would like to have a RecyclerView and a WebView alternately. I want to avoid Fragments - I…
Antek
  • 721
  • 1
  • 4
  • 27
0
votes
1 answer

Using Anko getting type Mismatch error required AnkoContext Found AnkoContext

I am using Anko in a basic Android app where I am implementing recyclerView. In the onCreateViewHolder() method I am getting a compile time error saying type Mismatch. Everything else is fine in the below code. class ListAdapter(val arrayList:…
Ankul Jain
  • 35
  • 1
  • 9
0
votes
1 answer

Bug - Unnable to change supportActionBar title

I'm trying to change supportActionBar title from a method called from a network callback. Even though I call it from inside Main Thread, title doesn't change! If I try in any other method it does. My layout: …
E. Fernandes
  • 3,889
  • 4
  • 30
  • 48
0
votes
1 answer

Android Spinner not responding to clicks, does not close and OnItemSelectedListener does not fire off

I am developing an app in Kotlin (if you don't know about kotlin I am sure you can still help with your Android/Java experience) Details: I have a Spinner in there my app.Though it is not responding to clicks once it pops up and even shows some…
Joe Sovcik
  • 378
  • 1
  • 2
  • 11
0
votes
1 answer

Context issue when using Anko DSL within customized adapter for ListView

I am trying to write a general-purpose adapter for ListView which allows using Anko DSL as the content of items. The code is listed below. As you can see, there is an ugly patch with(viewGroup!!.context) to make the code work. It doesn't like other…
Gary Lee
  • 359
  • 3
  • 4
-1
votes
1 answer

android - how to observe viewmodel in ankocomponent

i want to use viewmodelproviders in anko component i studied viewmodel documentation on google developer guide but this particular use case is not documented class BroadcastCalendarFragment: Fragment() { lateinit var mBroadcastModel:…
-1
votes
1 answer

Android - Onclick View with button and text

I have a custom button that I build using anko DSL: fun customButton(label: String): View { return UI { verticalLayout { button { id = BTN_SERVICE_ITEM_ID }.lparams(dip(64), dip(64)) …
rahmatfajar15
  • 29
  • 1
  • 8
-1
votes
2 answers

Get Database Row with Anko

I have a Kolin Android Application with a Database. I use the Anko library for the Database Communication. I can insert Data in my Database but I have some troubles when I try to get a data row from my Database. I try to get the Data Row through…
juli0n_
  • 81
  • 2
  • 7
-2
votes
1 answer

Failed to resolve: org.jetbrains.anko:anko:1.10.5

i have add $anko_version in build.gradle(project) and the add dependencies in build.gradle(app) but Failed when i try to sync. I just implemented, and it works implementation "org.jetbrains.anko:anko:0.10.5"
jiadmiftx
  • 11
  • 1
  • 5
1 2 3
17
18