Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

iniyanmurugavel/KotlinProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

So what is the reason behind this app launcher icon keepin mipmap instead of drawables

A large number of Android Devices uses a higher resolutionlauncher icons

mipmap-mdpimipmap-hdpimipmap-xhdpimipmap-xxhdpi

This all folder will not remove after publishing in playstorebut drawable will keep only specific varient drawable

What is a layout in android

A layout defines the visual structure for a user interface such as ui for an activity or app widget

All layouts are the subclasses of the viewGroup class and each subclass provides unique way to display the views we nest within it

Linear layout organises its children into single horizontal or vertical row . It creates a scrollbar if the length of the window exceeds the length go the screen

Relative Layout enables us to specify the location of child view relative to each other

Constraint Layout allows positioning Childers to each other and the parent . But also offers other powerful positioning and sizing strategies including horizontal or vertical child “chains” with custom spacing, arbitrary horizontal/vertical “guidelines” and custom child size aspect ratios

FrameLayout blocks out an area on the screen to display a single item

Grid layout displays items in a two dimensional scrollable grid

When we click homeback pressonPauseonStop

And openonRestartonStartonResume

If we click bacokpressonPauseonStoponDestroy

Again recent screen openonCreateonStartonResumeonPauseonStoponDestroy

Another again comes backonRestart will callonStart callonResume()

Three types of compiler

  1. Kt to java byte code operation
  2. D8 making Dex file support
  3. R8 is shrinking code

Local Development

Here are some useful Gradle/adb commands for executing this example:

  • ./gradlew clean build - Build the entire example and execute unit and integration tests plus lint check.
  • ./gradlew installDebug - Install the debug apk on the current connected device.
  • ./gradlew runUnitTests - Execute domain and data layer tests (both unit and integration).
  • ./gradlew runAcceptanceTests - Execute espresso and instrumentation acceptance tests.

Keyboard ShortCut

shift + ctrl + left and right to select allmove left and right

shift + ctrl longpress keydown up for returnctrl + A + backspace - to clear all

shift + ctrl + F = find string and other filedouble space - to filei n project levelcommand + E - Recent changesCtrl + shift + R

Gradle commands

./gradlew app:dependencies./gradlew yourmodule:dependencies > dependency.txt

./gradlew testDebugUnitTest

./gradlew assembleRelease --stacktrace

Useful Code

Handler(Looper.getMainLooper()).post(Runnable {logError(tag, "running 1 ${Thread.currentThread().name}")

})

CoroutineScope(Dispatchers.IO).launch {logError(tag = tag, "IntentService")}

https://stackoverflow.com/questions/60672406/how-to-use-coroutine-in-kotlin-to-call-a-function-every-second

// Repeat a function in coroutines

fun repeatFun(): Job {return coroutineScope.launch {
while(isActive) {//do your network request heredelay(1000)}}}

//start the loopval repeatFun = repeatRequest()

//Cancel the looprepeatFun.cancel()

Adb install command

—————————————————wgethttps://dl.google.com/android/repository/platform-tools-latest-darwin.zip

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp