<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: UberGamz</title>
    <description>The latest articles on DEV Community by UberGamz (@ubergamz).</description>
    <link>https://dev.to/ubergamz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F820235%2Fb6bdbdcd-0575-4d69-91da-9c582bec1940.png</url>
      <title>DEV Community: UberGamz</title>
      <link>https://dev.to/ubergamz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ubergamz"/>
    <language>en</language>
    <item>
      <title>Kotlin Functions</title>
      <dc:creator>UberGamz</dc:creator>
      <pubDate>Thu, 24 Feb 2022 19:44:47 +0000</pubDate>
      <link>https://dev.to/ubergamz/kotlin-functions-l5l</link>
      <guid>https://dev.to/ubergamz/kotlin-functions-l5l</guid>
      <description>&lt;p&gt;Kotlin Functions&lt;br&gt;
Kotlin functions are very easy if you understand all the pieces. Looking up instructions give some very complicated explanations. Without having experience or knowledge of the various pieces of code Kotlin has, it is nearly impossible to translate.&lt;br&gt;
Starting as basic as it gets, here is an example.&lt;br&gt;
fun add (n, i){return n+ i}&lt;br&gt;
First we have the "fun" code. All lowercase and this never changes, it's required to signify to the compiler that the following pieces are a function.&lt;br&gt;
"add" is the function name. This can be whatever you want it to be, but try to keep it appropriate so you can remember what it does.&lt;br&gt;
(n, i) are each also made up. They are basically place holders for when you ask the function to be completed. If we sent a "1" and a "2" to the function, it would actually read (1,2). You separate your values, as many as you need, by a comma. &lt;br&gt;
{return n + i} is the actual operation. It will take the user input you have, and calculate.&lt;br&gt;
Later you can add more to the code, like types or more inputs or even more calculations.&lt;br&gt;
To send information to the function, you can call it up by the function name and a parenthesis around your input.&lt;br&gt;
add(1,2)&lt;/p&gt;

</description>
      <category>kotlin</category>
      <category>programming</category>
      <category>function</category>
    </item>
    <item>
      <title>Freshly Learned Kotlin Techniques</title>
      <dc:creator>UberGamz</dc:creator>
      <pubDate>Tue, 22 Feb 2022 23:25:14 +0000</pubDate>
      <link>https://dev.to/ubergamz/freshly-learned-kotlin-techniques-omf</link>
      <guid>https://dev.to/ubergamz/freshly-learned-kotlin-techniques-omf</guid>
      <description>&lt;p&gt;Recently, the get/set methods have been making more sense.&lt;/p&gt;

&lt;p&gt;In Android Studio, in the XML pages (activity) you can create an object. Once you give it a name, you can start some code in the .kt side&lt;/p&gt;

&lt;p&gt;Like all variables before you change them, objects too have to be defined.&lt;/p&gt;

&lt;p&gt;[val or var] [name of string you want to create] : [type of object] = findViewById (R.id.[the id name you created in the XML page])&lt;/p&gt;

&lt;p&gt;Once you call it, you can set it.&lt;/p&gt;

&lt;p&gt;[string name you created].[type of input you are going to change] = [value]&lt;/p&gt;

&lt;p&gt;Example below for the most used type, TextView&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val strengthText: TextView = findViewById(R.id.strengthText)
strengthText.text = "Strength"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are other types and methods, but they all follow the same pattern. I’ll leave an example of how to change a picture.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;val carPicture = findViewById&amp;lt;ImageView&amp;gt;(R.id.carPicture)
carPicture.setImageResource(R.drawable.car_one_detail)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>kotlin</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
