ja acabei
This commit is contained in:
@@ -177,9 +177,9 @@ document.getElementById(id).style.display = 'none';
|
||||
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
|
||||
<header class="mdl-layout__header">
|
||||
<div class="mdl-layout__header-row">
|
||||
<span class="mdl-layout-title">Lint Report: 153 warnings</span>
|
||||
<span class="mdl-layout-title">Lint Report: 155 warnings</span>
|
||||
<div class="mdl-layout-spacer"></div>
|
||||
<nav class="mdl-navigation mdl-layout--large-screen-only">Check performed at Wed Apr 22 12:20:44 WEST 2026 by AGP (9.2.0)</nav>
|
||||
<nav class="mdl-navigation mdl-layout--large-screen-only">Check performed at Wed Apr 22 12:42:02 WEST 2026 by AGP (9.2.0)</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div class="mdl-layout__drawer">
|
||||
@@ -203,8 +203,8 @@ document.getElementById(id).style.display = 'none';
|
||||
<a class="mdl-navigation__link" href="#IconLocation"><i class="material-icons warning-icon">warning</i>Image defined in density-independent drawable folder (1)</a>
|
||||
<a class="mdl-navigation__link" href="#ContentDescription"><i class="material-icons warning-icon">warning</i>Image without <code>contentDescription</code> (3)</a>
|
||||
<a class="mdl-navigation__link" href="#LabelFor"><i class="material-icons warning-icon">warning</i>Missing accessibility label (2)</a>
|
||||
<a class="mdl-navigation__link" href="#SetTextI18n"><i class="material-icons warning-icon">warning</i>TextView Internationalization (22)</a>
|
||||
<a class="mdl-navigation__link" href="#HardcodedText"><i class="material-icons warning-icon">warning</i>Hardcoded text (71)</a>
|
||||
<a class="mdl-navigation__link" href="#SetTextI18n"><i class="material-icons warning-icon">warning</i>TextView Internationalization (23)</a>
|
||||
<a class="mdl-navigation__link" href="#HardcodedText"><i class="material-icons warning-icon">warning</i>Hardcoded text (72)</a>
|
||||
</nav>
|
||||
</div>
|
||||
<main class="mdl-layout__content">
|
||||
@@ -279,10 +279,10 @@ document.getElementById(id).style.display = 'none';
|
||||
<tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Internationalization">Internationalization</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td class="countColumn">22</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
|
||||
<td class="countColumn">23</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
|
||||
<a href="#SetTextI18n">SetTextI18n</a>: TextView Internationalization</td></tr>
|
||||
<tr>
|
||||
<td class="countColumn">71</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
|
||||
<td class="countColumn">72</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
|
||||
<a href="#HardcodedText">HardcodedText</a>: Hardcoded text</td></tr>
|
||||
<tr><td></td><td class="categoryColumn"><a href="#ExtraIssues">Included Additional Checks (31)</a>
|
||||
</td></tr>
|
||||
@@ -345,34 +345,34 @@ Dismiss</button> </div>
|
||||
<span class="lineno"> 83 </span> }
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:188</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 185 </span> <span class="keyword">boolean</span> isToday = <span class="keyword">false</span>;
|
||||
<span class="lineno"> 186 </span>
|
||||
<span class="lineno"> 187 </span> <span class="keyword">if</span> (selectedDateStr != <span class="keyword">null</span>) {
|
||||
<span class="caretline"><span class="lineno"> 188 </span> String todayStr = <span class="warning">String.format(<span class="string">"%02d/%02d/%04d"</span>,</span> </span>
|
||||
<span class="lineno"> 189 </span> now.get(Calendar.DAY_OF_MONTH),
|
||||
<span class="lineno"> 190 </span> now.get(Calendar.MONTH) + <span class="number">1</span>,
|
||||
<span class="lineno"> 191 </span> now.get(Calendar.YEAR));
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:187</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 184 </span> <span class="keyword">boolean</span> isToday = <span class="keyword">false</span>;
|
||||
<span class="lineno"> 185 </span>
|
||||
<span class="lineno"> 186 </span> <span class="keyword">if</span> (selectedDateStr != <span class="keyword">null</span>) {
|
||||
<span class="caretline"><span class="lineno"> 187 </span> String todayStr = <span class="warning">String.format(<span class="string">"%02d/%02d/%04d"</span>,</span> </span>
|
||||
<span class="lineno"> 188 </span> now.get(Calendar.DAY_OF_MONTH),
|
||||
<span class="lineno"> 189 </span> now.get(Calendar.MONTH) + <span class="number">1</span>,
|
||||
<span class="lineno"> 190 </span> now.get(Calendar.YEAR));
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:202</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 199 </span>
|
||||
<span class="lineno"> 200 </span> <span class="keyword">for</span> (<span class="keyword">int</span> hour = startHour; hour <= endHour; hour++) {
|
||||
<span class="lineno"> 201 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">0</span> > currentMinute)) {
|
||||
<span class="caretline"><span class="lineno"> 202 </span> addSlot(slots, <span class="warning">String.format(<span class="string">"%02d:00"</span>, hour)</span>, bookedTimes); </span>
|
||||
<span class="lineno"> 203 </span> }
|
||||
<span class="lineno"> 204 </span> <span class="keyword">if</span> (hour != endHour) {
|
||||
<span class="lineno"> 205 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">30</span> > currentMinute)) {
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:201</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 198 </span>
|
||||
<span class="lineno"> 199 </span> <span class="keyword">for</span> (<span class="keyword">int</span> hour = startHour; hour <= endHour; hour++) {
|
||||
<span class="lineno"> 200 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">0</span> > currentMinute)) {
|
||||
<span class="caretline"><span class="lineno"> 201 </span> addSlot(slots, <span class="warning">String.format(<span class="string">"%02d:00"</span>, hour)</span>, bookedTimes); </span>
|
||||
<span class="lineno"> 202 </span> }
|
||||
<span class="lineno"> 203 </span> <span class="keyword">if</span> (hour != endHour) {
|
||||
<span class="lineno"> 204 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">30</span> > currentMinute)) {
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:206</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 203 </span> }
|
||||
<span class="lineno"> 204 </span> <span class="keyword">if</span> (hour != endHour) {
|
||||
<span class="lineno"> 205 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">30</span> > currentMinute)) {
|
||||
<span class="caretline"><span class="lineno"> 206 </span> addSlot(slots, <span class="warning">String.format(<span class="string">"%02d:30"</span>, hour)</span>, bookedTimes); </span>
|
||||
<span class="lineno"> 207 </span> }
|
||||
<span class="lineno"> 208 </span> }
|
||||
<span class="lineno"> 209 </span> }
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java">../../src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java</a>:205</span>: <span class="message">Implicitly using the default locale is a common source of bugs: Use <code>String.format(Locale, ...)</code> instead</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 202 </span> }
|
||||
<span class="lineno"> 203 </span> <span class="keyword">if</span> (hour != endHour) {
|
||||
<span class="lineno"> 204 </span> <span class="keyword">if</span> (!isToday || hour > currentHour || (hour == currentHour && <span class="number">30</span> > currentMinute)) {
|
||||
<span class="caretline"><span class="lineno"> 205 </span> addSlot(slots, <span class="warning">String.format(<span class="string">"%02d:30"</span>, hour)</span>, bookedTimes); </span>
|
||||
<span class="lineno"> 206 </span> }
|
||||
<span class="lineno"> 207 </span> }
|
||||
<span class="lineno"> 208 </span> }
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
@@ -1548,22 +1548,33 @@ Dismiss</button> </div>
|
||||
<div class="issue">
|
||||
<div class="warningslist">
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java">../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java</a>:36</span>: <span class="message">Do not concatenate text displayed with <code>setText</code>. Use resource string with placeholders.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 33 </span> holder.textType.setText(appointment.type);
|
||||
<span class="lineno"> 34 </span> holder.textDate.setText(appointment.date);
|
||||
<span class="lineno"> 35 </span> holder.textTime.setText(appointment.time);
|
||||
<span class="caretline"><span class="lineno"> 36 </span> holder.textReason.setText(<span class="warning"><span class="string">"Motivo: "</span> + (appointment.reason != <span class="keyword">null</span> ? appointment.reason : <span class="string">"--"</span>)</span>);</span>
|
||||
<span class="lineno"> 37 </span> }
|
||||
<span class="lineno"> 38 </span>
|
||||
<span class="lineno"> 39 </span> <span class="annotation">@Override</span></pre>
|
||||
<span class="lineno"> 33 </span> holder.textType.setText(appointment.type);
|
||||
<span class="lineno"> 34 </span> holder.textDate.setText(appointment.date);
|
||||
<span class="lineno"> 35 </span> holder.textTime.setText(appointment.time);
|
||||
<span class="caretline"><span class="lineno"> 36 </span> holder.textReason.setText(<span class="warning"><span class="string">"Motivo: "</span> + (appointment.reason != <span class="keyword">null</span> ? appointment.reason : <span class="string">"--"</span>)</span>);</span>
|
||||
<span class="lineno"> 37 </span>
|
||||
<span class="lineno"> 38 </span> String status = appointment.status != <span class="keyword">null</span> ? appointment.status : <span class="string">"Pendente"</span>;
|
||||
<span class="lineno"> 39 </span> holder.textStatus.setText(status);
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java">../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java</a>:36</span>: <span class="message">String literal in <code>setText</code> can not be translated. Use Android resources instead.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 33 </span> holder.textType.setText(appointment.type);
|
||||
<span class="lineno"> 34 </span> holder.textDate.setText(appointment.date);
|
||||
<span class="lineno"> 35 </span> holder.textTime.setText(appointment.time);
|
||||
<span class="caretline"><span class="lineno"> 36 </span> holder.textReason.setText(<span class="warning"><span class="string">"Motivo: "</span></span> + (appointment.reason != <span class="keyword">null</span> ? appointment.reason : <span class="string">"--"</span>));</span>
|
||||
<span class="lineno"> 37 </span> }
|
||||
<span class="lineno"> 38 </span>
|
||||
<span class="lineno"> 39 </span> <span class="annotation">@Override</span></pre>
|
||||
<span class="lineno"> 33 </span> holder.textType.setText(appointment.type);
|
||||
<span class="lineno"> 34 </span> holder.textDate.setText(appointment.date);
|
||||
<span class="lineno"> 35 </span> holder.textTime.setText(appointment.time);
|
||||
<span class="caretline"><span class="lineno"> 36 </span> holder.textReason.setText(<span class="warning"><span class="string">"Motivo: "</span></span> + (appointment.reason != <span class="keyword">null</span> ? appointment.reason : <span class="string">"--"</span>));</span>
|
||||
<span class="lineno"> 37 </span>
|
||||
<span class="lineno"> 38 </span> String status = appointment.status != <span class="keyword">null</span> ? appointment.status : <span class="string">"Pendente"</span>;
|
||||
<span class="lineno"> 39 </span> holder.textStatus.setText(status);
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java">../../src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java</a>:50</span>: <span class="message">String literal in <code>setText</code> can not be translated. Use Android resources instead.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 47 </span> } <span class="keyword">else</span> {
|
||||
<span class="lineno"> 48 </span> holder.textStatus.setTextColor(android.graphics.Color.parseColor(<span class="string">"#F57C00"</span>)); <span class="comment">// Orange</span>
|
||||
<span class="lineno"> 49 </span> holder.textStatus.setBackgroundColor(android.graphics.Color.parseColor(<span class="string">"#FFE0B2"</span>));
|
||||
<span class="caretline"><span class="lineno"> 50 </span> holder.textStatus.setText(<span class="warning"><span class="string">"Pendente"</span></span>); </span>
|
||||
<span class="lineno"> 51 </span> }
|
||||
<span class="lineno"> 52 </span> }
|
||||
</pre>
|
||||
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/home/HomeFragment.java">../../src/main/java/com/example/cuida/ui/home/HomeFragment.java</a>:44</span>: <span class="message">Do not concatenate text displayed with <code>setText</code>. Use resource string with placeholders.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 41 </span> <span class="keyword">if</span> (name != <span class="keyword">null</span> && !name.isEmpty()) {
|
||||
@@ -1585,6 +1596,8 @@ Dismiss</button> </div>
|
||||
<span class="lineno"> 47 </span> }
|
||||
</pre>
|
||||
|
||||
<button class="mdl-button mdl-js-button mdl-button--primary" id="SetTextI18nDivLink" onclick="reveal('SetTextI18nDiv');" />+ 18 More Occurrences...</button>
|
||||
<div id="SetTextI18nDiv" style="display: none">
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/home/HomeFragment.java">../../src/main/java/com/example/cuida/ui/home/HomeFragment.java</a>:46</span>: <span class="message">String literal in <code>setText</code> can not be translated. Use Android resources instead.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 43 </span> String firstName = name.split(<span class="string">" "</span>)[<span class="number">0</span>];
|
||||
<span class="lineno"> 44 </span> binding.textGreeting.setText(<span class="string">"Olá, "</span> + firstName + <span class="string">"!"</span>);
|
||||
@@ -1594,8 +1607,6 @@ Dismiss</button> </div>
|
||||
<span class="lineno"> 48 </span>
|
||||
<span class="lineno"> 49 </span> <span class="comment">// Load Profile Picture</span></pre>
|
||||
|
||||
<button class="mdl-button mdl-js-button mdl-button--primary" id="SetTextI18nDivLink" onclick="reveal('SetTextI18nDiv');" />+ 17 More Occurrences...</button>
|
||||
<div id="SetTextI18nDiv" style="display: none">
|
||||
<span class="location"><a href="../../src/main/java/com/example/cuida/ui/home/HomeFragment.java">../../src/main/java/com/example/cuida/ui/home/HomeFragment.java</a>:62</span>: <span class="message">String literal in <code>setText</code> can not be translated. Use Android resources instead.</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 59 </span> })
|
||||
<span class="lineno"> 60 </span> .addOnFailureListener(e -> {
|
||||
@@ -1852,7 +1863,7 @@ Dismiss</button> </div>
|
||||
<span class="lineno"> 99 </span> <span class="prefix">android:</span><span class="attribute">visibility</span>=<span class="value">"gone"</span>/>
|
||||
</pre>
|
||||
|
||||
<button class="mdl-button mdl-js-button mdl-button--primary" id="HardcodedTextDivLink" onclick="reveal('HardcodedTextDiv');" />+ 66 More Occurrences...</button>
|
||||
<button class="mdl-button mdl-js-button mdl-button--primary" id="HardcodedTextDivLink" onclick="reveal('HardcodedTextDiv');" />+ 67 More Occurrences...</button>
|
||||
<div id="HardcodedTextDiv" style="display: none">
|
||||
<span class="location"><a href="../../src/main/res/layout/activity_register.xml">../../src/main/res/layout/activity_register.xml</a>:92</span>: <span class="message">Hardcoded string "Nº Utente", should use <code>@string</code> resource</span><br /><pre class="errorlines">
|
||||
<span class="lineno"> 89 </span><span class="attribute"> </span><span class="prefix">android:</span><span class="attribute">id</span>=<span class="value">"@+id/utente_edit_text"</span>
|
||||
@@ -2266,7 +2277,7 @@ Dismiss</button> </div>
|
||||
<span class="lineno"> 127 </span> <span class="prefix">android:</span><span class="attribute">textColor</span>=<span class="value">"@color/error_color"</span>/>
|
||||
</pre>
|
||||
|
||||
<br/><b>NOTE: 21 results omitted.</b><br/><br/></div>
|
||||
<br/><b>NOTE: 22 results omitted.</b><br/><br/></div>
|
||||
</div>
|
||||
<div class="metadata"><div class="explanation" id="explanationHardcodedText" style="display: none;">
|
||||
Hardcoding text attributes directly in layout files is bad for several reasons:<br/>
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:80: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
String date = String.format("%02d/%02d/%04d", dayOfMonth, month + 1, year);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:188: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:187: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
String todayStr = String.format("%02d/%02d/%04d",
|
||||
^
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:202: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:201: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
addSlot(slots, String.format("%02d:00", hour), bookedTimes);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:206: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java:205: Warning: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead [DefaultLocale]
|
||||
addSlot(slots, String.format("%02d:30", hour), bookedTimes);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -429,6 +429,9 @@
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java:36: Warning: String literal in setText can not be translated. Use Android resources instead. [SetTextI18n]
|
||||
holder.textReason.setText("Motivo: " + (appointment.reason != null ? appointment.reason : "--"));
|
||||
~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java:50: Warning: String literal in setText can not be translated. Use Android resources instead. [SetTextI18n]
|
||||
holder.textStatus.setText("Pendente");
|
||||
~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/home/HomeFragment.java:44: Warning: Do not concatenate text displayed with setText. Use resource string with placeholders. [SetTextI18n]
|
||||
binding.textGreeting.setText("Olá, " + firstName + "!");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -689,16 +692,19 @@
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/fragment_sns24.xml:85: Warning: Hardcoded string "Hospital mais próximo", should use @string resource [HardcodedText]
|
||||
android:text="Hospital mais próximo"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:23: Warning: Hardcoded string "Tipo de Consulta", should use @string resource [HardcodedText]
|
||||
android:text="Tipo de Consulta"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:38: Warning: Hardcoded string "dd/MM/yyyy", should use @string resource [HardcodedText]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:28: Warning: Hardcoded string "Tipo de Consulta", should use @string resource [HardcodedText]
|
||||
android:text="Tipo de Consulta"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:37: Warning: Hardcoded string "Pendente", should use @string resource [HardcodedText]
|
||||
android:text="Pendente"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:56: Warning: Hardcoded string "dd/MM/yyyy", should use @string resource [HardcodedText]
|
||||
android:text="dd/MM/yyyy"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:45: Warning: Hardcoded string "HH:mm", should use @string resource [HardcodedText]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:63: Warning: Hardcoded string "HH:mm", should use @string resource [HardcodedText]
|
||||
android:text="HH:mm"
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:53: Warning: Hardcoded string "Motivo: --", should use @string resource [HardcodedText]
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml:71: Warning: Hardcoded string "Motivo: --", should use @string resource [HardcodedText]
|
||||
android:text="Motivo: --"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_medication.xml:37: Warning: Hardcoded string "Nome Medicamento", should use @string resource [HardcodedText]
|
||||
@@ -731,4 +737,4 @@
|
||||
There are quickfixes to automatically extract this hardcoded string into a
|
||||
resource lookup.
|
||||
|
||||
0 errors, 153 warnings
|
||||
0 errors, 155 warnings
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java"
|
||||
line="188"
|
||||
line="187"
|
||||
column="31"/>
|
||||
</issue>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java"
|
||||
line="202"
|
||||
line="201"
|
||||
column="32"/>
|
||||
</issue>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/schedule/ScheduleViewModel.java"
|
||||
line="206"
|
||||
line="205"
|
||||
column="36"/>
|
||||
</issue>
|
||||
|
||||
@@ -1023,6 +1023,24 @@
|
||||
column="35"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SetTextI18n"
|
||||
severity="Warning"
|
||||
message="String literal in `setText` can not be translated. Use Android resources instead."
|
||||
category="Internationalization"
|
||||
priority="6"
|
||||
summary="TextView Internationalization"
|
||||
explanation="When calling `TextView#setText`
* Never call `Number#toString()` to format numbers; it will not handle fraction separators and locale-specific digits properly. Consider using `String#format` with proper format specifications (`%d` or `%f`) instead.
* Do not pass a string literal (e.g. "Hello") to display text. Hardcoded text can not be properly translated to other languages. Consider using Android resource strings instead.
* Do not build messages by concatenating text chunks. Such messages can not be properly translated."
|
||||
url="https://developer.android.com/guide/topics/resources/localization.html"
|
||||
urls="https://developer.android.com/guide/topics/resources/localization.html"
|
||||
errorLine1=" holder.textStatus.setText("Pendente");"
|
||||
errorLine2=" ~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/java/com/example/cuida/ui/appointments/AppointmentAdapter.java"
|
||||
line="50"
|
||||
column="39"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SetTextI18n"
|
||||
severity="Warning"
|
||||
@@ -2383,12 +2401,28 @@
|
||||
priority="5"
|
||||
summary="Hardcoded text"
|
||||
explanation="Hardcoding text attributes directly in layout files is bad for several reasons:

* When creating configuration variations (for example for landscape or portrait) you have to repeat the actual text (and keep it up to date when making changes)

* The application cannot be translated to other languages by just adding new translations for existing string resources.

There are quickfixes to automatically extract this hardcoded string into a resource lookup."
|
||||
errorLine1=" android:text="Tipo de Consulta""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
errorLine1=" android:text="Tipo de Consulta""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml"
|
||||
line="23"
|
||||
column="13"/>
|
||||
line="28"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="HardcodedText"
|
||||
severity="Warning"
|
||||
message="Hardcoded string "Pendente", should use `@string` resource"
|
||||
category="Internationalization"
|
||||
priority="5"
|
||||
summary="Hardcoded text"
|
||||
explanation="Hardcoding text attributes directly in layout files is bad for several reasons:

* When creating configuration variations (for example for landscape or portrait) you have to repeat the actual text (and keep it up to date when making changes)

* The application cannot be translated to other languages by just adding new translations for existing string resources.

There are quickfixes to automatically extract this hardcoded string into a resource lookup."
|
||||
errorLine1=" android:text="Pendente""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml"
|
||||
line="37"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
@@ -2403,7 +2437,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml"
|
||||
line="38"
|
||||
line="56"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
@@ -2419,7 +2453,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml"
|
||||
line="45"
|
||||
line="63"
|
||||
column="17"/>
|
||||
</issue>
|
||||
|
||||
@@ -2435,7 +2469,7 @@
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/Users/230405/Desktop/papcuida/app/src/main/res/layout/item_appointment.xml"
|
||||
line="53"
|
||||
line="71"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user