-
Notifications
You must be signed in to change notification settings - Fork 2
Mazurojj code review2 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3599726
969680c
5f30a8e
d864836
321d7b0
9433939
77b0961
4a58425
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,38 @@ | ||
| package com.example.mymovieinfo | ||
|
|
||
| import android.annotation.SuppressLint | ||
| import android.app.SearchManager | ||
| import androidx.appcompat.app.AppCompatActivity | ||
| import android.os.Bundle | ||
| import java.io.IOException | ||
| import java.io.InputStream | ||
| import android.content.Context | ||
| import android.content.Intent | ||
| import android.view.View | ||
| import android.widget.Button | ||
| import android.widget.TextView | ||
| import android.widget.Toast | ||
|
|
||
| class MainActivity : AppCompatActivity() { | ||
| @SuppressLint("SetTextI18n") | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
| setContentView(R.layout.activity_main) | ||
|
|
||
| val year = findViewById<TextView>(R.id.txtYear) | ||
| val name = findViewById<TextView>(R.id.txtMovieName) | ||
| val result = findViewById<TextView>(R.id.txtResults) | ||
|
|
||
|
|
||
| val btnFindMyMovie = findViewById<Button>(R.id.btnFindMyMovie) | ||
| btnFindMyMovie.setOnClickListener { | ||
| // your code to perform when the user clicks on the button | ||
|
|
||
| result.text = "the $name was released in $year" | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.example.mymovieinfo.dto | ||
|
|
||
| data class Specimen(var movieTitle: String = "", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specimen? |
||
| var movieRank: Int = 0, | ||
| var movieCountry : String = "", | ||
| var movieBoxOfficeGross: String = "", | ||
| var movieOpeningWeekendGross : String = "", | ||
| var movieDistributor : String = "") | ||
| { | ||
| override fun toString(): String { | ||
| return movieTitle | ||
| } | ||
| } | ||
|
Comment on lines
+4
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like an incomplete feature. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ | |
| tools:ignore="ExtraText"> | ||
|
|
||
| <EditText | ||
| android:id="@+id/txt_MovieYear" | ||
| android:id="@+id/txtYear" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since this is pointing to an XML element in an XML file, underscores are OK. |
||
| android:layout_width="243dp" | ||
| android:layout_height="69dp" | ||
| android:layout_marginTop="81dp" | ||
|
|
@@ -18,15 +18,15 @@ | |
| android:inputType="datetime" | ||
| android:text="@string/movie_year" | ||
| android:visibility="visible" | ||
| app:layout_constraintBottom_toTopOf="@+id/txt_Results" | ||
| app:layout_constraintBottom_toTopOf="@+id/txtResults" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toTopOf="parent" | ||
| tools:ignore="LabelFor" | ||
| tools:visibility="visible" /> | ||
|
|
||
| <EditText | ||
| android:id="@+id/txt_MovieName" | ||
| android:id="@+id/txtMovieName" | ||
| android:layout_width="244dp" | ||
| android:layout_height="74dp" | ||
| android:layout_marginBottom="37dp" | ||
|
|
@@ -35,15 +35,15 @@ | |
| android:inputType="text" | ||
| android:text="@string/movie_name" | ||
| android:visibility="visible" | ||
| app:layout_constraintBottom_toTopOf="@+id/btn_FindMyMovie" | ||
| app:layout_constraintBottom_toTopOf="@+id/btnFindMyMovie" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@+id/txt_MovieYear" | ||
| app:layout_constraintTop_toBottomOf="@+id/txtYear" | ||
| tools:ignore="LabelFor" | ||
| tools:visibility="visible" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_FindMyMovie" | ||
| android:id="@+id/btnFindMyMovie" | ||
| style="@style/Widget.AppCompat.Button" | ||
| android:layout_width="169dp" | ||
| android:layout_height="0dp" | ||
|
|
@@ -54,13 +54,13 @@ | |
| app:layout_constraintBottom_toBottomOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@+id/txt_MovieName" | ||
| app:layout_constraintTop_toBottomOf="@+id/txtMovieName" | ||
| app:rippleColor="#FFFFFF" | ||
| app:strokeColor="#4E4E4E" | ||
| tools:visibility="visible" /> | ||
|
|
||
| <EditText | ||
| android:id="@+id/txt_Results" | ||
| android:id="@+id/txtResults" | ||
| android:layout_width="0dp" | ||
| android:layout_height="0dp" | ||
| android:layout_marginStart="73dp" | ||
|
|
@@ -72,7 +72,7 @@ | |
| app:layout_constraintBottom_toBottomOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintTop_toBottomOf="@+id/txt_MovieYear" | ||
| app:layout_constraintTop_toBottomOf="@+id/txtYear" | ||
| android:importantForAutofill="no" | ||
| tools:ignore="LabelFor" /> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
|
||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <searchable xmlns:android="com.google.gson.annotations.SerializedName"> | ||
| </searchable> | ||
|
|
||
| <application> | ||
| <activity android:name=".SearchableActivity" > | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.SEARCH" /> | ||
| </intent-filter> | ||
| <meta-data android:name="android.app.searchable" | ||
| android:resource="@xml/searchable"/> | ||
| </activity> | ||
| </application> | ||
|
|
||
| </PreferenceScreen> | ||
|
Comment on lines
+1
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like an incomplete feature. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an incomplete feature.
Are you using these anywhere?
If not in use, remove them. Keep the codebase as small as possible to do the job you want to do. Unused code is clutter, and bad documentation, which increases technical debt.
Only complete features, which meet the team's Definition of Done, should be merged to Main/Master.