androidd 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- androidd/__init__.py +1 -0
- androidd/cie1/activityCycle/MainActivity.kt +44 -0
- androidd/cie1/activityCycle/activity_main.xml +15 -0
- androidd/cie1/alert/MainActivity.kt +28 -0
- androidd/cie1/alert/activity_main.xml +14 -0
- androidd/cie1/autoCompleteText/MainActivity.kt +19 -0
- androidd/cie1/autoCompleteText/activity_main.xml +14 -0
- androidd/cie1/checkbox/MainActivity.kt +28 -0
- androidd/cie1/checkbox/activity_main.xml +32 -0
- androidd/cie1/customCheckbox/MainActivity.kt +20 -0
- androidd/cie1/customCheckbox/activity_main.xml +22 -0
- androidd/cie1/customCheckbox/custom_checkbox.xml +9 -0
- androidd/cie1/customRadio/MainActivity.kt +22 -0
- androidd/cie1/customRadio/activity_main.xml +28 -0
- androidd/cie1/customRadio/custom_checkbox.xml +9 -0
- androidd/cie1/customToast/MainActivity.kt +35 -0
- androidd/cie1/customToast/activity_main.xml +14 -0
- androidd/cie1/customToast/custom_toast.xml +23 -0
- androidd/cie1/datepicker/MainActivity.kt +31 -0
- androidd/cie1/datepicker/activity_main.xml +20 -0
- androidd/cie1/progressbar/MainActivity.kt +26 -0
- androidd/cie1/progressbar/activity_main.xml +21 -0
- androidd/cie1/ques1/MainActivity.kt +37 -0
- androidd/cie1/ques1/activity_main.xml +41 -0
- androidd/cie1/ques2/MainActivity.kt +41 -0
- androidd/cie1/ques2/activity_main.xml +66 -0
- androidd/cie1/ques3/AndroidManifest.xml +3 -0
- androidd/cie1/ques3/MainActivity.kt +29 -0
- androidd/cie1/ques3/activity_main.xml +30 -0
- androidd/cie1/radiobutton/MainActivity.kt +25 -0
- androidd/cie1/radiobutton/activity_main.xml +38 -0
- androidd/cie1/timePicker/MainActivity.kt +30 -0
- androidd/cie1/timePicker/activity_main.xml +20 -0
- androidd/cie1/toast/MainActivity.kt +18 -0
- androidd/cie1/toast/activity_main.xml +14 -0
- androidd/cie1/toggle/MainActivity.kt +20 -0
- androidd/cie1/toggle/activity_main.xml +23 -0
- androidd/madbmsj/IMPLICIT and EXPLICIT/Main Activity.kt +31 -0
- androidd/madbmsj/IMPLICIT and EXPLICIT/activity_main.xml +33 -0
- androidd/madbmsj/IMPLICIT and EXPLICIT/second.xml +16 -0
- androidd/madbmsj/IMPLICIT and EXPLICIT/secondactivity.kt +15 -0
- androidd/madbmsj/animation/MainActivity.kt +60 -0
- androidd/madbmsj/animation/activity_main.xml +122 -0
- androidd/madbmsj/animation/bounce.xml +17 -0
- androidd/madbmsj/animation/fad_in.xml +7 -0
- androidd/madbmsj/animation/fade_out.xml +8 -0
- androidd/madbmsj/animation/info.txt +2 -0
- androidd/madbmsj/animation/slide_down.xml +7 -0
- androidd/madbmsj/animation/slide_up.xml +7 -0
- androidd/madbmsj/animation/zoom_in.xml +11 -0
- androidd/madbmsj/animation/zoom_out.xml +11 -0
- androidd/madbmsj/canvas/MainActivity.kt +51 -0
- androidd/madbmsj/canvas/activity_main.xml +18 -0
- androidd/madbmsj/cie1/code.txt +719 -0
- androidd/madbmsj/cie1/sampleQuestion.txt +280 -0
- androidd/madbmsj/cie2/code.txt +1255 -0
- androidd/madbmsj/cie2/ques1/AndroidManifest.xml +2 -0
- androidd/madbmsj/cie2/ques1/MainActivity.kt +45 -0
- androidd/madbmsj/cie2/ques1/SecondActivity.kt +21 -0
- androidd/madbmsj/cie2/ques1/activity_main.xml +19 -0
- androidd/madbmsj/cie2/ques1/activity_second.xml +15 -0
- androidd/madbmsj/cie2/ques1/department_menu.xml +11 -0
- androidd/madbmsj/contextMenu/MainActivity.kt +37 -0
- androidd/madbmsj/contextMenu/activity_main.xml +19 -0
- androidd/madbmsj/contextMenu/info.txt +1 -0
- androidd/madbmsj/contextMenu/menu_main.xml +16 -0
- androidd/madbmsj/database/DatabaseHelper.kt +108 -0
- androidd/madbmsj/database/MainActivity.kt +151 -0
- androidd/madbmsj/database/activity_main.xml +55 -0
- androidd/madbmsj/database/dialog_update_student.xml +22 -0
- androidd/madbmsj/database/info.txt +4 -0
- androidd/madbmsj/datePicker/MainActivity.kt +23 -0
- androidd/madbmsj/datePicker/activity_main.xml +20 -0
- androidd/madbmsj/explicit/activity_main.xml +39 -0
- androidd/madbmsj/explicit/activity_second.xml +15 -0
- androidd/madbmsj/explicit/info.txt +6 -0
- androidd/madbmsj/explicit/mainactivity.kt +32 -0
- androidd/madbmsj/explicit/secondactivity.kt +27 -0
- androidd/madbmsj/fragment/MainActivity.kt +35 -0
- androidd/madbmsj/fragment/activity_main.xml +41 -0
- androidd/madbmsj/fragment/fragment_1.kt +24 -0
- androidd/madbmsj/fragment/fragment_1.xml +16 -0
- androidd/madbmsj/fragment/fragment_2.kt +17 -0
- androidd/madbmsj/fragment/fragnent_2.xml +16 -0
- androidd/madbmsj/fragment/info.txt +1 -0
- androidd/madbmsj/optionsMenu/MainActivity.kt +26 -0
- androidd/madbmsj/optionsMenu/activity_main.xml +18 -0
- androidd/madbmsj/optionsMenu/info.txt +1 -0
- androidd/madbmsj/optionsMenu/menu_main.xml +27 -0
- androidd/madbmsj/package.json +13 -0
- androidd/madbmsj/popMenu/MainActivity.kt +49 -0
- androidd/madbmsj/popMenu/activity_main.xml +19 -0
- androidd/madbmsj/popMenu/info.txt +1 -0
- androidd/madbmsj/popMenu/menu_main.xml +16 -0
- androidd/madbmsj/sharedpref/byJ/MainActivity.kt +34 -0
- androidd/madbmsj/sharedpref/byJ/activity_main.xml +28 -0
- androidd/madbmsj/sharedpref/shared1/activity_main.xml +64 -0
- androidd/madbmsj/sharedpref/shared1/mainactivity.kt +47 -0
- androidd/madbmsj/sharedpref/shared2/activity_main.xml +44 -0
- androidd/madbmsj/sharedpref/shared2/mainactivity.kt +57 -0
- androidd/madbmsj/spinner/MainActivity.kt +30 -0
- androidd/madbmsj/spinner/activity_main.xml +13 -0
- {androidd-0.0.1.dist-info → androidd-0.0.3.dist-info}/METADATA +1 -1
- androidd-0.0.3.dist-info/RECORD +106 -0
- androidd-0.0.3.dist-info/top_level.txt +1 -0
- androidd-0.0.1.dist-info/RECORD +0 -4
- androidd-0.0.1.dist-info/top_level.txt +0 -1
- {androidd-0.0.1.dist-info → androidd-0.0.3.dist-info}/WHEEL +0 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:layout_width="match_parent"
|
4
|
+
android:layout_height="wrap_content"
|
5
|
+
android:orientation="vertical"
|
6
|
+
android:padding="16dp">
|
7
|
+
|
8
|
+
<EditText
|
9
|
+
android:id="@+id/num1"
|
10
|
+
android:hint="Enter first number"
|
11
|
+
android:inputType="numberDecimal"
|
12
|
+
android:layout_width="match_parent"
|
13
|
+
android:layout_height="wrap_content" />
|
14
|
+
|
15
|
+
<EditText
|
16
|
+
android:id="@+id/num2"
|
17
|
+
android:hint="Enter second number"
|
18
|
+
android:inputType="numberDecimal"
|
19
|
+
android:layout_width="match_parent"
|
20
|
+
android:layout_height="wrap_content" />
|
21
|
+
|
22
|
+
<LinearLayout
|
23
|
+
android:layout_width="match_parent"
|
24
|
+
android:layout_height="wrap_content"
|
25
|
+
android:orientation="horizontal"
|
26
|
+
android:gravity="center"
|
27
|
+
android:layout_marginTop="16dp">
|
28
|
+
|
29
|
+
<Button
|
30
|
+
android:id="@+id/btnAdd"
|
31
|
+
android:text="+"
|
32
|
+
android:onClick="calculate"
|
33
|
+
android:layout_width="wrap_content"
|
34
|
+
android:layout_height="wrap_content" />
|
35
|
+
|
36
|
+
<Button
|
37
|
+
android:id="@+id/btnSub"
|
38
|
+
android:text="-"
|
39
|
+
android:onClick="calculate"
|
40
|
+
android:layout_width="wrap_content"
|
41
|
+
android:layout_height="wrap_content" />
|
42
|
+
|
43
|
+
<Button
|
44
|
+
android:id="@+id/btnMul"
|
45
|
+
android:text="*"
|
46
|
+
android:onClick="calculate"
|
47
|
+
android:layout_width="wrap_content"
|
48
|
+
android:layout_height="wrap_content" />
|
49
|
+
|
50
|
+
<Button
|
51
|
+
android:id="@+id/btnDiv"
|
52
|
+
android:text="/"
|
53
|
+
android:onClick="calculate"
|
54
|
+
android:layout_width="wrap_content"
|
55
|
+
android:layout_height="wrap_content" />
|
56
|
+
</LinearLayout>
|
57
|
+
|
58
|
+
<TextView
|
59
|
+
android:id="@+id/tvResult"
|
60
|
+
android:text="Result:"
|
61
|
+
android:textSize="20sp"
|
62
|
+
android:textColor="#008000"
|
63
|
+
android:layout_marginTop="20dp"
|
64
|
+
android:layout_width="wrap_content"
|
65
|
+
android:layout_height="wrap_content" />
|
66
|
+
</LinearLayout>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
package com.example.labexam_03
|
2
|
+
|
3
|
+
import android.os.Bundle
|
4
|
+
import android.support.v7.app.AppCompatActivity
|
5
|
+
import android.widget.Button
|
6
|
+
import android.widget.TextView
|
7
|
+
import android.widget.Toast
|
8
|
+
|
9
|
+
class MainActivity : AppCompatActivity() {
|
10
|
+
private var count = 0
|
11
|
+
|
12
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
13
|
+
super.onCreate(savedInstanceState)
|
14
|
+
setContentView(R.layout.activity_main)
|
15
|
+
|
16
|
+
val tvCounter = findViewById<TextView>(R.id.tvCounter)
|
17
|
+
val btnIncrement = findViewById<Button>(R.id.btnIncrement)
|
18
|
+
val btnToast = findViewById<Button>(R.id.btnToast)
|
19
|
+
|
20
|
+
btnIncrement.setOnClickListener {
|
21
|
+
count++
|
22
|
+
tvCounter.text = count.toString()
|
23
|
+
}
|
24
|
+
|
25
|
+
btnToast.setOnClickListener {
|
26
|
+
Toast.makeText(this, "Hello from Toast!", Toast.LENGTH_SHORT).show()
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:orientation="horizontal"
|
4
|
+
android:layout_width="match_parent"
|
5
|
+
android:layout_height="match_parent"
|
6
|
+
android:gravity="center"
|
7
|
+
android:padding="16dp">
|
8
|
+
|
9
|
+
<TextView
|
10
|
+
android:id="@+id/tvCounter"
|
11
|
+
android:layout_width="wrap_content"
|
12
|
+
android:layout_height="wrap_content"
|
13
|
+
android:text="0"
|
14
|
+
android:textSize="32sp"
|
15
|
+
android:layout_marginEnd="32dp"/>
|
16
|
+
|
17
|
+
<Button
|
18
|
+
android:id="@+id/btnIncrement"
|
19
|
+
android:layout_width="wrap_content"
|
20
|
+
android:layout_height="wrap_content"
|
21
|
+
android:text="Increment"
|
22
|
+
android:layout_marginEnd="16dp"/>
|
23
|
+
|
24
|
+
<Button
|
25
|
+
android:id="@+id/btnToast"
|
26
|
+
android:layout_width="wrap_content"
|
27
|
+
android:layout_height="wrap_content"
|
28
|
+
android:text="Toast"/>
|
29
|
+
|
30
|
+
</LinearLayout>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
package com.example.practice
|
2
|
+
|
3
|
+
import android.os.Bundle
|
4
|
+
import android.support.v7.app.AppCompatActivity
|
5
|
+
import android.widget.*
|
6
|
+
|
7
|
+
class MainActivity : AppCompatActivity() {
|
8
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
9
|
+
super.onCreate(savedInstanceState)
|
10
|
+
setContentView(R.layout.activity_main)
|
11
|
+
|
12
|
+
val radioGroup = findViewById<RadioGroup>(R.id.radioGroup)
|
13
|
+
val btnSubmit = findViewById<Button>(R.id.btnSubmit)
|
14
|
+
|
15
|
+
btnSubmit.setOnClickListener {
|
16
|
+
val selectedId = radioGroup.checkedRadioButtonId
|
17
|
+
if (selectedId != -1) {
|
18
|
+
val radioButton = findViewById<RadioButton>(selectedId)
|
19
|
+
Toast.makeText(this, "Selected: ${radioButton.text}", Toast.LENGTH_SHORT).show()
|
20
|
+
} else {
|
21
|
+
Toast.makeText(this, "Please select a gender", Toast.LENGTH_SHORT).show()
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:orientation="vertical"
|
4
|
+
android:padding="16dp"
|
5
|
+
android:layout_width="match_parent"
|
6
|
+
android:layout_height="match_parent">
|
7
|
+
|
8
|
+
<TextView
|
9
|
+
android:text="Select Gender:"
|
10
|
+
android:textSize="18sp"
|
11
|
+
android:layout_width="wrap_content"
|
12
|
+
android:layout_height="wrap_content" />
|
13
|
+
|
14
|
+
<RadioGroup
|
15
|
+
android:id="@+id/radioGroup"
|
16
|
+
android:layout_width="wrap_content"
|
17
|
+
android:layout_height="wrap_content">
|
18
|
+
|
19
|
+
<RadioButton
|
20
|
+
android:id="@+id/radioMale"
|
21
|
+
android:layout_width="wrap_content"
|
22
|
+
android:layout_height="wrap_content"
|
23
|
+
android:text="Male" />
|
24
|
+
|
25
|
+
<RadioButton
|
26
|
+
android:id="@+id/radioFemale"
|
27
|
+
android:layout_width="wrap_content"
|
28
|
+
android:layout_height="wrap_content"
|
29
|
+
android:text="Female" />
|
30
|
+
</RadioGroup>
|
31
|
+
|
32
|
+
<Button
|
33
|
+
android:id="@+id/btnSubmit"
|
34
|
+
android:layout_width="wrap_content"
|
35
|
+
android:layout_height="wrap_content"
|
36
|
+
android:text="Submit"
|
37
|
+
android:layout_marginTop="16dp"/>
|
38
|
+
</LinearLayout>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
package com.example.practice
|
2
|
+
|
3
|
+
import android.app.TimePickerDialog
|
4
|
+
import android.os.Bundle
|
5
|
+
import android.support.v7.app.AppCompatActivity
|
6
|
+
import android.widget.Button
|
7
|
+
import android.widget.TextView
|
8
|
+
import java.util.*
|
9
|
+
|
10
|
+
class MainActivity : AppCompatActivity() {
|
11
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
12
|
+
super.onCreate(savedInstanceState)
|
13
|
+
setContentView(R.layout.activity_main)
|
14
|
+
|
15
|
+
val btnPickTime = findViewById<Button>(R.id.btnPickTime)
|
16
|
+
val tvSelectedTime = findViewById<TextView>(R.id.tvSelectedTime)
|
17
|
+
|
18
|
+
btnPickTime.setOnClickListener {
|
19
|
+
val calendar = Calendar.getInstance()
|
20
|
+
val hour = calendar.get(Calendar.HOUR_OF_DAY)
|
21
|
+
val minute = calendar.get(Calendar.MINUTE)
|
22
|
+
|
23
|
+
val timePicker = TimePickerDialog(this, { _, h, m ->
|
24
|
+
tvSelectedTime.text = "Selected Time: $h:$m"
|
25
|
+
}, hour, minute, true)
|
26
|
+
|
27
|
+
timePicker.show()
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:layout_width="match_parent"
|
4
|
+
android:layout_height="match_parent"
|
5
|
+
android:orientation="vertical"
|
6
|
+
android:padding="16dp">
|
7
|
+
|
8
|
+
<Button
|
9
|
+
android:id="@+id/btnPickTime"
|
10
|
+
android:layout_width="wrap_content"
|
11
|
+
android:layout_height="wrap_content"
|
12
|
+
android:text="Pick Time" />
|
13
|
+
|
14
|
+
<TextView
|
15
|
+
android:id="@+id/tvSelectedTime"
|
16
|
+
android:layout_width="wrap_content"
|
17
|
+
android:layout_height="wrap_content"
|
18
|
+
android:paddingTop="16dp"
|
19
|
+
android:text="Selected Time will appear here" />
|
20
|
+
</LinearLayout>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
package com.example.practice
|
2
|
+
|
3
|
+
import android.os.Bundle
|
4
|
+
import android.support.v7.app.AppCompatActivity
|
5
|
+
import android.widget.Button
|
6
|
+
import android.widget.Toast
|
7
|
+
|
8
|
+
class MainActivity : AppCompatActivity() {
|
9
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
10
|
+
super.onCreate(savedInstanceState)
|
11
|
+
setContentView(R.layout.activity_main)
|
12
|
+
|
13
|
+
val btnToast = findViewById<Button>(R.id.btnToast)
|
14
|
+
btnToast.setOnClickListener {
|
15
|
+
Toast.makeText(this, "Hello from Toast!", Toast.LENGTH_SHORT).show()
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:layout_width="match_parent"
|
4
|
+
android:layout_height="match_parent"
|
5
|
+
android:orientation="vertical"
|
6
|
+
android:gravity="center"
|
7
|
+
android:padding="16dp">
|
8
|
+
|
9
|
+
<Button
|
10
|
+
android:id="@+id/btnToast"
|
11
|
+
android:layout_width="wrap_content"
|
12
|
+
android:layout_height="wrap_content"
|
13
|
+
android:text="Show Toast" />
|
14
|
+
</LinearLayout>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
package com.example.practice
|
2
|
+
|
3
|
+
import android.os.Bundle
|
4
|
+
import android.support.v7.app.AppCompatActivity
|
5
|
+
import android.widget.TextView
|
6
|
+
import android.widget.ToggleButton
|
7
|
+
|
8
|
+
class MainActivity : AppCompatActivity() {
|
9
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
10
|
+
super.onCreate(savedInstanceState)
|
11
|
+
setContentView(R.layout.activity_main)
|
12
|
+
|
13
|
+
val toggleButton = findViewById<ToggleButton>(R.id.toggleButton)
|
14
|
+
val tvStatus = findViewById<TextView>(R.id.tvStatus)
|
15
|
+
|
16
|
+
toggleButton.setOnCheckedChangeListener { _, isChecked ->
|
17
|
+
tvStatus.text = if (isChecked) "Status: ON" else "Status: OFF"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
android:layout_width="match_parent"
|
4
|
+
android:layout_height="match_parent"
|
5
|
+
android:orientation="vertical"
|
6
|
+
android:gravity="center"
|
7
|
+
android:padding="24dp">
|
8
|
+
|
9
|
+
<ToggleButton
|
10
|
+
android:id="@+id/toggleButton"
|
11
|
+
android:layout_width="wrap_content"
|
12
|
+
android:layout_height="wrap_content"
|
13
|
+
android:textOn="ON"
|
14
|
+
android:textOff="OFF" />
|
15
|
+
|
16
|
+
<TextView
|
17
|
+
android:id="@+id/tvStatus"
|
18
|
+
android:layout_width="wrap_content"
|
19
|
+
android:layout_height="wrap_content"
|
20
|
+
android:text="Status: OFF"
|
21
|
+
android:layout_marginTop="20dp"
|
22
|
+
android:textSize="18sp"/>
|
23
|
+
</LinearLayout>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
package com.example.implicit
|
2
|
+
|
3
|
+
import android.content.Intent
|
4
|
+
import android.net.Uri
|
5
|
+
import android.os.Bundle
|
6
|
+
import android.support.v7.app.AppCompatActivity
|
7
|
+
import android.widget.Button
|
8
|
+
import android.widget.Toast
|
9
|
+
|
10
|
+
class MainActivity : AppCompatActivity() {
|
11
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
12
|
+
super.onCreate(savedInstanceState)
|
13
|
+
setContentView(R.layout.activity_main)
|
14
|
+
|
15
|
+
// Explicit Intent
|
16
|
+
val explicitButton = findViewById<Button>(R.id.ExplicitButton)
|
17
|
+
explicitButton.setOnClickListener {
|
18
|
+
Toast.makeText(this, "Explicit Intent", Toast.LENGTH_SHORT).show()
|
19
|
+
val explicitIntent = Intent(this, secondactivity::class.java)
|
20
|
+
startActivity(explicitIntent)
|
21
|
+
}
|
22
|
+
|
23
|
+
// Implicit Intent
|
24
|
+
val url = "https://www.google.com"
|
25
|
+
val ib = findViewById<Button>(R.id.B1)
|
26
|
+
ib.setOnClickListener {
|
27
|
+
val implicitIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
28
|
+
startActivity(implicitIntent)
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
5
|
+
android:layout_width="match_parent"
|
6
|
+
android:layout_height="match_parent"
|
7
|
+
tools:context=".MainActivity">
|
8
|
+
|
9
|
+
<Button
|
10
|
+
android:id="@+id/ExplicitButton"
|
11
|
+
android:layout_width="wrap_content"
|
12
|
+
android:layout_height="wrap_content"
|
13
|
+
android:layout_marginVertical="400dp"
|
14
|
+
android:layout_marginTop="88dp"
|
15
|
+
android:text="Explicit Intents"
|
16
|
+
android:textAllCaps="true"
|
17
|
+
app:layout_constraintEnd_toEndOf="parent"
|
18
|
+
app:layout_constraintHorizontal_bias="0.455"
|
19
|
+
app:layout_constraintStart_toStartOf="parent"
|
20
|
+
app:layout_constraintTop_toTopOf="parent" />
|
21
|
+
|
22
|
+
|
23
|
+
<Button
|
24
|
+
android:id="@+id/B1"
|
25
|
+
android:layout_width="wrap_content"
|
26
|
+
android:layout_height="wrap_content"
|
27
|
+
android:layout_marginTop="40dp"
|
28
|
+
android:layout_marginEnd="144dp"
|
29
|
+
android:text="Implicit Intents"
|
30
|
+
app:layout_constraintEnd_toEndOf="parent"
|
31
|
+
app:layout_constraintTop_toBottomOf="@+id/ExplicitButton" />
|
32
|
+
|
33
|
+
</android.support.constraint.ConstraintLayout>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
5
|
+
android:layout_width="match_parent"
|
6
|
+
android:layout_height="match_parent"
|
7
|
+
tools:context=".secondactivity">
|
8
|
+
<TextView
|
9
|
+
android:id="@+id/resultTv"
|
10
|
+
android:textSize="30sp"
|
11
|
+
android:textStyle="bold"
|
12
|
+
android:text="helllo"
|
13
|
+
android:textColor="#000"
|
14
|
+
android:layout_width="match_parent"
|
15
|
+
android:layout_height="wrap_content" />
|
16
|
+
</LinearLayout>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
package com.example.implicit
|
2
|
+
import android.content.Intent
|
3
|
+
import android.support.v7.app.AppCompatActivity
|
4
|
+
import android.os.Bundle
|
5
|
+
import android.widget.Button
|
6
|
+
|
7
|
+
class secondactivity:AppCompatActivity() {
|
8
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
9
|
+
super.onCreate(savedInstanceState)
|
10
|
+
setContentView(R.layout.second)
|
11
|
+
|
12
|
+
//Explicit Intent
|
13
|
+
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
package com.example.animation
|
2
|
+
|
3
|
+
import android.support.v7.app.AppCompatActivity
|
4
|
+
import android.os.Bundle
|
5
|
+
import android.view.animation.AnimationUtils
|
6
|
+
import android.widget.Button
|
7
|
+
import android.widget.TextView
|
8
|
+
|
9
|
+
class MainActivity : AppCompatActivity() {
|
10
|
+
|
11
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
12
|
+
super.onCreate(savedInstanceState)
|
13
|
+
setContentView(R.layout.activity_main)
|
14
|
+
|
15
|
+
val textView = findViewById<TextView>(R.id.textView)
|
16
|
+
|
17
|
+
findViewById<Button>(R.id.fade_in).setOnClickListener {
|
18
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.fad_in)
|
19
|
+
textView.startAnimation(animation)
|
20
|
+
}
|
21
|
+
|
22
|
+
findViewById<Button>(R.id.fade_out).setOnClickListener {
|
23
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.fade_out)
|
24
|
+
textView.startAnimation(animation)
|
25
|
+
}
|
26
|
+
|
27
|
+
findViewById<Button>(R.id.zoom_in).setOnClickListener {
|
28
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.zoom_in)
|
29
|
+
textView.startAnimation(animation)
|
30
|
+
}
|
31
|
+
|
32
|
+
findViewById<Button>(R.id.zoom_out).setOnClickListener {
|
33
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.zoom_out)
|
34
|
+
textView.startAnimation(animation)
|
35
|
+
}
|
36
|
+
|
37
|
+
findViewById<Button>(R.id.slide_up).setOnClickListener {
|
38
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.slide_up)
|
39
|
+
textView.startAnimation(animation)
|
40
|
+
}
|
41
|
+
|
42
|
+
findViewById<Button>(R.id.slide_down).setOnClickListener {
|
43
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.slide_down)
|
44
|
+
textView.startAnimation(animation)
|
45
|
+
}
|
46
|
+
|
47
|
+
findViewById<Button>(R.id.bounce).setOnClickListener {
|
48
|
+
val animation = AnimationUtils.loadAnimation(this, R.anim.bounce)
|
49
|
+
textView.startAnimation(animation)
|
50
|
+
}
|
51
|
+
|
52
|
+
findViewById<Button>(R.id.rotate).setOnClickListener {
|
53
|
+
textView.animate().apply {
|
54
|
+
duration = 1000
|
55
|
+
rotationXBy(360f)
|
56
|
+
}.start()
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
@@ -0,0 +1,122 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
5
|
+
android:layout_width="match_parent"
|
6
|
+
android:layout_height="match_parent"
|
7
|
+
tools:context=".MainActivity">
|
8
|
+
|
9
|
+
<TextView
|
10
|
+
android:id="@+id/textView"
|
11
|
+
android:layout_width="match_parent"
|
12
|
+
android:layout_height="match_parent"
|
13
|
+
android:layout_above="@+id/linearLayout"
|
14
|
+
android:gravity="center"
|
15
|
+
android:text="Mobile Application Development"
|
16
|
+
android:textSize="32sp"
|
17
|
+
android:textColor="@color/teal_200"
|
18
|
+
android:textStyle="bold" />
|
19
|
+
|
20
|
+
<LinearLayout
|
21
|
+
android:id="@+id/linearLayout"
|
22
|
+
android:layout_width="match_parent"
|
23
|
+
android:layout_height="wrap_content"
|
24
|
+
android:layout_alignParentBottom="true"
|
25
|
+
android:orientation="vertical">
|
26
|
+
|
27
|
+
<LinearLayout
|
28
|
+
android:layout_width="match_parent"
|
29
|
+
android:layout_height="wrap_content"
|
30
|
+
android:orientation="horizontal"
|
31
|
+
android:weightSum="2">
|
32
|
+
|
33
|
+
<Button
|
34
|
+
android:id="@+id/fade_in"
|
35
|
+
android:layout_width="0dp"
|
36
|
+
android:layout_height="match_parent"
|
37
|
+
android:layout_weight="1"
|
38
|
+
android:text="Fade In"
|
39
|
+
android:textAllCaps="false" />
|
40
|
+
|
41
|
+
<Button
|
42
|
+
android:id="@+id/fade_out"
|
43
|
+
android:layout_width="0dp"
|
44
|
+
android:layout_height="match_parent"
|
45
|
+
android:layout_weight="1"
|
46
|
+
android:text="Fade Out"
|
47
|
+
android:textAllCaps="false" />
|
48
|
+
</LinearLayout>
|
49
|
+
|
50
|
+
<LinearLayout
|
51
|
+
android:layout_width="match_parent"
|
52
|
+
android:layout_height="wrap_content"
|
53
|
+
android:orientation="horizontal"
|
54
|
+
android:weightSum="2">
|
55
|
+
|
56
|
+
<Button
|
57
|
+
android:id="@+id/zoom_in"
|
58
|
+
android:layout_width="0dp"
|
59
|
+
android:layout_height="match_parent"
|
60
|
+
android:layout_weight="1"
|
61
|
+
android:text="Zoom In"
|
62
|
+
android:textAllCaps="false" />
|
63
|
+
|
64
|
+
<Button
|
65
|
+
android:id="@+id/zoom_out"
|
66
|
+
android:layout_width="0dp"
|
67
|
+
android:layout_height="match_parent"
|
68
|
+
android:layout_weight="1"
|
69
|
+
android:text="Zoom Out"
|
70
|
+
android:textAllCaps="false" />
|
71
|
+
</LinearLayout>
|
72
|
+
|
73
|
+
<LinearLayout
|
74
|
+
android:layout_width="match_parent"
|
75
|
+
android:layout_height="wrap_content"
|
76
|
+
android:orientation="horizontal"
|
77
|
+
android:weightSum="2">
|
78
|
+
|
79
|
+
<Button
|
80
|
+
android:id="@+id/slide_down"
|
81
|
+
android:layout_width="0dp"
|
82
|
+
android:layout_height="match_parent"
|
83
|
+
android:layout_weight="1"
|
84
|
+
android:text="Slide Down"
|
85
|
+
android:textAllCaps="false" />
|
86
|
+
|
87
|
+
<Button
|
88
|
+
android:id="@+id/slide_up"
|
89
|
+
android:layout_width="0dp"
|
90
|
+
android:layout_height="match_parent"
|
91
|
+
android:layout_weight="1"
|
92
|
+
android:text="Slide Up"
|
93
|
+
android:textAllCaps="false" />
|
94
|
+
</LinearLayout>
|
95
|
+
|
96
|
+
<LinearLayout
|
97
|
+
android:layout_width="match_parent"
|
98
|
+
android:layout_height="wrap_content"
|
99
|
+
android:orientation="horizontal"
|
100
|
+
android:weightSum="2">
|
101
|
+
|
102
|
+
<Button
|
103
|
+
android:id="@+id/bounce"
|
104
|
+
android:layout_width="0dp"
|
105
|
+
android:layout_height="match_parent"
|
106
|
+
android:layout_weight="1"
|
107
|
+
android:text="Bounce"
|
108
|
+
android:textAllCaps="false" />
|
109
|
+
|
110
|
+
<Button
|
111
|
+
android:id="@+id/rotate"
|
112
|
+
android:layout_width="0dp"
|
113
|
+
android:layout_height="match_parent"
|
114
|
+
android:layout_weight="1"
|
115
|
+
android:text="Rotate"
|
116
|
+
android:textAllCaps="false" />
|
117
|
+
</LinearLayout>
|
118
|
+
|
119
|
+
</LinearLayout>
|
120
|
+
|
121
|
+
|
122
|
+
</RelativeLayout>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
3
|
+
<translate
|
4
|
+
android:fromYDelta="100%"
|
5
|
+
android:toYDelta="-20%"
|
6
|
+
android:duration="300" />
|
7
|
+
<translate
|
8
|
+
android:startOffset="500"
|
9
|
+
android:fromYDelta="-20%"
|
10
|
+
android:toYDelta="10%"
|
11
|
+
android:duration="150" />
|
12
|
+
<translate
|
13
|
+
android:startOffset="1000"
|
14
|
+
android:fromYDelta="10%"
|
15
|
+
android:toYDelta="0"
|
16
|
+
android:duration="100" />
|
17
|
+
</set>
|