androidd 0.0.1__py3-none-any.whl → 0.0.2__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/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/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-0.0.1.dist-info → androidd-0.0.2.dist-info}/METADATA +1 -1
- androidd-0.0.2.dist-info/RECORD +95 -0
- androidd-0.0.2.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.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,280 @@
|
|
1
|
+
package com.example.samplequestion1
|
2
|
+
|
3
|
+
import android.os.Bundle
|
4
|
+
import android.support.v7.app.AppCompatActivity
|
5
|
+
import android.widget.Button
|
6
|
+
import android.widget.CheckBox
|
7
|
+
import android.widget.TextView
|
8
|
+
import android.widget.Toast
|
9
|
+
|
10
|
+
class MainActivity : AppCompatActivity() {
|
11
|
+
|
12
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
13
|
+
super.onCreate(savedInstanceState)
|
14
|
+
setContentView(R.layout.activity_main)
|
15
|
+
|
16
|
+
// Binding views
|
17
|
+
val book1 = findViewById<CheckBox>(R.id.book1)
|
18
|
+
val book2 = findViewById<CheckBox>(R.id.book2)
|
19
|
+
val book3 = findViewById<CheckBox>(R.id.book3)
|
20
|
+
val book4 = findViewById<CheckBox>(R.id.book4)
|
21
|
+
val calculateButton = findViewById<Button>(R.id.calculateButton)
|
22
|
+
val resultText = findViewById<TextView>(R.id.resultText)
|
23
|
+
|
24
|
+
// Calculate total cost on button click
|
25
|
+
calculateButton.setOnClickListener {
|
26
|
+
var total = 0
|
27
|
+
if (book1.isChecked) total += 100
|
28
|
+
if (book2.isChecked) total += 150
|
29
|
+
if (book3.isChecked) total += 200
|
30
|
+
if (book4.isChecked) total += 250
|
31
|
+
|
32
|
+
if (total > 300) {
|
33
|
+
total -= (total * 0.1).toInt()
|
34
|
+
Toast.makeText(this, "10% discount applied!", Toast.LENGTH_SHORT).show()
|
35
|
+
}
|
36
|
+
|
37
|
+
resultText.text = "Total Cost: ₹$total"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<?xml version="1.0" encoding="utf-8"?>
|
50
|
+
<LinearLayout
|
51
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
52
|
+
android:layout_width="match_parent"
|
53
|
+
android:layout_height="match_parent"
|
54
|
+
android:orientation="vertical"
|
55
|
+
android:padding="20dp">
|
56
|
+
|
57
|
+
<CheckBox
|
58
|
+
android:id="@+id/book1"
|
59
|
+
android:layout_width="wrap_content"
|
60
|
+
android:layout_height="wrap_content"
|
61
|
+
android:text="Book 1 - ₹100" />
|
62
|
+
|
63
|
+
<CheckBox
|
64
|
+
android:id="@+id/book2"
|
65
|
+
android:layout_width="wrap_content"
|
66
|
+
android:layout_height="wrap_content"
|
67
|
+
android:text="Book 2 - ₹150" />
|
68
|
+
|
69
|
+
<CheckBox
|
70
|
+
android:id="@+id/book3"
|
71
|
+
android:layout_width="wrap_content"
|
72
|
+
android:layout_height="wrap_content"
|
73
|
+
android:text="Book 3 - ₹200" />
|
74
|
+
|
75
|
+
<CheckBox
|
76
|
+
android:id="@+id/book4"
|
77
|
+
android:layout_width="wrap_content"
|
78
|
+
android:layout_height="wrap_content"
|
79
|
+
android:text="Book 4 - ₹250" />
|
80
|
+
|
81
|
+
<Button
|
82
|
+
android:id="@+id/calculateButton"
|
83
|
+
android:layout_width="match_parent"
|
84
|
+
android:layout_height="wrap_content"
|
85
|
+
android:text="Calculate Total"
|
86
|
+
android:layout_marginTop="20dp" />
|
87
|
+
|
88
|
+
<TextView
|
89
|
+
android:id="@+id/resultText"
|
90
|
+
android:layout_width="wrap_content"
|
91
|
+
android:layout_height="wrap_content"
|
92
|
+
android:text="Total Cost: ₹0"
|
93
|
+
android:textSize="18sp"
|
94
|
+
android:layout_marginTop="20dp" />
|
95
|
+
</LinearLayout>
|
96
|
+
|
97
|
+
package com.example.sampleques2
|
98
|
+
|
99
|
+
import android.os.Bundle
|
100
|
+
import android.support.v7.app.AppCompatActivity
|
101
|
+
import android.widget.*
|
102
|
+
|
103
|
+
class MainActivity : AppCompatActivity() {
|
104
|
+
|
105
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
106
|
+
super.onCreate(savedInstanceState)
|
107
|
+
setContentView(R.layout.activity_main)
|
108
|
+
|
109
|
+
val num1 = findViewById<EditText>(R.id.etNumber1)
|
110
|
+
val num2 = findViewById<EditText>(R.id.etNumber2)
|
111
|
+
val group = findViewById<RadioGroup>(R.id.operationGroup)
|
112
|
+
val button = findViewById<Button>(R.id.btnCalculate)
|
113
|
+
val result = findViewById<TextView>(R.id.tvResult)
|
114
|
+
|
115
|
+
button.setOnClickListener {
|
116
|
+
val n1 = num1.text.toString().toDoubleOrNull()
|
117
|
+
val n2 = num2.text.toString().toDoubleOrNull()
|
118
|
+
|
119
|
+
if (n1 == null || n2 == null) {
|
120
|
+
Toast.makeText(this, "Enter valid numbers", Toast.LENGTH_SHORT).show()
|
121
|
+
return@setOnClickListener
|
122
|
+
}
|
123
|
+
|
124
|
+
val res = when (group.checkedRadioButtonId) {
|
125
|
+
R.id.rbAdd -> n1 + n2
|
126
|
+
R.id.rbSubtract -> n1 - n2
|
127
|
+
R.id.rbMultiply -> n1 * n2
|
128
|
+
R.id.rbDivide -> if (n2 != 0.0) n1 / n2 else {
|
129
|
+
Toast.makeText(this, "Cannot divide by zero", Toast.LENGTH_SHORT).show()
|
130
|
+
return@setOnClickListener
|
131
|
+
}
|
132
|
+
else -> {
|
133
|
+
Toast.makeText(this, "Select an operation", Toast.LENGTH_SHORT).show()
|
134
|
+
return@setOnClickListener
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
result.text = "Result: $res"
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<?xml version="1.0" encoding="utf-8"?>
|
146
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
147
|
+
android:orientation="vertical"
|
148
|
+
android:layout_width="match_parent"
|
149
|
+
android:layout_height="match_parent"
|
150
|
+
android:padding="20dp">
|
151
|
+
|
152
|
+
<EditText
|
153
|
+
android:id="@+id/etNumber1"
|
154
|
+
android:layout_width="match_parent"
|
155
|
+
android:layout_height="wrap_content"
|
156
|
+
android:hint="Enter first number"
|
157
|
+
android:inputType="numberDecimal" />
|
158
|
+
|
159
|
+
<EditText
|
160
|
+
android:id="@+id/etNumber2"
|
161
|
+
android:layout_width="match_parent"
|
162
|
+
android:layout_height="wrap_content"
|
163
|
+
android:hint="Enter second number"
|
164
|
+
android:inputType="numberDecimal"
|
165
|
+
android:layout_marginTop="12dp" />
|
166
|
+
|
167
|
+
<RadioGroup
|
168
|
+
android:id="@+id/operationGroup"
|
169
|
+
android:layout_width="match_parent"
|
170
|
+
android:layout_height="wrap_content"
|
171
|
+
android:orientation="horizontal"
|
172
|
+
android:layout_marginTop="16dp">
|
173
|
+
|
174
|
+
<RadioButton
|
175
|
+
android:id="@+id/rbAdd"
|
176
|
+
android:layout_width="wrap_content"
|
177
|
+
android:layout_height="wrap_content"
|
178
|
+
android:text="Add" />
|
179
|
+
|
180
|
+
<RadioButton
|
181
|
+
android:id="@+id/rbSubtract"
|
182
|
+
android:layout_width="wrap_content"
|
183
|
+
android:layout_height="wrap_content"
|
184
|
+
android:text="Subtract" />
|
185
|
+
|
186
|
+
<RadioButton
|
187
|
+
android:id="@+id/rbMultiply"
|
188
|
+
android:layout_width="wrap_content"
|
189
|
+
android:layout_height="wrap_content"
|
190
|
+
android:text="Multiply" />
|
191
|
+
|
192
|
+
<RadioButton
|
193
|
+
android:id="@+id/rbDivide"
|
194
|
+
android:layout_width="wrap_content"
|
195
|
+
android:layout_height="wrap_content"
|
196
|
+
android:text="Divide" />
|
197
|
+
</RadioGroup>
|
198
|
+
|
199
|
+
<Button
|
200
|
+
android:id="@+id/btnCalculate"
|
201
|
+
android:layout_width="wrap_content"
|
202
|
+
android:layout_height="wrap_content"
|
203
|
+
android:text="Calculate"
|
204
|
+
android:layout_marginTop="16dp" />
|
205
|
+
|
206
|
+
<TextView
|
207
|
+
android:id="@+id/tvResult"
|
208
|
+
android:layout_width="wrap_content"
|
209
|
+
android:layout_height="wrap_content"
|
210
|
+
android:text="Result: "
|
211
|
+
android:textSize="18sp"
|
212
|
+
android:textColor="#008000"
|
213
|
+
android:layout_marginTop="20dp" />
|
214
|
+
</LinearLayout>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
package com.example.sampleques3
|
220
|
+
|
221
|
+
import android.support.v7.app.AppCompatActivity
|
222
|
+
import android.os.Bundle
|
223
|
+
import android.widget.*
|
224
|
+
|
225
|
+
class MainActivity : AppCompatActivity() {
|
226
|
+
private var counter = 0
|
227
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
228
|
+
super.onCreate(savedInstanceState)
|
229
|
+
setContentView(R.layout.activity_main)
|
230
|
+
|
231
|
+
val counterTextView = findViewById<TextView>(R.id.counterTextView)
|
232
|
+
val incrementButton = findViewById<Button>(R.id.incrementButton)
|
233
|
+
val toastButton = findViewById<Button>(R.id.toastButton)
|
234
|
+
|
235
|
+
incrementButton.setOnClickListener {
|
236
|
+
counter++
|
237
|
+
counterTextView.text = "Count: $counter"
|
238
|
+
}
|
239
|
+
|
240
|
+
toastButton.setOnClickListener {
|
241
|
+
Toast.makeText(this, "Count is $counter", Toast.LENGTH_SHORT).show()
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<?xml version="1.0" encoding="utf-8"?>
|
250
|
+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
251
|
+
android:orientation="horizontal"
|
252
|
+
android:layout_width="match_parent"
|
253
|
+
android:layout_height="match_parent"
|
254
|
+
android:gravity="center"
|
255
|
+
android:padding="16dp">
|
256
|
+
|
257
|
+
<TextView
|
258
|
+
android:id="@+id/counterTextView"
|
259
|
+
android:layout_width="wrap_content"
|
260
|
+
android:layout_height="wrap_content"
|
261
|
+
android:text="Count: 0"
|
262
|
+
android:textSize="20sp"
|
263
|
+
android:layout_marginEnd="16dp" />
|
264
|
+
|
265
|
+
<Button
|
266
|
+
android:id="@+id/incrementButton"
|
267
|
+
android:layout_width="wrap_content"
|
268
|
+
android:layout_height="wrap_content"
|
269
|
+
android:text="Increment"
|
270
|
+
android:layout_marginEnd="16dp" />
|
271
|
+
|
272
|
+
<Button
|
273
|
+
android:id="@+id/toastButton"
|
274
|
+
android:layout_width="wrap_content"
|
275
|
+
android:layout_height="wrap_content"
|
276
|
+
android:text="Show Toast" />
|
277
|
+
|
278
|
+
</LinearLayout>
|
279
|
+
|
280
|
+
|