still WIP progress checkout

This commit is contained in:
pegasko 2024-06-09 17:34:55 +03:00
parent 3de1749b0d
commit de2bdf4b91
48 changed files with 884 additions and 529 deletions

View file

@ -49,7 +49,7 @@ android {
}
dependencies {
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

View file

@ -1,4 +1,20 @@
package art.pegasko.yeeemp;
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp;
import android.database.sqlite.SQLiteDatabase;
import android.provider.CalendarContract;

View file

@ -1,3 +1,19 @@
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp;
import android.content.Context;

View file

@ -1,22 +1,6 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
@ -27,11 +11,15 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Yeeemp"
tools:targetApi="31" >
tools:targetApi="31">
<activity
android:name=".ui.activity.EventEditActivity"
android:theme="@style/Theme.Yeeemp.Red"
android:exported="false" />
<activity
android:name=".ui.activity.QueueListActivity"
android:exported="true"
android:theme="@style/Theme.Yeeemp.Green" >
android:theme="@style/Theme.Yeeemp.Green">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -40,9 +28,8 @@
</activity>
<activity
android:name=".ui.activity.EventListActivity"
android:exported="true"
android:theme="@style/Theme.Yeeemp.Green" >
</activity>
android:exported="false"
android:theme="@style/Theme.Yeeemp.Blue"></activity>
</application>
</manifest>

View file

@ -24,5 +24,6 @@ public interface Event {
void setComment(String comment);
void addTag(Tag tag);
void removeTag(Tag tag);
void removeTags();
Tag[] getTags();
}

View file

@ -19,4 +19,5 @@ package art.pegasko.yeeemp.base;
public interface EventMaker {
Event create();
void delete(Event event);
Event getById(int id);
}

View file

@ -31,7 +31,7 @@ import art.pegasko.yeeemp.base.TagMaker;
public class DBWrapper extends Wrapper {
public static final String TAG = DBWrapper.class.getSimpleName();
public static final boolean DEBUG = true;
public static final boolean DEBUG = false;
public DBWrapper(Context context) {
this.db = openDB(context);

View file

@ -171,6 +171,21 @@ public class EventImpl implements Event {
}
}
@Override
public void removeTags() {
synchronized (this.db) {
try {
db.delete(
"event_tag",
"event_id = ?",
new String[] { Integer.toString(this.getId()) }
);
} catch (SQLiteException e) {
Log.wtf(TAG, e);
}
}
}
@Override
public Tag[] getTags() {
synchronized (this.db) {

View file

@ -17,12 +17,14 @@
package art.pegasko.yeeemp.impl;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.util.Log;
import art.pegasko.yeeemp.base.Event;
import art.pegasko.yeeemp.base.EventMaker;
import art.pegasko.yeeemp.base.Queue;
public class EventMakerImpl implements EventMaker {
public static final String TAG = EventMakerImpl.class.getSimpleName();
@ -33,6 +35,31 @@ public class EventMakerImpl implements EventMaker {
this.db = db;
}
@Override
public Event getById(int id) {
synchronized (this.db) {
try {
Cursor cursor = db.query(
"event",
new String[] { "1" },
"id = ?",
new String[] { Integer.toString(id) },
null,
null,
null
);
if (Utils.findResult(cursor))
return new EventImpl(this.db, id);
} catch (SQLiteException e) {
Log.wtf(TAG, e);
}
return null;
}
}
@Override
public Event create() {
synchronized (this.db) {

View file

@ -90,7 +90,7 @@ public class QueueImpl implements Queue {
new String[] { Integer.toString(this.getId()) },
null,
null,
null
"event_id desc"
);
if (cursor == null) {

View file

@ -0,0 +1,46 @@
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp.okand.base;
import java.util.ArrayList;
import java.util.List;
import art.pegasko.yeeemp.base.Tag;
public class Event {
private int id;
private String comment;
private List<Tag> tags;
public Event() {
this.id = -1;
this.comment = null;
this.tags = new ArrayList<Tag>();
}
void setId(int id) {
this.id = id;
}
public int getId() {
return this.id;
}
public static Event get(int id) {
return Potato.getInstance().getById(id);
}
}

View file

@ -0,0 +1,33 @@
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp.okand.base;
public abstract class Potato {
private static Potato instance;
public static Potato getInstance() {
return Potato.instance;
}
public void setInstance(Potato instance) {
Potato.instance = instance;
}
public abstract Event getById(int id);
public abstract void save(Event container);
public abstract void delete(Event container);
}

View file

@ -0,0 +1,37 @@
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp.okand.impl;
import art.pegasko.yeeemp.okand.base.Event;
import art.pegasko.yeeemp.okand.base.Potato;
public class DBPotato extends Potato {
@Override
public Event getById(int id) {
return null;
}
@Override
public void save(Event container) {
}
@Override
public void delete(Event container) {
}
}

View file

@ -0,0 +1,202 @@
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp.ui.activity;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.util.TimeUtils;
import android.view.MenuItem;
import android.view.View;
import android.widget.DatePicker;
import android.widget.TextView;
import android.widget.TimePicker;
import com.google.android.material.snackbar.Snackbar;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Date;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import art.pegasko.yeeemp.base.Queue;
import art.pegasko.yeeemp.base.Tag;
import art.pegasko.yeeemp.databinding.ActivityEventEditBinding;
import art.pegasko.yeeemp.R;
import art.pegasko.yeeemp.base.Event;
import art.pegasko.yeeemp.base.Wrapper;
import art.pegasko.yeeemp.impl.Init;
public class EventEditActivity extends AppCompatActivity {
public static final String TAG = EventEditActivity.class.getSimpleName();
private Queue queue;
private Event event;
private EventContainer eventContainer;
private ActivityEventEditBinding binding;
/** Store values for edited or new event */
private static class EventContainer {
public String comment;
public long timestamp;
public ArrayList<String> tags;
public EventContainer() {
this.timestamp = System.currentTimeMillis();
this.tags = new ArrayList<String>();
this.comment = null;
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Init.initDB(getApplicationContext());
// Get Queue ID from Intent
Bundle extras = getIntent().getExtras();
if (extras == null) {
Log.e(TAG, "Missing Intent arguments (queue_id)");
finish();
return;
}
int queue_id = extras.getInt("queue_id", -1);
if (queue_id == -1) {
Log.e(TAG, "Missing Intent arguments (queue_id)");
finish();
return;
}
queue = Wrapper.getQueueMaker().getById(queue_id);
if (queue == null) {
Log.e(TAG, "Missing Intent arguments (queue_id)");
finish();
return;
}
// New edit container
this.eventContainer = new EventContainer();
// Get Event ID from Intent (optional)
extras = getIntent().getExtras();
if (extras != null) {
int event_id = extras.getInt("event_id", -1);
if (event_id != -1) {
this.event = Wrapper.getEventMaker().getById(event_id);
this.eventContainer.timestamp = this.event.getTimestamp();
this.eventContainer.comment = this.event.getComment();
for (Tag tag: this.event.getTags()) {
this.eventContainer.tags.add(tag.getName());
}
}
}
binding = ActivityEventEditBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
setSupportActionBar(binding.toolbar);
getSupportActionBar().setTitle(getSupportActionBar().getTitle() + " / " + (event == null ? "Create" : "Edit") + " Event");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
if (this.eventContainer.timestamp != 0)
binding.eventEditContent.eventEditTimestamp.setText(Utils.formatTs(this.eventContainer.timestamp));
if (this.eventContainer.comment != null)
binding.eventEditContent.eventEditComment.setText(this.eventContainer.comment);
binding.eventEditContent.eventEditContainerTimestamp.setOnClickListener((View view) -> {
Date date;
if (this.eventContainer.timestamp != 0)
date = new Date(this.eventContainer.timestamp);
else
date = new Date();
DatePickerDialog datePickerDialog = new DatePickerDialog(
view.getContext(),
(DatePicker datePicker, int year, int month, int day) -> {
TimePickerDialog timePickerDialog = new TimePickerDialog(
view.getContext(),
(TimePicker timePicker, int hour, int minute) -> {
Date newDate = new Date();
newDate.setYear(year - 1900);
newDate.setMonth(month);
newDate.setDate(day);
newDate.setHours(hour);
newDate.setMinutes(minute);
newDate.setSeconds(0);
this.eventContainer.timestamp = newDate.getTime();
binding.eventEditContent.eventEditTimestamp.setText(Utils.formatTs(this.eventContainer.timestamp));
},
date.getHours(), date.getMinutes(), true
);
timePickerDialog.show();
}, date.getYear() + 1900, date.getMonth(), date.getDate()
);
datePickerDialog.show();
});
/* FAB Listeners */
binding.fab.setOnLongClickListener((View view) -> {
Snackbar.make(view, "Save Event", Snackbar.LENGTH_LONG)
.setAnchorView(R.id.fab)
.setAction("Action", null).show();
return true;
});
binding.fab.setOnClickListener(view -> {
// Finalize values
this.eventContainer.comment = this.binding.eventEditContent.eventEditComment.getText().toString().trim();
// Fill event
if (this.event == null)
this.event = Wrapper.getEventMaker().create();
this.event.setTimestamp(this.eventContainer.timestamp);
this.event.removeTags();
for (String tag: this.eventContainer.tags) {
this.event.addTag(Wrapper.getTagMaker().getOrCreateInQueue(this.queue, tag));
}
this.event.setComment(this.eventContainer.comment);
finish();
});
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}
}

View file

@ -16,16 +16,23 @@
package art.pegasko.yeeemp.ui.activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import java.time.Duration;
import java.util.concurrent.ScheduledFuture;
import art.pegasko.yeeemp.R;
import art.pegasko.yeeemp.base.Event;
import art.pegasko.yeeemp.base.Queue;
@ -78,6 +85,9 @@ public class EventListActivity extends AppCompatActivity {
binding = ActivityEventListBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
setSupportActionBar(binding.toolbar);
getSupportActionBar().setTitle(getSupportActionBar().getTitle() + " / " + queue.getName());
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
/* Queue list */
eventListAdapter = new EventRecyclerViewAdapter(queue);
@ -85,6 +95,25 @@ public class EventListActivity extends AppCompatActivity {
eventList.setLayoutManager(new LinearLayoutManager(this));
eventList.setAdapter(eventListAdapter);
// /* Swipe delete */
// ItemTouchHelper.SimpleCallback swipeCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) {
// @Override
// public boolean onMove(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, @NonNull RecyclerView.ViewHolder target) {
// return false;
// }
//
// @Override
// public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) {
// Snackbar.make(viewHolder.itemView, "undo delete event", 5000)
// .setAnchorView(R.id.fab)
// .setAction("Action", (View view) -> {
//
// }).show();
//
// ScheduledFuture<?> future = eventListAdapter.scheduleDeleteAt(viewHolder.getAdapterPosition());
// }
// };
/* FAB Listeners */
binding.fab.setOnLongClickListener((View view) -> {
Snackbar.make(view, "Create Event", Snackbar.LENGTH_LONG)
@ -94,19 +123,44 @@ public class EventListActivity extends AppCompatActivity {
return true;
});
binding.fab.setOnClickListener(view -> {
Log.w(TAG, "TODO: Open editor");
Bundle extra = new Bundle();
extra.putInt("queue_id", this.queue.getId());
Event event = Wrapper.getEventMaker().create();
event.setTimestamp(System.currentTimeMillis());
event.setComment("Lobster number " + System.currentTimeMillis());
queue.addEvent(event);
Intent intent = new Intent(view.getContext(), EventEditActivity.class);
intent.putExtras(extra);
Log.w(TAG, "Create: " + event.toString() + " in " + queue);
view.getContext().startActivity(intent);
updateList();
// Log.w(TAG, "TODO: Open editor");
//
// Event event = Wrapper.getEventMaker().create();
// event.setTimestamp(System.currentTimeMillis());
// event.setComment("Lobster number " + System.currentTimeMillis());
// queue.addEvent(event);
//
// Log.w(TAG, "Create: " + event.toString() + " in " + queue);
// updateList();
});
/* Fill lists */
updateList();
}
@Override
protected void onResume() {
super.onResume();
/* Ekchualle we returned from somewhere */
updateList();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}
}

View file

@ -17,25 +17,30 @@
package art.pegasko.yeeemp.ui.activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.text.InputType;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.PopupMenu;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import art.pegasko.yeeemp.R;
import art.pegasko.yeeemp.base.Event;
import art.pegasko.yeeemp.base.Queue;
import art.pegasko.yeeemp.base.Tag;
import art.pegasko.yeeemp.base.Wrapper;
import art.pegasko.yeeemp.databinding.EventListItemBinding;
import art.pegasko.yeeemp.databinding.QueueListItemBinding;
class EventRecyclerViewAdapter extends RecyclerView.Adapter<EventRecyclerViewAdapter.ViewHolder> {
public static final String TAG = EventRecyclerViewAdapter.class.getSimpleName();
@ -62,8 +67,28 @@ class EventRecyclerViewAdapter extends RecyclerView.Adapter<EventRecyclerViewAda
@Override
public void onBindViewHolder(@NonNull ViewHolder viewHolder, int position) {
viewHolder.getBinding().eventListItemTags.removeAllViews();
Tag[] tags = this.events[position].getTags();
Log.w(TAG, "Tags: " + tags.length);
for (Tag tag: tags) {
TextView tagView = (TextView) (
LayoutInflater
.from(viewHolder.getBinding().getRoot().getContext())
.inflate(R.layout.event_list_item_tag, null, false)
);
tagView.setText(tag.getName());
viewHolder.getBinding().eventListItemTags.addView(tagView);
}
viewHolder.getBinding().eventListItemTimestamp.setText(Utils.formatTs(events[position].getTimestamp()));
String comment = events[position].getComment();
if (comment != null && !comment.isEmpty()) {
viewHolder.getBinding().eventListItemComment.setVisibility(View.VISIBLE);
viewHolder.getBinding().eventListItemComment.setText(comment);
}
viewHolder.getBinding().eventListItemItem.setOnLongClickListener((View view) -> {
PopupMenu popupMenu = new PopupMenu(view.getContext(), viewHolder.getBinding().eventListItemItem);
popupMenu.getMenuInflater().inflate(R.menu.event_list_item_action_menu, popupMenu.getMenu());
@ -88,8 +113,16 @@ class EventRecyclerViewAdapter extends RecyclerView.Adapter<EventRecyclerViewAda
return true;
});
viewHolder.getBinding().eventListItemItem.setOnClickListener((View view) -> {
Bundle extra = new Bundle();
extra.putInt("event_id", this.events[position].getId());
extra.putInt("queue_id", this.queue.getId());
// viewHolder.queueStats.setText(Integer.toString(events[position].getEventCount()));
Intent intent = new Intent(view.getContext(), EventEditActivity.class);
intent.putExtras(extra);
view.getContext().startActivity(intent);
});
}
@Override
@ -114,4 +147,19 @@ class EventRecyclerViewAdapter extends RecyclerView.Adapter<EventRecyclerViewAda
this.events = this.queue.getEvents();
this.notifyDataSetChanged();
}
// public ScheduledFuture<?> scheduleDeleteAt(int position) {
// ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
// ScheduledFuture<?> future = scheduledExecutorService.schedule(() -> {
// try {
// Wrapper.getEventMaker().delete(this.events[position]);
// } catch (Exception e) {
// Log.wtf(TAG, e);
// }
// }, 5, TimeUnit.SECONDS);
//
// // Hide item from list
//
// return future;
// }
}

View file

@ -35,6 +35,7 @@ import androidx.recyclerview.widget.RecyclerView;
import art.pegasko.yeeemp.R;
import art.pegasko.yeeemp.base.Event;
import art.pegasko.yeeemp.base.Queue;
import art.pegasko.yeeemp.base.Tag;
import art.pegasko.yeeemp.base.Wrapper;
import art.pegasko.yeeemp.databinding.QueueListItemBinding;
@ -114,16 +115,35 @@ class QueueRecyclerViewAdapter extends RecyclerView.Adapter<QueueRecyclerViewAda
viewHolder.getBinding().queueListItemStats.setText(Integer.toString(queues[position].getEventCount()));
viewHolder.getBinding().queueListItemPlus.setOnClickListener((View view) -> {
Log.w(TAG, "TODO: Open editor");
Intent intent = new Intent(view.getContext(), EventEditActivity.class);
view.getContext().startActivity(intent);
Event event = Wrapper.getEventMaker().create();
event.setTimestamp(System.currentTimeMillis());
event.setComment("Lobster number " + System.currentTimeMillis());
queues[position].addEvent(event);
Log.w(TAG, "Create: " + event.toString() + " in " + queues[position]);
reloadItems();
// Log.w(TAG, "TODO: Open editor");
//
// Event event = Wrapper.getEventMaker().create();
// event.setTimestamp(System.currentTimeMillis());
// event.setComment("Lobster number " + System.currentTimeMillis() + "\n" + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
// queues[position].addEvent(event);
//
// Tag[] tags = new Tag[] {
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_cum"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_poo"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_fart"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_penis"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_dick"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_cock"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_zalupa"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_ololo"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_owo"),
// Wrapper.getTagMaker().getOrCreateInQueue(queues[position], "tag_" + position + "_uwu"),
// };
// for (Tag tag: tags) {
// event.addTag(tag);
// }
//
// Log.w(TAG, "Create: " + event.toString() + " in " + queues[position]);
//
// reloadItems();
});
}

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"

View file

@ -0,0 +1,17 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:topRightRadius="@dimen/box_radius"
android:topLeftRadius="@dimen/box_radius"
android:bottomRightRadius="@dimen/box_radius"
android:bottomLeftRadius="@dimen/box_radius" />
<solid
android:color="@color/pegasko_black" />
<!-- <stroke-->
<!-- android:width="@dimen/box_stroke"-->
<!-- android:color="@android:color/transparent" />-->
</shape>

View file

@ -0,0 +1,13 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:topRightRadius="@dimen/box_radius"
android:topLeftRadius="@dimen/box_radius"
android:bottomRightRadius="@dimen/box_radius"
android:bottomLeftRadius="@dimen/box_radius" />
<solid
android:color="@color/pegasko_red" />
</shape>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"

View file

@ -1,32 +0,0 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp" />
<solid
android:color="@color/pegasko_dark" />
<stroke
android:width="@dimen/pegasko_list_item_content_margin"
android:color="@color/pegasko_black" />
</shape>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:width="@dimen/tag_divider_width"
android:height="@dimen/tag_divider_height" />
<solid android:color="@android:color/transparent" />
</shape>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.activity.EventEditActivity" >
<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:titleTextColor="@color/pegasko_white"
android:background="@color/pegasko_dark" />
</com.google.android.material.appbar.AppBarLayout>
<include android:id="@+id/event_edit_content" layout="@layout/content_event_edit"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginEnd="@dimen/fab_margin"
android:layout_marginBottom="16dp"
app:srcCompat="@android:drawable/ic_menu_edit"
android:backgroundTint="@color/pegasko_red" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"

View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/pegasko_black"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="@dimen/event_edit_box_margin"
android:id="@+id/event_edit_container_timestamp"
android:background="@drawable/box_red" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/event_edit_hint_margin"
android:paddingLeft="@dimen/event_edit_hint_padding_left"
android:text="Time"
android:textSize="@dimen/event_edit_hint_text"
android:textColor="@color/pegasko_black"
android:textStyle="bold" />
<TextView
android:id="@+id/event_edit_timestamp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/event_edit_timestamp_margin"
android:background="@drawable/box_black"
android:gravity="center"
android:padding="@dimen/event_edit_timestamp_padding"
android:text="Timestamp"
android:textColor="@color/pegasko_white"
android:textSize="@dimen/event_edit_timestamp_text"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="@dimen/event_edit_box_margin"
android:background="@drawable/box_red" >
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/event_edit_hint_margin"
android:paddingLeft="@dimen/event_edit_hint_padding_left"
android:text="Comment"
android:textSize="@dimen/event_edit_hint_text"
android:textColor="@color/pegasko_black"
android:textStyle="bold" />
<EditText
android:id="@+id/event_edit_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/event_edit_comment_margin"
android:background="@drawable/box_black"
android:cursorVisible="true"
android:gravity="start|left"
android:inputType="textMultiLine"
android:padding="@dimen/event_edit_comment_padding"
android:scrollbars="vertical"
android:singleLine="false"
android:text="lonk message (very very very long, trust me, i'm sure that is is very loooooooooooooooonk so will fit many lines and still be very very loooooooooooooooooooooooooooooooooonk"
android:textColor="@color/pegasko_white"
android:textSize="@dimen/event_edit_comment_text">
</EditText>
</LinearLayout>
</LinearLayout>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -30,7 +14,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="@dimen/pegasko_list_item_content_margin"
android:padding="@dimen/queue_list_item_content_margin"
android:id="@+id/content_event_list__list" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -30,7 +14,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:padding="@dimen/pegasko_list_item_content_margin"
android:padding="@dimen/queue_list_item_content_margin"
android:id="@+id/content_queue_list__list" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -25,14 +9,14 @@
android:id="@+id/event_list_item__item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/pegasko_list_item_content_margin"
android:layout_margin="@dimen/queue_list_item_content_margin"
android:layout_weight="1"
android:background="@color/pegasko_blue"
android:gravity="center"
android:padding="@dimen/pegasko_list_item_main_padding">
android:padding="@dimen/queue_list_item_main_padding">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
@ -41,35 +25,47 @@
android:id="@+id/event_list_item__timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/pegasko_list_item_title_margin"
android:layout_margin="@dimen/event_list_item_timestamp_margin"
android:fontFamily="monospace"
android:text="TextView"
android:textAlignment="viewStart"
android:textColor="@color/pegasko_black"
android:textSize="@dimen/pegasko_list_item_title"
android:textColor="@color/pegasko_white"
android:textSize="@dimen/event_list_item_timestamp_text"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="@dimen/pegasko_list_item_plus_width"
android:layout_height="match_parent"
android:layout_margin="@dimen/pegasko_list_item_content_margin"
android:background="@color/pegasko_blue"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:id="@+id/event_list_item__comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/event_list_item_comment_margin"
android:fontFamily="monospace"
android:text="+"
android:textAlignment="viewStart"
android:textColor="@color/pegasko_black"
android:textSize="@dimen/pegasko_list_item_plus"
android:text="TextView"
android:textAlignment="center"
android:visibility="gone"
android:padding="@dimen/event_list_item_comment_padding"
android:textColor="@color/pegasko_white"
android:textSize="@dimen/event_list_item_comment_text"
android:background="@drawable/box_black"
android:textStyle="bold" />
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/event_list_item_tags"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/event_list_item_tags_margin"
android:padding="@dimen/event_list_item_tags_padding"
app:alignContent="flex_start"
app:alignItems="flex_start"
app:flexDirection="row"
app:flexWrap="wrap"
app:showDivider="beginning|middle"
app:dividerDrawable="@drawable/tag_divider"
app:justifyContent="flex_start" >
</com.google.android.flexbox.FlexboxLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/event_list_item_tag_padding"
android:layout_margin="@dimen/event_list_item_tag_margin"
android:background="@color/pegasko_black"
android:textColor="@color/pegasko_white"
android:text="sample_tag" >
</TextView>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
@ -25,11 +9,11 @@
android:id="@+id/queue_list_item__item"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/pegasko_list_item_content_margin"
android:layout_margin="@dimen/queue_list_item_content_margin"
android:layout_weight="1"
android:background="@color/pegasko_green"
android:gravity="center"
android:padding="@dimen/pegasko_list_item_main_padding">
android:padding="@dimen/queue_list_item_main_padding">
<LinearLayout
android:layout_width="wrap_content"
@ -41,24 +25,24 @@
android:id="@+id/queue_list_item__title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/pegasko_list_item_title_margin"
android:layout_margin="@dimen/queue_list_item_title_margin"
android:fontFamily="monospace"
android:text="TextView"
android:textAlignment="viewStart"
android:textColor="@color/pegasko_black"
android:textSize="@dimen/pegasko_list_item_title"
android:textSize="@dimen/queue_list_item_title_text"
android:textStyle="bold" />
<TextView
android:id="@+id/queue_list_item__stats"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/pegasko_list_item_subtitle_margin"
android:layout_margin="@dimen/queue_list_item_subtitle_margin"
android:fontFamily="monospace"
android:text="TextView"
android:textAlignment="viewStart"
android:textColor="@color/pegasko_black"
android:textSize="@dimen/pegasko_list_item_subtitle"
android:textSize="@dimen/queue_list_item_subtitle"
android:textStyle="bold" />
</LinearLayout>
@ -67,9 +51,9 @@
<LinearLayout
android:id="@+id/queue_list_item__plus"
android:layout_width="@dimen/pegasko_list_item_plus_width"
android:layout_width="@dimen/queue_list_item_plus_width"
android:layout_height="match_parent"
android:layout_margin="@dimen/pegasko_list_item_content_margin"
android:layout_margin="@dimen/queue_list_item_content_margin"
android:background="@color/pegasko_green"
android:gravity="center">
@ -80,7 +64,7 @@
android:text="+"
android:textAlignment="viewStart"
android:textColor="@color/pegasko_black"
android:textSize="@dimen/pegasko_list_item_plus"
android:textSize="@dimen/queue_list_item_plus_text"
android:textStyle="bold" />
</LinearLayout>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<dimen name="fab_margin">48dp</dimen>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Yeeemp.Green" parent="Theme.MaterialComponents.DayNight.DarkActionBar">

View file

@ -1,23 +1,19 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Yeeemp.Green" parent="Base.Theme.Yeeemp.Green">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Yeeemp.Blue" parent="Base.Theme.Yeeemp.Blue">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="Theme.Yeeemp.Red" parent="Base.Theme.Yeeemp.Red">
<item name="android:navigationBarColor">@color/pegasko_dark</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<dimen name="fab_margin">200dp</dimen>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<dimen name="fab_margin">48dp</dimen>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>

View file

@ -1,35 +1,57 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="pegasko_list_item_size">80dp</dimen>
<dimen name="pegasko_list_item_padding">8dp</dimen>
<dimen name="queue_list_item_size">80dp</dimen>
<dimen name="queue_list_item_padding">8dp</dimen>
<dimen name="pegasko_list_item_main_padding">8dp</dimen>
<dimen name="queue_list_item_main_padding">8dp</dimen>
<dimen name="pegasko_list_item_title">24sp</dimen>
<dimen name="pegasko_list_item_title_margin">4dp</dimen>
<dimen name="queue_list_item_title_text">24sp</dimen>
<dimen name="queue_list_item_title_margin">4dp</dimen>
<dimen name="pegasko_list_item_subtitle">12sp</dimen>
<dimen name="pegasko_list_item_subtitle_margin">2dp</dimen>
<dimen name="queue_list_item_subtitle">12sp</dimen>
<dimen name="queue_list_item_subtitle_margin">2dp</dimen>
<dimen name="pegasko_list_item_plus">32sp</dimen>
<dimen name="pegasko_list_item_plus_width">80dp</dimen>
<dimen name="queue_list_item_plus_text">32sp</dimen>
<dimen name="queue_list_item_plus_width">80dp</dimen>
<dimen name="pegasko_list_item_content_margin">2dp</dimen>
<dimen name="queue_list_item_content_margin">2dp</dimen>
<dimen name="event_list_item_timestamp_text">16sp</dimen>
<dimen name="event_list_item_timestamp_margin">4dp</dimen>
<dimen name="event_list_item_comment_text">12sp</dimen>
<dimen name="event_list_item_comment_margin">4dp</dimen>
<dimen name="event_list_item_comment_padding">4dp</dimen>
<dimen name="event_list_item_plus">32sp</dimen>
<dimen name="event_list_item_plus_width">80dp</dimen>
<dimen name="event_list_item_tags_margin">0dp</dimen>
<dimen name="event_list_item_tags_padding">0dp</dimen>
<dimen name="event_list_item_tag_padding">4dp</dimen>
<dimen name="event_list_item_tag_margin">0dp</dimen>
<dimen name="event_list_item_content_margin">2dp</dimen>
<dimen name="box_radius">2dp</dimen>
<dimen name="box_stroke">2dp</dimen>
<dimen name="tag_divider_width">4dp</dimen>
<dimen name="tag_divider_height">4dp</dimen>
<dimen name="event_edit_box_margin">2dp</dimen>
<dimen name="event_edit_hint_margin">0dp</dimen>
<dimen name="event_edit_hint_padding_left">2dp</dimen>
<dimen name="event_edit_hint_text">16sp</dimen>
<dimen name="event_edit_timestamp_margin">8dp</dimen>
<dimen name="event_edit_timestamp_padding">4dp</dimen>
<dimen name="event_edit_timestamp_text">24sp</dimen>
<dimen name="event_edit_comment_margin">8dp</dimen>
<dimen name="event_edit_comment_padding">4dp</dimen>
<dimen name="event_edit_comment_text">12sp</dimen>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<string name="app_name">Yeeemp</string>
<!-- Strings used for fragments for navigation -->

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Yeeemp" parent="ThemeOverlay.MaterialComponents.Dark">
@ -23,14 +7,14 @@
<item name="colorOnPrimary">@color/pegasko_white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/pegasko_black</item>
<item name="colorSecondaryVariant">@color/pegasko_dark</item>
<item name="colorOnSecondary">@color/pegasko_black</item>
<item name="colorPrimary">@color/pegasko_white</item>
<item name="colorPrimaryVariant">@color/pegasko_light</item>
<item name="colorOnPrimary">@color/pegasko_white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_white</item>
<item name="statusBarBackground">@color/pegasko_white</item>
<item name="statusBarForeground">@color/pegasko_light</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Base application theme. -->
@ -38,17 +22,17 @@
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_white</item>
<item name="colorPrimaryVariant">@color/pegasko_light</item>
<item name="colorOnPrimary">@color/pegasko_black</item>
<item name="colorOnPrimary">@color/pegasko_light</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/pegasko_black</item>
<item name="colorSecondaryVariant">@color/pegasko_dark</item>
<item name="colorOnSecondary">@color/pegasko_black</item>
<item name="colorSecondary">@color/pegasko_white</item>
<item name="colorSecondaryVariant">@color/pegasko_light</item>
<item name="colorOnSecondary">@color/pegasko_light</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_white</item>
<item name="statusBarBackground">@color/pegasko_white</item>
<item name="statusBarForeground">@color/pegasko_light</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Green application theme. -->
@ -56,17 +40,17 @@
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_green</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_green</item>
<item name="colorOnPrimary">@color/pegasko_black</item>
<item name="colorOnPrimary">@color/pegasko_dark_green</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/pegasko_black</item>
<item name="colorSecondaryVariant">@color/pegasko_dark</item>
<item name="colorOnSecondary">@color/pegasko_black</item>
<item name="colorSecondary">@color/pegasko_green</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_green</item>
<item name="colorOnSecondary">@color/pegasko_dark_green</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_green</item>
<item name="statusBarBackground">@color/pegasko_green</item>
<item name="statusBarForeground">@color/pegasko_dark_green</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- Blue application theme. -->
@ -74,27 +58,35 @@
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_blue</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_blue</item>
<item name="colorOnPrimary">@color/pegasko_black</item>
<item name="colorOnPrimary">@color/pegasko_dark_blue</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/pegasko_black</item>
<item name="colorSecondaryVariant">@color/pegasko_dark</item>
<item name="colorOnSecondary">@color/pegasko_black</item>
<item name="colorSecondary">@color/pegasko_blue</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_blue</item>
<item name="colorOnSecondary">@color/pegasko_dark_blue</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_blue</item>
<item name="statusBarBackground">@color/pegasko_blue</item>
<item name="statusBarForeground">@color/pegasko_dark_blue</item>
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
<!-- &lt;!&ndash; Base application theme. &ndash;&gt;-->
<!-- <style name="action_bar_green" parent="Theme.Material3.DayNight">-->
<!-- &lt;!&ndash; Status bar color. &ndash;&gt;-->
<!-- <item name="android:statusBarColor">@color/pegasko_green</item>-->
<!-- <item name="statusBarBackground">@color/pegasko_black</item>-->
<!-- <item name="statusBarForeground">@color/pegasko_blue</item>-->
<!-- Red application theme. -->
<style name="Base.Theme.Yeeemp.Red" parent="Base.Theme.Yeeemp">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/pegasko_red</item>
<item name="colorPrimaryVariant">@color/pegasko_dark_red</item>
<item name="colorOnPrimary">@color/pegasko_dark_red</item>
<!-- &lt;!&ndash; Customize your theme here. &ndash;&gt;-->
<!-- </style>-->
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/pegasko_red</item>
<item name="colorSecondaryVariant">@color/pegasko_dark_red</item>
<item name="colorOnSecondary">@color/pegasko_dark_red</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/pegasko_dark</item>
<item name="statusBarBackground">@color/pegasko_dark</item>
<item name="statusBarForeground">@color/pegasko_dark</item>
</style>
</resources>

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup

View file

@ -1,19 +1,3 @@
<!--
Copyright 2024 pegasko
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes

View file

@ -1,4 +1,20 @@
package art.pegasko.yeeemp;
/**
* Copyright 2024 pegasko
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package art.pegasko.yeeemp;
import org.junit.Test;