Compare commits

...
Author SHA1 Message Date
r-ca f392991988 アニメーションのDurationを変更 2024-01-20 16:18:15 +09:00
r-ca 556c7d0841 アニメーションを全部に追加 2024-01-20 16:14:36 +09:00
r-ca d43bcf09b2 UI調整 2024-01-20 16:13:42 +09:00
r-ca 6120427400 カラーリソース追加 2024-01-20 16:10:46 +09:00
r-ca 2b087a4c45 アイコン背景色変更 2024-01-20 16:06:57 +09:00
r-ca 457e58264b Stringリソースからタイトルを取得するように 2024-01-20 16:05:55 +09:00
r-ca 4d5d02c794 アイコン変更 2024-01-20 16:02:57 +09:00
r-ca b8f3b016b7 メニューに追加 2024-01-20 16:00:10 +09:00
r-ca b6307f67ce ナビゲーションに追加 2024-01-20 15:59:21 +09:00
r-ca 1e8dec3021 引数削除 2024-01-20 15:58:12 +09:00
r-ca 86d290b217 引数削除 2024-01-20 15:57:55 +09:00
r-ca 02d26f864d 引数削除 2024-01-20 15:57:34 +09:00
r-ca 5aa6c975da スキャンページフラグメント作成 2024-01-20 15:56:49 +09:00
r-ca 7075fc710d Dataページフラグメント作成 2024-01-20 15:56:14 +09:00
r-ca ba0cb871a4 Display設定ページフラグメント作成 2024-01-20 15:55:43 +09:00
r-ca 95a2a44cb1 ハイフン削除 2024-01-20 15:54:51 +09:00
r-ca fd65b17921 Drawable追加 2024-01-20 15:54:13 +09:00
r-ca a3f469b466 アニメーションを追加 テスト 2024-01-20 15:50:03 +09:00
r-ca e86129295a Durationを200msに変更 2024-01-20 15:49:53 +09:00
r-ca f4c46fbd5d アイテムをタッチしたら画面推移するように 2024-01-20 15:40:52 +09:00
r-ca 439b76f8bf Stringリソースを参照するように 2024-01-20 15:38:59 +09:00
r-ca ffd455c6d8 Stringリソースを参照するように 2024-01-20 15:38:13 +09:00
r-ca 29c3fddd14 Stringリソース追加 2024-01-20 15:37:55 +09:00
r-ca 516a55e4e0 ボトムナビゲーションに追加 2024-01-20 15:29:09 +09:00
r-ca 68e4d0639a メインナビゲーションにinclude 2024-01-20 15:28:08 +09:00
r-ca db26e639e6 テスト用にアイテム追加 2024-01-20 15:27:39 +09:00
r-ca 32cd27997c モデル変更 2024-01-20 15:27:11 +09:00
r-ca 6fb8091754 ナビゲーショングラフに追加 2024-01-20 15:24:58 +09:00
r-ca 0d7d47ea10 引数削除 2024-01-20 15:24:37 +09:00
r-ca 3d544fa423 フラグメント生成 2024-01-20 15:23:56 +09:00
r-ca 487451712e ナビゲーショングラフ生成 2024-01-20 15:22:23 +09:00
r-ca e78718ab79 id修正 2024-01-20 15:20:09 +09:00
r-ca 35c58e14ad インポート修正 2024-01-20 15:19:00 +09:00
r-ca 4efad853f7 アダプタ実装 2024-01-20 15:18:39 +09:00
r-ca 6c22050906 設定画面のリストアイテム用モデル作成 2024-01-20 15:18:32 +09:00
r-ca 17dc90162b ファイル移動 2024-01-20 15:14:16 +09:00
r-ca 72933fd45b ファイル移動 2024-01-20 15:13:49 +09:00
r-ca c8c0e37052 リネーム 2024-01-20 15:11:59 +09:00
r-ca 7b6d8e3a18 レイアウトコピー 2024-01-20 15:10:52 +09:00
r-ca 6167c412c7 依存関係追加 2024-01-20 15:10:00 +09:00
r-ca 226f09f8bb 引数削除 2024-01-20 15:09:13 +09:00
r-ca 0c4ba99a07 TopFragment作成 2024-01-20 15:08:44 +09:00
r-ca 097adebd9b .idea 2024-01-20 15:07:51 +09:00
r-ca 03a75a5b29 依存関係に追加 2024-01-20 15:07:45 +09:00
r-ca 0c6e2b1a98 settingモジュール作成 2024-01-20 15:07:07 +09:00
ろむねこ a7b92120ba Merge pull request #84 from lacerta-doc/feature/home/fix
ホーム画面改修
2024-01-20 15:06:00 +09:00
r-ca 3f78dccf3b コード整理 2024-01-20 15:02:17 +09:00
r-ca c6ddd6fd03 なんかもう全部変えた 2024-01-19 20:09:26 +09:00
r-ca eab00983a8 色変更 2024-01-19 18:46:06 +09:00
r-ca 038c526652 いろいろ 2024-01-19 18:43:26 +09:00
r-ca 704c128801 いろいろ 2024-01-19 18:43:22 +09:00
r-ca 209eab0755 ListItemAdapter実装 WIP 2024-01-19 18:28:26 +09:00
r-ca 65d48d03fd 依存関係に追加 2024-01-19 18:23:08 +09:00
r-ca dcd5f1b650 Placeholderテキスト追加 2024-01-19 18:19:51 +09:00
r-ca a74eb821f8 レイアウト作成 WIP 2024-01-19 18:19:42 +09:00
r-ca 738d8a055c 依存関係追加 2024-01-19 18:15:45 +09:00
r-ca 2e5559df88 WIP 2024-01-19 18:00:45 +09:00
r-ca dc1cc429e9 ドロワーを廃止 2024-01-19 17:47:57 +09:00
r-ca 339566b243 ドロワーを廃止 2024-01-19 17:46:33 +09:00
r-ca 0e1d4703e5 Revert "Revert "Revert "テスト"""
This reverts commit bcaa0e5c5c.
2024-01-19 17:42:55 +09:00
r-ca bcaa0e5c5c Revert "Revert "テスト""
This reverts commit cbc1d139af.
2024-01-19 17:35:55 +09:00
r-ca cbc1d139af Revert "テスト"
This reverts commit ef48223d46.
2024-01-19 17:27:43 +09:00
r-ca ef48223d46 テスト 2024-01-19 17:27:38 +09:00
r-ca 81ba96a3d0 WIP 2024-01-19 16:51:20 +09:00
r-ca 80104a2285 テスト用のリソース追加 2024-01-19 16:43:45 +09:00
r-ca b9973b845f WIP 2024-01-19 16:00:37 +09:00
r-ca a325ace6f3 レイアウト訂正 WIP 2024-01-19 15:51:03 +09:00
r-ca 7a2beececc レイアウト訂正 WIP 2024-01-19 15:49:23 +09:00
r-ca 4b5ce622fd 一旦コメントアウト(ビルドエラー回避) 2024-01-19 15:45:33 +09:00
r-ca 5d8b9f338d CollapsingToolBar実装テスト 2024-01-19 15:45:18 +09:00
r-ca 9d2e5dd217 ConstraintLayoutに変更 2024-01-19 15:37:15 +09:00
ろむねこ 9ad6a6291d Merge pull request #82 from lacerta-doc/improve/extract_resource_1
テキストリソースを抽出 1
2024-01-19 15:32:45 +09:00
54 changed files with 963 additions and 71 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,6 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
@@ -23,6 +22,7 @@
<option value="$PROJECT_DIR$/feature/library" />
<option value="$PROJECT_DIR$/feature/scan" />
<option value="$PROJECT_DIR$/feature/search" />
<option value="$PROJECT_DIR$/feature/setting" />
<option value="$PROJECT_DIR$/model" />
<option value="$PROJECT_DIR$/processor" />
<option value="$PROJECT_DIR$/shared" />
+2 -1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
+1
View File
@@ -74,6 +74,7 @@ dependencies {
implementation project(':feature:library')
implementation project(':feature:scan')
implementation project(':feature:debug') // デバッグメニュー
implementation project(':feature:setting') // 設定画面
implementation project(':data')
implementation project(':shared:ui')
@@ -45,6 +45,9 @@ public class MainActivity extends AppCompatActivity {
}
// Set navigation bar color
getWindow().setNavigationBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurfaceVariant));
getWindow().setNavigationBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSecondaryContainer));
// Set status bar color
getWindow().setStatusBarColor(ContextCompat.getColor(this, one.nem.lacerta.shared.ui.R.color.colorSurface));
}
}
@@ -24,6 +24,11 @@
android:id="@+id/bottom_nav"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/colorSecondaryContainer"
app:itemIconTint="@color/colorOnSecondaryContainer"
app:itemTextColor="@color/colorOnSecondaryContainer"
app:itemActiveIndicatorStyle="@style/Lacerta.Custom.Indicator"
app:labelVisibilityMode="selected"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -21,4 +21,9 @@
android:icon="@drawable/developer_mode_24px"
android:title="@string/debug_menu_title"/>
<item
android:id="@id/feature_setting_navigation"
android:icon="@drawable/settings_24px"
android:title="@string/setting_title"/>
</menu>
+3
View File
@@ -9,7 +9,10 @@
<include app:graph="@navigation/feature_library_navigation" />
<include app:graph="@navigation/feature_home_navigation" />
<include app:graph="@navigation/feature_search_navigation" />
<include app:graph="@navigation/feature_setting_navigation" />
</navigation>
+2
View File
@@ -32,4 +32,6 @@ dependencies {
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
implementation project(':shared:ui')
}
@@ -11,6 +11,7 @@
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginEnd="8dp"
android:text="Placeholder Title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@@ -19,6 +20,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="Placeholder Description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/debug_menu_item_title" />
+2
View File
@@ -55,4 +55,6 @@ dependencies {
implementation project(':model')
implementation "androidx.recyclerview:recyclerview:1.3.2"
implementation project(':component:common')
}
@@ -3,13 +3,24 @@ package one.nem.lacerta.feature.home;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import java.util.ArrayList;
import java.util.List;
@@ -34,34 +45,13 @@ public class HomeTopFragment extends Fragment {
@Inject
LacertaLibrary lacertaLibrary;
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
public HomeTopFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment HomeTopFragment.
*/
// TODO: Rename and change types and number of parameters
public static HomeTopFragment newInstance(String param1, String param2) {
public static HomeTopFragment newInstance() {
HomeTopFragment fragment = new HomeTopFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@@ -70,49 +60,58 @@ public class HomeTopFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_home_top, container, false);
// List<DocumentMeta> metas = document.getAllDocumentMetas(100);
ArrayList<ListItem> recentDocument = lacertaLibrary.getRecentDocument(10);
ArrayList<ListItem> listItems = lacertaLibrary.getRecentDocument(100);
Log.d("docs", Integer.toString(recentDocument.size()));
Log.d("docs", Integer.toString(listItems.size()));
RecyclerView recyclerView = view.findViewById(R.id.item_recycler_view);
RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
MyAdapter myAdapter = new MyAdapter(listItems);
ListItemAdapter listItemAdapter = new ListItemAdapter(recentDocument);
recyclerView.setAdapter(myAdapter);
recyclerView.setAdapter(listItemAdapter);
return view;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
}
String pageTitle;
String pageId;
ArrayList listItems;
String title;
String description;
String itemId;
CollapsingToolbarLayout collapsingToolbarLayout = view.findViewById(R.id.collapsing_toolbar);
Toolbar toolbar = view.findViewById(R.id.toolbar);
// Set the Toolbar
((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);
// Set the title of the CollapsingToolbarLayout
collapsingToolbarLayout.setTitle("Lacerta");
AppBarLayout appBarLayout = view.findViewById(R.id.app_bar_layout);
appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
if (Math.abs(verticalOffset) == appBarLayout.getTotalScrollRange()) {
// Collapsed
getActivity().getWindow().setStatusBarColor(ContextCompat.getColor(getActivity(), one.nem.lacerta.shared.ui.R.color.colorSecondaryContainer));
} else if (verticalOffset == 0) {
// Expanded
getActivity().getWindow().setStatusBarColor(ContextCompat.getColor(getActivity(), one.nem.lacerta.shared.ui.R.color.colorSurface));
} else {
// Somewhere in between
// Here you can add a color transition if you want
}
}
});
}
}
@@ -0,0 +1,58 @@
package one.nem.lacerta.feature.home;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import one.nem.lacerta.model.ListItem;
public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListItemViewHolder>{
ArrayList<ListItem> listItems;
public ListItemAdapter(ArrayList<ListItem> listItems){
this.listItems = listItems;
}
@NonNull
@Override
public ListItemAdapter.ListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(one.nem.lacerta.shared.ui.R.layout.common_list_item, parent, false);
return new ListItemViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ListItemAdapter.ListItemViewHolder holder, int position) {
ListItem listItem = listItems.get(position);
holder.icon.setImageResource(listItem.getItemType().getIconId());
holder.icon.setColorFilter(one.nem.lacerta.shared.ui.R.color.colorOnSurface);
holder.title.setText(listItem.getTitle());
holder.description.setText(listItem.getDescription());
}
@Override
public int getItemCount() {
return listItems.size();
}
public static class ListItemViewHolder extends RecyclerView.ViewHolder{
ImageView icon;
TextView title;
TextView description;
public ListItemViewHolder(@NonNull View itemView) {
super(itemView);
icon = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_icon);
title = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_title);
description = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_description);
}
}
}
@@ -1,21 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HomeTopFragment"
tools:ignore="ExtraText">
android:background="@color/colorSurface">
<!-- TODO: Update blank fragment layout -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/item_recycler_view"
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
app:contentScrim="@color/colorSecondaryContainer"
android:background="@color/colorSurface"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:collapsedTitleGravity="start|center_vertical"
app:expandedTitleGravity="start|bottom"
app:expandedTitleMarginBottom="16dp"
app:expandedTitleMarginStart="16dp"
app:expandedTitleTextAppearance="@style/TextAppearance.MaterialComponents.Headline4"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:title="HOGE" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/home_item_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/item_placeholder"
android:icon="@drawable/developer_mode_24px"
android:title="@string/placeholder" />
</menu>
+1
View File
@@ -0,0 +1 @@
/build
+48
View File
@@ -0,0 +1,48 @@
plugins {
alias(libs.plugins.com.android.library)
}
android {
namespace 'one.nem.lacerta.setting'
compileSdk 34
defaultConfig {
minSdk 26
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.com.google.android.material
testImplementation libs.junit
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.androidx.test.espresso.core
// Navigation
implementation libs.navigation.fragment
implementation libs.navigation.ui
implementation libs.navigation.dynamic.features.fragment
// DI
implementation libs.com.google.dagger.hilt.android
annotationProcessor libs.com.google.dagger.hilt.compiler
// shared
implementation project(':shared:ui')
}
View File
Whitespace-only changes.
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,26 @@
package one.nem.lacerta.setting;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("one.nem.lacerta.setting.test", appContext.getPackageName());
}
}
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
@@ -0,0 +1,63 @@
package one.nem.lacerta.setting;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import one.nem.lacerta.setting.model.SettingListItem;
public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListItemViewHolder>{
ArrayList<SettingListItem> listItems;
public ListItemAdapter(ArrayList<SettingListItem> listItems){
this.listItems = listItems;
}
@NonNull
@Override
public ListItemAdapter.ListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(one.nem.lacerta.shared.ui.R.layout.common_list_item, parent, false);
return new ListItemViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ListItemAdapter.ListItemViewHolder holder, int position) {
SettingListItem listItem = listItems.get(position);
holder.icon.setImageDrawable(listItem.getIcon());
holder.icon.setColorFilter(one.nem.lacerta.shared.ui.R.color.colorOnSurface);
holder.title.setText(listItem.getTitle());
holder.description.setText(listItem.getDescription());
holder.itemView.setOnClickListener( v -> {
Navigation.findNavController(v).navigate(listItem.getDestination());
});
}
@Override
public int getItemCount() {
return listItems.size();
}
public static class ListItemViewHolder extends RecyclerView.ViewHolder{
ImageView icon;
TextView title;
TextView description;
public ListItemViewHolder(@NonNull View itemView) {
super(itemView);
icon = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_icon);
title = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_title);
description = itemView.findViewById(one.nem.lacerta.shared.ui.R.id.item_description);
}
}
}
@@ -0,0 +1,43 @@
package one.nem.lacerta.setting;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link SettingAboutPageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class SettingAboutPageFragment extends Fragment {
public SettingAboutPageFragment() {
// Required empty public constructor
}
public static SettingAboutPageFragment newInstance() {
SettingAboutPageFragment fragment = new SettingAboutPageFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_setting_about_page, container, false);
return view;
}
}
@@ -0,0 +1,40 @@
package one.nem.lacerta.setting;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link SettingDataPageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class SettingDataPageFragment extends Fragment {
public SettingDataPageFragment() {
// Required empty public constructor
}
public static SettingDataPageFragment newInstance() {
SettingDataPageFragment fragment = new SettingDataPageFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_setting_data_page, container, false);
}
}
@@ -0,0 +1,40 @@
package one.nem.lacerta.setting;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link SettingDisplayPageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class SettingDisplayPageFragment extends Fragment {
public SettingDisplayPageFragment() {
// Required empty public constructor
}
public static SettingDisplayPageFragment newInstance() {
SettingDisplayPageFragment fragment = new SettingDisplayPageFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_setting_display_page, container, false);
}
}
@@ -0,0 +1,41 @@
package one.nem.lacerta.setting;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* A simple {@link Fragment} subclass.
* Use the {@link SettingScanPageFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class SettingScanPageFragment extends Fragment {
public SettingScanPageFragment() {
// Required empty public constructor
}
public static SettingScanPageFragment newInstance() {
SettingScanPageFragment fragment = new SettingScanPageFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_setting_scan_page, container, false);
}
}
@@ -0,0 +1,92 @@
package one.nem.lacerta.setting;
import android.os.Bundle;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import one.nem.lacerta.setting.model.SettingListItem;
/**
* A simple {@link Fragment} subclass.
* Use the {@link SettingTopFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class SettingTopFragment extends Fragment {
public SettingTopFragment() {
// Required empty public constructor
}
public static SettingTopFragment newInstance() {
SettingTopFragment fragment = new SettingTopFragment();
Bundle args = new Bundle();
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_setting_top, container, false);
// Setting items
ArrayList<SettingListItem> settingListItems = new ArrayList<>();
settingListItems.add(
new SettingListItem(
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_display_title),
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_display_description),
ContextCompat.getDrawable(getContext(), one.nem.lacerta.shared.ui.R.drawable.palette_24px),
R.id.action_settingTopFragment_to_settingDisplayPageFragment
)
);
settingListItems.add(
new SettingListItem(
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_data_title),
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_data_description),
ContextCompat.getDrawable(getContext(), one.nem.lacerta.shared.ui.R.drawable.settings_backup_restore_24px),
R.id.action_settingTopFragment_to_settingDataPageFragment
)
);
settingListItems.add(
new SettingListItem(
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_scan_title),
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_scan_description),
ContextCompat.getDrawable(getContext(), one.nem.lacerta.shared.ui.R.drawable.document_scanner_24px),
R.id.action_settingTopFragment_to_settingScanPageFragment
)
);
settingListItems.add(
new SettingListItem(
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_about_title),
getResources().getString(one.nem.lacerta.shared.ui.R.string.setting_top_about_description),
ContextCompat.getDrawable(getContext(), one.nem.lacerta.shared.ui.R.drawable.info_24px),
R.id.action_settingTopFragment_to_settingAboutPageFragment
)
);
// Init RecyclerView
RecyclerView recyclerView = view.findViewById(R.id.setting_item_recycler_view);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(new ListItemAdapter(settingListItems));
return view;
}
}
@@ -0,0 +1,34 @@
package one.nem.lacerta.setting.model;
import android.graphics.drawable.Drawable;
public class SettingListItem {
String title;
String description;
Drawable icon;
int destination;
public SettingListItem(String title, String description, Drawable icon, int destination) {
this.title = title;
this.description = description;
this.icon = icon;
this.destination = destination;
}
public String getTitle() {
return title;
}
public String getDescription() {
return description;
}
public Drawable getIcon() {
return icon;
}
public int getDestination() {
return destination;
}
}
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SettingAboutPageFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SettingDataPageFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SettingDisplayPageFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SettingScanPageFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
</FrameLayout>
@@ -0,0 +1,50 @@
<FrameLayout 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:background="@color/colorSurface">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
app:contentScrim="@color/colorSecondaryContainer"
android:background="@color/colorSurface"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
app:collapsedTitleGravity="start|center_vertical"
app:expandedTitleGravity="start|bottom"
app:expandedTitleMarginBottom="16dp"
app:expandedTitleMarginStart="16dp"
app:expandedTitleTextAppearance="@style/TextAppearance.MaterialComponents.Headline4"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:title="@string/setting_title" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/setting_item_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</FrameLayout>
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation 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:id="@+id/feature_setting_navigation"
app:startDestination="@id/settingTopFragment">
<fragment
android:id="@+id/settingTopFragment"
android:name="one.nem.lacerta.setting.SettingTopFragment"
android:label="SettingTopFragment" >
<action
android:id="@+id/action_settingTopFragment_to_settingAboutPageFragment"
app:destination="@id/settingAboutPageFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right" />
<action
android:id="@+id/action_settingTopFragment_to_settingDisplayPageFragment"
app:destination="@id/settingDisplayPageFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right" />
<action
android:id="@+id/action_settingTopFragment_to_settingDataPageFragment"
app:destination="@id/settingDataPageFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right" />
<action
android:id="@+id/action_settingTopFragment_to_settingScanPageFragment"
app:destination="@id/settingScanPageFragment"
app:enterAnim="@anim/slide_from_right"
app:exitAnim="@anim/slide_to_left"
app:popEnterAnim="@anim/slide_from_left"
app:popExitAnim="@anim/slide_to_right" />
</fragment>
<fragment
android:id="@+id/settingAboutPageFragment"
android:name="one.nem.lacerta.setting.SettingAboutPageFragment"
android:label="fragment_setting_about_page"
tools:layout="@layout/fragment_setting_about_page" />
<fragment
android:id="@+id/settingDataPageFragment"
android:name="one.nem.lacerta.setting.SettingDataPageFragment"
android:label="fragment_setting_data_page"
tools:layout="@layout/fragment_setting_data_page" />
<fragment
android:id="@+id/settingDisplayPageFragment"
android:name="one.nem.lacerta.setting.SettingDisplayPageFragment"
android:label="fragment_setting_display_page"
tools:layout="@layout/fragment_setting_display_page" />
<fragment
android:id="@+id/settingScanPageFragment"
android:name="one.nem.lacerta.setting.SettingScanPageFragment"
android:label="fragment_setting_scan_page"
tools:layout="@layout/fragment_setting_scan_page" />
</navigation>
@@ -0,0 +1,4 @@
<resources>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
@@ -0,0 +1,17 @@
package one.nem.lacerta.setting;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
+1
View File
@@ -31,3 +31,4 @@ include ':model'
include ':processor'
include ':shared:ui'
include ':vcs'
include ':feature:setting'
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
</set>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
</set>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
</set>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="100%p"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime" />
android:duration="120" />
</set>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/colorOnBackground"
android:pathData="M90,230L90,50L270,50L270,110L150,110L150,230L90,230ZM810,230L810,110L690,110L690,50L870,50L870,230L810,230ZM90,910L90,730L150,730L150,850L270,850L270,910L90,910ZM690,910L690,850L810,850L810,730L870,730L870,910L690,910ZM270,717.69Q270,722.31 273.85,726.15Q277.69,730 282.31,730L677.69,730Q682.31,730 686.15,726.15Q690,722.31 690,717.69L690,242.31Q690,237.69 686.15,233.85Q682.31,230 677.69,230L282.31,230Q277.69,230 273.85,233.85Q270,237.69 270,242.31L270,717.69ZM282.31,790Q252,790 231,769Q210,748 210,717.69L210,242.31Q210,212 231,191Q252,170 282.31,170L677.69,170Q708,170 729,191Q750,212 750,242.31L750,717.69Q750,748 729,769Q708,790 677.69,790L282.31,790ZM370,390L590,390L590,330L370,330L370,390ZM370,510L590,510L590,450L370,450L370,510ZM370,630L590,630L590,570L370,570L370,630ZM270,717.69L270,242.31Q270,237.69 270,233.85Q270,230 270,230L270,230Q270,230 270,233.85Q270,237.69 270,242.31L270,717.69Q270,722.31 270,726.15Q270,730 270,730L270,730Q270,730 270,726.15Q270,722.31 270,717.69Z"/>
</vector>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/colorOnBackground"
android:pathData="M450,670L510,670L510,440L450,440L450,670ZM480,371.54Q493.73,371.54 503.02,362.25Q512.31,352.96 512.31,339.23Q512.31,325.5 503.02,316.21Q493.73,306.92 480,306.92Q466.27,306.92 456.98,316.21Q447.69,325.5 447.69,339.23Q447.69,352.96 456.98,362.25Q466.27,371.54 480,371.54ZM480.07,860Q401.23,860 331.86,830.08Q262.49,800.16 211.18,748.87Q159.87,697.58 129.93,628.24Q100,558.9 100,480.07Q100,401.23 129.92,331.86Q159.84,262.49 211.13,211.18Q262.42,159.87 331.76,129.93Q401.1,100 479.93,100Q558.77,100 628.14,129.92Q697.51,159.84 748.82,211.13Q800.13,262.42 830.07,331.76Q860,401.1 860,479.93Q860,558.77 830.08,628.14Q800.16,697.51 748.87,748.82Q697.58,800.13 628.24,830.07Q558.9,860 480.07,860ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
</vector>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/colorOnBackground"
android:pathData="M479.23,860Q401.46,860 332.31,830.04Q263.15,800.08 211.54,748.46Q159.92,696.84 129.96,627.5Q100,558.15 100,480Q100,400.85 130.77,331.5Q161.54,262.16 214.35,210.85Q267.15,159.54 337.89,129.77Q408.62,100 488.77,100Q563.77,100 630.92,125.58Q698.08,151.16 748.88,196.39Q799.69,241.62 829.84,303.89Q860,366.15 860,438.92Q860,542.77 798.27,601.38Q736.54,660 640,660L567.54,660Q550.46,660 540.23,671.15Q530,682.31 530,697.54Q530,716.08 545,736.08Q560,756.08 560,782Q560,821.61 538.08,840.81Q516.15,860 479.23,860ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480L480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480ZM260,510Q281.38,510 295.69,495.69Q310,481.38 310,460Q310,438.62 295.69,424.31Q281.38,410 260,410Q238.62,410 224.31,424.31Q210,438.62 210,460Q210,481.38 224.31,495.69Q238.62,510 260,510ZM380,350Q401.38,350 415.69,335.69Q430,321.38 430,300Q430,278.62 415.69,264.31Q401.38,250 380,250Q358.62,250 344.31,264.31Q330,278.62 330,300Q330,321.38 344.31,335.69Q358.62,350 380,350ZM580,350Q601.38,350 615.69,335.69Q630,321.38 630,300Q630,278.62 615.69,264.31Q601.38,250 580,250Q558.62,250 544.31,264.31Q530,278.62 530,300Q530,321.38 544.31,335.69Q558.62,350 580,350ZM700,510Q721.38,510 735.69,495.69Q750,481.38 750,460Q750,438.62 735.69,424.31Q721.38,410 700,410Q678.62,410 664.31,424.31Q650,438.62 650,460Q650,481.38 664.31,495.69Q678.62,510 700,510ZM479.23,800Q489,800 494.5,795.19Q500,790.39 500,782Q500,768 485,750.54Q470,733.08 470,695.85Q470,653.08 499,626.54Q528,600 570,600L640,600Q710.62,600 755.31,558.61Q800,517.23 800,438.92Q800,317.54 706.92,238.77Q613.85,160 488.77,160Q351.61,160 255.81,253Q160,346 160,480Q160,613 253.5,706.5Q347,800 479.23,800Z"/>
</vector>
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@color/colorOnBackground"
android:pathData="M479.23,540Q454.69,540 436.96,522.27Q419.23,504.54 419.23,480Q419.23,455.46 436.96,437.73Q454.69,420 479.23,420Q503.77,420 521.5,437.73Q539.23,455.46 539.23,480Q539.23,504.54 521.5,522.27Q503.77,540 479.23,540ZM479.23,820Q348.69,820 252.46,734.27Q156.23,648.54 141.62,520L202.85,520Q218,623.61 296.27,691.81Q374.54,760 479.23,760Q596.23,760 677.73,678.5Q759.23,597 759.23,480Q759.23,363 677.73,281.5Q596.23,200 479.23,200Q413.69,200 356.39,229.11Q299.08,258.23 257.69,309.23L362.31,309.23L362.31,369.23L159.23,369.23L159.23,166.15L219.23,166.15L219.23,260.92Q267.92,203.46 335.85,171.73Q403.77,140 479.23,140Q550.03,140 611.86,166.77Q673.69,193.54 719.69,239.54Q765.69,285.54 792.46,347.36Q819.23,409.19 819.23,479.98Q819.23,550.77 792.46,612.61Q765.69,674.46 719.69,720.46Q673.69,766.46 611.86,793.23Q550.03,820 479.23,820Z"/>
</vector>
@@ -0,0 +1,56 @@
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="24dp"
android:paddingVertical="16dp">
<ImageView
android:id="@+id/item_icon"
android:layout_width="32dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/item_text_container"
app:srcCompat="@drawable/description_24px"
android:contentDescription="icon" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/item_text_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/item_icon"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/item_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="16sp"
android:layout_marginEnd="8dp"
android:text="Placeholder Title"
android:textColor="@color/colorOnSurface"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/item_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="Placeholder Description"
android:textColor="@color/colorOnSurfaceSecondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/item_title" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -30,6 +30,7 @@
<item name="colorOnBackground">@color/colorOnBackground</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
@@ -25,4 +25,8 @@
<color name="colorSurfaceVariant">@color/material_dynamic_neutral_variant90</color>
<color name="colorOnSurfaceVariant">@color/material_dynamic_neutral_variant30</color>
<color name="colorSurfaceInverse">@color/material_dynamic_neutral20</color>
<!-- indicator icon background -->
<color name="colorIndicator">@color/material_dynamic_secondary70</color>
<color name="colorOnSurfaceSecondary">@color/material_dynamic_neutral_variant30</color>
</resources>
@@ -25,4 +25,8 @@
<color name="colorSurfaceInverse">#313033</color>
<color name="colorOnSurfaceInverse">#F4EFF4</color>
<color name="colorPrimaryInverse">#D0BCFF</color>
<!-- indicator icon background -->
<color name="colorIndicator">#d2d4bc</color>
<color name="colorOnSurfaceSecondary">#49454F</color>
</resources>
@@ -24,4 +24,8 @@
<color name="colorSurfaceVariant">@color/material_dynamic_neutral_variant90</color>
<color name="colorOnSurfaceVariant">@color/material_dynamic_neutral_variant30</color>
<color name="colorSurfaceInverse">@color/material_dynamic_neutral20</color>
<!-- indicator icon background -->
<color name="colorIndicator">@color/material_dynamic_secondary80</color>
<color name="colorOnSurfaceSecondary">@color/material_dynamic_neutral_variant30</color>
</resources>
+1 -1
View File
@@ -30,6 +30,6 @@
<item name="colorOnBackground">@color/colorOnBackground</item>
<item name="android:windowLightNavigationBar">true</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
+3
View File
@@ -25,4 +25,7 @@
<color name="colorSurfaceInverse">#31312B</color>
<color name="colorOnSurfaceInverse">#F3F1E8</color>
<color name="colorPrimaryInverse">#B8D321</color>
<!-- indicator icon background -->
<color name="colorIndicator">#d2d4bc</color>
<color name="colorOnSurfaceSecondary">#46483B</color>
</resources>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Lacerta.Custom.Indicator" parent="Widget.Material3.BottomNavigationView.ActiveIndicator">
<item name="android:color">@color/colorIndicator</item>
</style>
</resources>
+16
View File
@@ -13,6 +13,22 @@
<!-- debug -->
<string name="debug_menu_title">デバッグメニュー</string>
<!-- setting -->
<string name="setting_title">設定</string>
<string name="setting_top_scan_title">スキャン</string>
<string name="setting_top_scan_description">画質, 保存先</string>
<string name="setting_top_display_title">表示</string>
<string name="setting_top_display_description">テーマ, フォントサイズ</string>
<string name="setting_top_data_title">データ</string>
<string name="setting_top_data_description">バックアップ, リストア</string>
<string name="setting_top_about_title">このアプリについて</string>
<string name="setting_top_about_description">バージョン情報</string>
<!-- common -->
<string name="placeholder">Placeholder(TODO: Replace)</string>
</resources>
-2
View File
@@ -28,8 +28,6 @@
<item name="colorOutline">@color/colorOutline</item>
<item name="colorOnBackground">@color/colorOnBackground</item>
<item name="android:windowLightNavigationBar">true</item>
</style>
<style name="Theme.Lacerta" parent="Base.Theme.Lacerta" >