Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI をブラッシュアップ #8

Open
github-actions bot opened this issue Nov 30, 2022 · 4 comments
Open

UI をブラッシュアップ #8

github-actions bot opened this issue Nov 30, 2022 · 4 comments
Labels
ボーナス 選択課題です。
Milestone

Comments

@github-actions
Copy link

本アプリの UI は極めてシンプルです。これでも特に問題はありませんが、やはりいまいち映えないです。使いやすさが損なわれない前提で、UI をブラッシュアップしてください。方向性(エレガント、ゴージャス、モダン等)は問いません。また Jetpack Compose の導入も OK です。

@github-actions github-actions bot added the ボーナス 選択課題です。 label Nov 30, 2022
@github-actions github-actions bot added this to the 課題 milestone Nov 30, 2022
@kokoichi206
Copy link
Owner

気になるところメモ

DarkMode の時に文字が読みにくい

文字の色と背景の色が近いせい

Screenshot 2022-12-01 at 21 22 43

@kokoichi206 kokoichi206 mentioned this issue Dec 1, 2022
5 tasks
@kokoichi206
Copy link
Owner

kokoichi206 commented Dec 1, 2022

Jetpack Compose

知らぬ間に bom なるものが出ていた。。。

とりあえず元の UI に近いものを再現する

MainView DetailView
Before Screenshot 2022-12-04 at 2 43 12 Screenshot 2022-12-04 at 2 43 30
After (light) Screenshot 2022-12-04 at 3 37 10 Screenshot 2022-12-04 at 14 57 34
After (dark) Screenshot 2022-12-04 at 3 37 40 Screenshot 2022-12-04 at 15 02 40

メモ

なるほど、Compose にも ConstraintLayout あるのか。
なんか宣言的 UI に Constraint 使うと逆に読みにくくならんかな?
(SwiftUI, Flutter, React とかに似たような概念あるのかな?)

テスト

既存テストのリプレイスはできたが、以下の問題ある。。。

Links

kokoichi206 added a commit that referenced this issue Dec 4, 2022
kokoichi206 added a commit that referenced this issue Dec 4, 2022
kokoichi206 added a commit that referenced this issue Dec 4, 2022
* ViewModel に状態を持たせた。
@kokoichi206
Copy link
Owner

kokoichi206 commented Dec 4, 2022

System UI

Top Bar の色が、今黒色で固定されている( Light, Dark どちらも)。
ダークモードは良いが Light ではちょっと強い気がするので、これを変更させるようにしたい。

accompanist のやつ使う

アイコンクリック時の影(ripple)について

こちらの記事 参考にして、clickable を以下のように変更

.clickable(
    onClick = {
        onItemClick(str)
    },
    indication = rememberRipple(bounded = false),
    interactionSource = remember { MutableInteractionSource() }
)

bounded パラメータの持つ意味。

bounded - If true, ripples are clipped by the bounds of the target layout.
Unbounded ripples always animate from the target layout center,
bounded ripples animate from the touch position.

Test

However, the unmerged tree contains '1' node that matches. Are you missing `useUnmergedNode = true` in your finder?

semantics について、ちゃんと読みたい。。。

https://developer.android.com/jetpack/compose/semantics?hl=ja

@kokoichi206
Copy link
Owner

kokoichi206 commented Dec 7, 2022

横画面どうするか問題

Jetpack compose にした段階で、詳細画面で横画面にした時に情報が見切れてしまう問題が復活してしまった。

これをどうするかを考える。

  • 横画面時においても、xml の時と同様スクロールさせるようにする
    • Bottom Bar 増えたから微妙かも
      • 詳細画面では Bottom Bar 消してもいいかも
  • 横画面独自のレイアウトを作る
    • 横分割して、画像を左半分・情報を右半分など
  • そもそも縦画面で固定する!
    • 意外とそういう仕様になってる他アプリ多そう

調査

所感

AbbBar + BottomBar をどちらも表示するレイアウトにおいては、横画面のメインスペースが非常に小さくなる。
(DropBox,)
よって、そのままではあんまり見せたくないな。。。

  • 横画面時も縦画面と同じレイアウト(向きのみ変更)
    • Kindle 本の内容描画時
    • DropBox
    • Line (タブレットなど画面幅によっては別レイアウトだった気する)
    • Gmail
  • 縦画面固定
    • Kindle 一覧ページ
    • PayPay
    • MoneyForward
    • メルカリ
  • 横画面用の別レイアウト
    • スマホサイズでこれを実装してるアプリはなさそうかも

動画や横開きの本以外では、あまり横で使うケースやメリットを感じない
→ 縦画面で固定する方針で進める

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ボーナス 選択課題です。
Projects
None yet
Development

No branches or pull requests

1 participant