Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes are documented here. The project follows Semantic Versioning after `1.0.0`.

## Unreleased

### Changed

- New visual style modeled on OmniTavern's classic light/dark themes: neutral cool-gray backgrounds, slate text, a `#199AFF` accent, and a GitHub-dark-style night palette in place of the Material default purple.
- Home lists characters as flat rows with hairline dividers and 48dp rounded-square avatars instead of floating cards; initial-letter avatars use a saturated palette.
- Chat bubbles use a light shadow instead of an outline, the back button is a vector chevron, and the search and message inputs are bordered pills.

### Fixed

- The create-character button no longer renders in Material's default teal; the theme now sets `colorSecondary` to the app accent.

## 0.4.1 - 2026-09-12

### Added
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/com/zcz/javatavern/ui/CharacterAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public interface OnCharacterEditListener {
}

private static final String RESOURCE_PREFIX = "res:";
// Stored accent colors are muted hash-derived RGB; map them onto a saturated palette at render time.
private static final int[] AVATAR_PALETTE = {
0xFF3B82F6, 0xFF6366F1, 0xFF8B5CF6, 0xFFEC4899, 0xFFF43F5E,
0xFFF97316, 0xFFF59E0B, 0xFF10B981, 0xFF14B8A6, 0xFF0EA5E9
};
private final List<HomeFeedItem> items;
private final OnCharacterClickListener listener;
private final OnCharacterEditListener editListener;
Expand Down Expand Up @@ -150,8 +155,9 @@ private void renderInitialFallback(CharacterViewHolder holder, CharacterProfile
holder.portrait.setVisibility(View.GONE);
holder.initialAvatar.setText(character.getName().substring(0, 1));
GradientDrawable background = new GradientDrawable();
background.setShape(GradientDrawable.OVAL);
background.setColor(character.getAccentColor());
background.setShape(GradientDrawable.RECTANGLE);
background.setCornerRadius(12f * holder.itemView.getResources().getDisplayMetrics().density);
background.setColor(AVATAR_PALETTE[Math.floorMod(character.getAccentColor(), AVATAR_PALETTE.length)]);
holder.initialAvatar.setBackground(background);
holder.initialAvatar.setVisibility(View.VISIBLE);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/bg_agent_badge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/primary_soft" />
<corners android:radius="20dp" />
<corners android:radius="8dp" />
</shape>
7 changes: 2 additions & 5 deletions app/src/main/res/drawable/bg_agent_card.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="0"
android:endColor="#FFFFFF"
android:startColor="#F0EAF8" />
<solid android:color="@color/surface" />
<corners android:radius="18dp" />
<stroke
android:width="1dp"
android:color="@color/primary_soft" />
android:color="@color/border" />
</shape>
19 changes: 11 additions & 8 deletions app/src/main/res/drawable/bg_character_card.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/surface" />
<corners android:radius="22dp" />
<stroke
android:width="1dp"
android:color="@color/border" />
</shape>
<!-- Flat list row: hairline divider inset past the 48dp avatar (10dp padding + 48dp + 12dp gap). -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:height="1dp"
android:gravity="bottom"
android:left="70dp">
<shape android:shape="rectangle">
<solid android:color="@color/divider" />
</shape>
</item>
</layer-list>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/bg_character_tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/primary_soft" />
<corners android:radius="10dp" />
<corners android:radius="8dp" />
</shape>
5 changes: 4 additions & 1 deletion app/src/main/res/drawable/bg_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/input_background" />
<corners android:radius="18dp" />
<corners android:radius="22dp" />
<stroke
android:width="1dp"
android:color="@color/border" />
</shape>
3 changes: 0 additions & 3 deletions app/src/main/res/drawable/bg_message_assistant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
android:shape="rectangle">
<solid android:color="@color/surface" />
<corners android:radius="18dp" />
<stroke
android:width="1dp"
android:color="@color/border" />
</shape>
45 changes: 29 additions & 16 deletions app/src/main/res/layout/activity_chat.xml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_height="56dp"
android:background="@color/surface"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="12dp"
android:paddingEnd="16dp">
android:paddingStart="4dp"
android:paddingEnd="8dp">

<TextView
<ImageButton
android:id="@+id/backButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:text="@string/back_symbol"
android:textColor="@color/text_primary"
android:textSize="34sp" />
android:contentDescription="@string/navigate_back"
android:src="@drawable/ic_chevron_left"
app:tint="@color/text_primary" />

<TextView
android:id="@+id/chatTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textColor="@color/text_primary"
android:textSize="19sp"
android:textStyle="bold" />
android:textSize="17sp" />

<com.google.android.material.button.MaterialButton
android:id="@+id/memoryButton"
Expand All @@ -50,6 +50,11 @@
android:text="@string/search" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider" />

<LinearLayout
android:id="@+id/offlineBanner"
android:layout_width="match_parent"
Expand Down Expand Up @@ -91,11 +96,16 @@
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:paddingStart="14dp"
android:paddingTop="14dp"
android:paddingEnd="14dp"
android:paddingStart="12dp"
android:paddingTop="12dp"
android:paddingEnd="12dp"
android:paddingBottom="8dp" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider" />

<LinearLayout
android:id="@+id/composerArea"
android:layout_width="match_parent"
Expand Down Expand Up @@ -204,7 +214,10 @@
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginStart="8dp"
android:text="@string/send" />
android:insetTop="3dp"
android:insetBottom="3dp"
android:text="@string/send"
app:cornerRadius="22dp" />

</LinearLayout>
</LinearLayout>
Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="@string/home_title"
android:textColor="@color/text_primary"
android:textSize="28sp"
android:textStyle="bold" />
android:textSize="22sp" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="2dp"
android:text="@string/home_subtitle"
android:textColor="@color/text_secondary"
android:textSize="14sp" />
android:textSize="13sp" />
</LinearLayout>

<TextView
Expand Down Expand Up @@ -76,9 +76,9 @@
<EditText
android:id="@+id/searchInput"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="44dp"
android:layout_marginStart="20dp"
android:layout_marginTop="16dp"
android:layout_marginTop="14dp"
android:layout_marginEnd="20dp"
android:background="@drawable/bg_input"
android:hint="@string/search_characters"
Expand Down Expand Up @@ -122,11 +122,11 @@
android:id="@+id/characterList"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_marginTop="6dp"
android:layout_weight="1"
android:clipToPadding="false"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:paddingBottom="88dp" />
</LinearLayout>

Expand Down
31 changes: 15 additions & 16 deletions app/src/main/res/layout/item_character.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:background="@drawable/bg_character_card"
android:clickable="true"
android:elevation="3dp"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:minHeight="96dp"
android:minHeight="72dp"
android:orientation="horizontal"
android:padding="16dp">
android:paddingStart="10dp"
android:paddingTop="12dp"
android:paddingEnd="4dp"
android:paddingBottom="12dp">

<FrameLayout
android:layout_width="56dp"
android:layout_height="56dp">
android:layout_width="48dp"
android:layout_height="48dp">

<TextView
android:id="@+id/characterAvatar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="sans-serif-medium"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="21sp"
android:textStyle="bold" />
android:textSize="18sp" />

<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/characterPortrait"
Expand All @@ -34,15 +35,13 @@
android:contentDescription="@string/character_portrait_desc"
android:scaleType="centerCrop"
android:visibility="gone"
app:shapeAppearanceOverlay="@style/ShapeAppearanceCircular"
app:strokeColor="@color/primary_soft"
app:strokeWidth="2dp" />
app:shapeAppearanceOverlay="@style/ShapeAppearanceAvatar" />
</FrameLayout>

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="14dp"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:orientation="vertical">

Expand All @@ -58,10 +57,10 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textColor="@color/text_primary"
android:textSize="17sp"
android:textStyle="bold" />
android:textSize="16sp" />

<TextView
android:id="@+id/characterTag"
Expand All @@ -85,7 +84,7 @@
android:id="@+id/characterPreview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="@color/text_secondary"
Expand All @@ -98,7 +97,7 @@
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginStart="8dp"
android:layout_marginStart="4dp"
android:minWidth="0dp"
android:text="@string/edit_character"
android:textSize="13sp" />
Expand Down
10 changes: 7 additions & 3 deletions app/src/main/res/layout/item_message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
android:id="@+id/messageContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal">
android:layout_marginBottom="6dp"
android:orientation="horizontal"
android:padding="2dp">

<LinearLayout
android:id="@+id/messageBubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="300dp"
android:elevation="1dp"
android:orientation="vertical">

<TextView
android:id="@+id/messageReplyPreview"
android:maxWidth="@dimen/message_bubble_max_width"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
Expand All @@ -35,6 +37,7 @@

<TextView
android:id="@+id/messageSpeaker"
android:maxWidth="@dimen/message_bubble_max_width"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="14dp"
Expand All @@ -47,6 +50,7 @@

<TextView
android:id="@+id/messageContent"
android:maxWidth="@dimen/message_bubble_max_width"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="14dp"
Expand Down
Loading
Loading