Skip to content

Commit

Permalink
Merge pull request #195 from Crazy-Marvin/development
Browse files Browse the repository at this point in the history
To Don't v2.0
  • Loading branch information
CrazyMarvin authored Dec 20, 2022
2 parents 5be6b47 + 75002fb commit d2271ca
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 27 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "rocks.poopjournal.todont"
minSdkVersion 21
targetSdkVersion 33
versionCode 9
versionName "1.9"
versionCode 10
versionName "2.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,36 @@ else if(Helper.habitsdata.size()==0){
floatingActionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(Helper.labels_array.size()==0){
Toast.makeText(getActivity(), "Please Add a Label First",
Toast.LENGTH_LONG).show();
}
else{
final SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
final String formattedDate = df.format(c);
final Dialog d = new Dialog(getActivity());
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
d.setContentView(R.layout.dialogbox_floatingbutton);
Button btndone=d.findViewById(R.id.btndone);
Button btndone = d.findViewById(R.id.btndone);
WindowManager.LayoutParams lp = d.getWindow().getAttributes();
lp.dimAmount=0.9f;
lp.dimAmount = 0.9f;
d.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Window window = d.getWindow();
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
d.getWindow().setAttributes(lp);

final Spinner spinner = d.findViewById(R.id.spinner);
final TextView txt=d.findViewById(R.id.txt);
if(Helper.labels_array.size()==0){
final TextView txt = d.findViewById(R.id.txt);
if (Helper.labels_array.size() == 0) {
txt.setVisibility(View.VISIBLE);
spinner.setVisibility(View.INVISIBLE);
}
else{
} else {
txt.setVisibility(View.INVISIBLE);
spinner.setVisibility(View.VISIBLE);
}


ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(),android.R.layout.simple_spinner_item,Helper.labels_array);
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, Helper.labels_array);
arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(arrayAdapter);

Expand All @@ -124,7 +128,7 @@ public void onClick(View view) {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
catagoryselected = adapterView.getItemAtPosition(i).toString();
// if(Helper.isnightmodeon.equals("no")){
((TextView) adapterView.getChildAt(0)).setTextColor(getResources().getColor(R.color.textcolor));
((TextView) adapterView.getChildAt(0)).setTextColor(getResources().getColor(R.color.textcolor));
//
// }
// else if(Helper.isnightmodeon.equals("yes")){
Expand Down Expand Up @@ -154,28 +158,27 @@ public void onClick(View view) {

} catch (SQLiteException e) {
}
if(habit_text.equals("")){
if (habit_text.equals("")) {

}
db.insert_habits(Helper.habitsdata.size(),formattedDate, habit_text, detail_text, catagoryselected);
db.insert_habits(Helper.habitsdata.size(), formattedDate, habit_text, detail_text, catagoryselected);
db.show_habits_data();

Helper.SelectedButtonOfTodayTab=0;
Intent i=new Intent(getActivity(), MainActivity.class);
Helper.SelectedButtonOfTodayTab = 0;
Intent i = new Intent(getActivity(), MainActivity.class);
startActivity(i);
getActivity().overridePendingTransition(0,0);
getActivity().overridePendingTransition(0, 0);
d.dismiss();
}

});
spinner.setAdapter(arrayAdapter);
d.show();


}
}
});


