Thursday 12 November 2020

How to shorten imports in Android Studio for cleaner code

Is there an easy shortcut in Android Studio to refactor this:

@GET(WSConstants.ENDPOINT_SINGLE_ACCOUNT)
suspend fun getAccount(@Path(WSConstants.PARAM_ACCOUNT_ID) accountId: String?): Call<Account>

to:

@GET(ENDPOINT_SINGLE_ACCOUNT)
suspend fun getAccount(@Path(PARAM_ACCOUNT_ID) accountId: String?): Call<Account>

And secondly, is it considered good practice? I think it looks cleaner.



from How to shorten imports in Android Studio for cleaner code

No comments:

Post a Comment