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
<!--- Provide a general summary of your changes in the Title above --> | |
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning --> | |
## Description | |
<!--- Describe your changes in detail --> | |
## Motivation and Context | |
<!--- Why is this change required? What problem does it solve? --> |
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
override fun onCreate(savedInstanceState: Bundle?) | |
{ | |
super.onCreate(savedInstanceState) | |
verticalLayout { | |
padding = dip(30) | |
editText { | |
hint = "Name" | |
textSize = 24f |
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
import kotlinx.android.synthetic.main.search_fragment.* | |
class SearchFragment : Fragment(), View.OnClickListener | |
{ | |
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View | |
{ | |
return inflater.inflate(R.layout.search_fragment, container, false) | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Button | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/validate" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:text="@string/validate" | |
/> |
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
if(compassView is ImageView) | |
{ | |
compassView.scaleType = ImageView.ScaleType.CENTER_INSIDE | |
} |
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
open class CompassActivity : AppCompatActivity() | |
{ | |
protected open fun onBroadcastReceiver(context: Context, intent: Intent) | |
{ | |
//... | |
} | |
} |
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
val calendar = Calendar.getInstance() //final Calendar calendar = Calendar.getInstance() | |
var calendar = Calendar.getInstance() //Calendar calendar = Calendar.getInstance() |
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
fun myFunction(a: Int) | |
{ | |
//... | |
} | |
{ | |
val a: Int? = null | |
//… | |
myFunction(a!!) | |
} |
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
fun myFunction(a: Int) | |
{ | |
//... | |
} | |
{ | |
val a: Int? = null | |
//… | |
myFunction(a) | |
} |
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
val length = array?.size ?: -1 |
NewerOlder