// floatingActionButton.setOnClickListener(new View.OnClickListener() {
// @SuppressLint("ResourceAsColor")
// @Override
Expand Down Expand Up @@ -335,4 +338,4 @@ public void onClick(DialogInterface dialog, int id) {

}
};
}
}
16 changes: 16 additions & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,20 @@
<string name="contribute">Contribuisci</string>
<string name="developer">Sviluppatore</string>
<string name="apachelicense">Licenza Apache 2.0</string>
<string name="onboarding_reverse">La lista delle cose da fare inversa</string>
<string name="onboarding_bad">Annota le tue cattive abitudini. Ogni giorno, segna</string>
<string name="onboarding_gavein">quelle a cui hai ceduto. E la prossima</string>
<string name="onboarding_freshlist">mattina inizia con la nuova lista.</string>
<string name="onboarding_continue">Continua</string>
<string name="addtask">Inserisci attività</string>
<string name="note">Nota</string>
<string name="save">Salva</string>
<string name="dark">Scuro</string>
<string name="light">Chiaro</string>
<string name="update">Aggiorna</string>
<string name="toast_system">To Don\'t ora segue il tuo sistema.</string>
<string name="toast_light">To Don\'t ora segue il tema chiaro.</string>
<string name="toast_dark">To Don\'t ora segue il tema scuro.</string>
# Here are the non-translateable strings
<string name="contentDescription_FAB">Aggiungi un nuovo oggetto To Don\'t</string>
</resources>
16 changes: 16 additions & 0 deletions app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,20 @@
<string name="junit">JUnit</string>
<string name="eclipse">Eclipse Public License 1.0</string>
<string name="feather">Feather Icons</string>
<string name="light">Світлий</string>
<string name="toast_dark">To Don\'t тепер на темному боці.</string>
# Here are the non-translateable strings
<string name="onboarding_reverse">Обернений список справ</string>
<string name="onboarding_bad">Запишіть свої погані звички. Щодня, викреслюйте</string>
<string name="onboarding_gavein">ті, яким піддалися. А наступного</string>
<string name="onboarding_freshlist">ранку почніть з новим списком.</string>
<string name="onboarding_continue">Продовжити</string>
<string name="addtask">Додати задачу</string>
<string name="note">Нотатка</string>
<string name="save">Зберегти</string>
<string name="dark">Темний</string>
<string name="update">Оновити</string>
<string name="toast_system">To Don\'t тепер слідкує за вашою системою.</string>
<string name="toast_light">To Don\'t тепер на світлому боці.</string>
<string name="contentDescription_FAB">Додати новий пункт To Don\'t</string>
</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.7.21"
ext.kotlin_version = "1.7.22"
repositories {
google()
jcenter()
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- 🐛 Prevent users from creating bad habits without a label to prevent app crashes (#187)
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it/changelogs/3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Piccoli miglioramenti
Risolta configurazione fastlane
2 changes: 2 additions & 0 deletions fastlane/metadata/android/it/changelogs/4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Aggiornamenti delle traduzioni 🗺️
- Restate sintonizzati per le correzioni di bug 🦟
1 change: 1 addition & 0 deletions fastlane/metadata/android/it/changelogs/5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Aggiornate dipendenze 🔩
3 changes: 3 additions & 0 deletions fastlane/metadata/android/it/changelogs/6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Aggiornamenti delle traduzioni 🗺️

Sentiti il benvenuto per inviare feedback via e-mail, aprire issue su GitHub o aiutare a tradurre. 💓
5 changes: 5 additions & 0 deletions fastlane/metadata/android/it/changelogs/7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Miglioramenti UX 🦋
- Piccole correzioni di bug 🐛
- Aggiornamento delle traduzioni 🗺️

Sentiti il benvenuto per inviare feedback via e-mail, aprire issue su GitHub o aiutare a tradurre. 💓
1 change: 1 addition & 0 deletions fastlane/metadata/android/it/changelogs/8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Risolti i problemi di linting 🐛
4 changes: 4 additions & 0 deletions fastlane/metadata/android/it/changelogs/9.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Molti bug risolti grazie a subeep 🐛
- Passare alla grafica vettoriale per una visione più nitida grazie a karthikayya 🎨
- Aggiornamenti delle dipendenze ⚙️
- Aggiornamenti delle traduzioni 🗺️
9 changes: 3 additions & 6 deletions fastlane/metadata/android/it/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<b>Tieni d'occhio i tuoi progressi</b> Il Diario ti dà un'idea delle tue percentuali complessive di successo e individua la cattiva abitudine a cui sei stato più legato — nel corso di una settimana, un mese o un anno. Così puoi facilmente lavorare per migliorare la tua persona.


Pagina web:
<a href="https://www.crazymarvin.com/todont">https://www.crazymarvin.com/todont</a>
Traduci per non farlo:
<a href="https://hosted.weblate.org/engage/todont/">https://hosted.weblate.org/engage/todont/</a>
Fonte su GitHub:
<a href="https://github.com/Crazy-Marvin/ToDont">https://github.com/Crazy-Marvin/ToDont</a>
Pagina web: <a href="https://www.crazymarvin.com/todont">https://www.crazymarvin.com/todont</a>
Traduci To Don't: <a href="https://hosted.weblate.org/engage/todont/">https://hosted.weblate.org/engage/todont/</a>
Fonte su GitHub: <a href="https://github.com/Crazy-Marvin/ToDont">https://github.com/Crazy-Marvin/ToDont</a>
3 changes: 1 addition & 2 deletions fastlane/metadata/android/uk/changelogs/6.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- Покращення корист. досвіду 🦋
- Малі виправлення помилок 🐛
- Покращення перекладу 🦋

Не соромтеся надсилати відгуки електронною поштою, зазначати помилки на GitHub або допомагати в перекладі. 💓

0 comments on commit d2271ca

Please sign in to comment.