mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Refactor ListHabitsFragment layouts and styles
This commit is contained in:
@@ -22,11 +22,9 @@ package org.isoron.uhabits.helpers;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -61,16 +59,18 @@ public class ListHabitsHelper
|
||||
|
||||
public int getButtonCount()
|
||||
{
|
||||
DisplayMetrics dm = context.getResources().getDisplayMetrics();
|
||||
int width = (int) (dm.widthPixels / dm.density);
|
||||
return Math.max(0, (int) ((width - 160) / 42.0));
|
||||
float screenWidth = UIHelper.getScreenWidth(context);
|
||||
float labelWidth = context.getResources().getDimension(R.dimen.habitNameWidth);
|
||||
float buttonWidth = context.getResources().getDimension(R.dimen.checkmarkWidth);
|
||||
return Math.max(0, (int) ((screenWidth - labelWidth) / buttonWidth));
|
||||
}
|
||||
|
||||
public int getHabitNameWidth()
|
||||
{
|
||||
DisplayMetrics dm = context.getResources().getDisplayMetrics();
|
||||
int width = (int) (dm.widthPixels / dm.density);
|
||||
return (int) ((width - 30 - getButtonCount() * 42) * dm.density);
|
||||
float screenWidth = UIHelper.getScreenWidth(context);
|
||||
float buttonWidth = context.getResources().getDimension(R.dimen.checkmarkWidth);
|
||||
float padding = UIHelper.dpToPixels(context, 15);
|
||||
return (int) (screenWidth - padding - getButtonCount() * buttonWidth);
|
||||
}
|
||||
|
||||
public void updateCheckmarkButtons(Habit habit, LinearLayout llButtons)
|
||||
@@ -206,7 +206,7 @@ public class ListHabitsHelper
|
||||
for (int i = 0; i < getButtonCount(); i++)
|
||||
{
|
||||
View tvDay = inflater.inflate(R.layout.list_habits_header_check, null);
|
||||
Button btCheck = (Button) tvDay.findViewById(R.id.tvCheck);
|
||||
TextView btCheck = (TextView) tvDay.findViewById(R.id.tvCheck);
|
||||
btCheck.setText(DateHelper.formatHeaderDate(day));
|
||||
header.addView(tvDay);
|
||||
|
||||
|
||||
@@ -164,4 +164,10 @@ public abstract class UIHelper
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static float getScreenWidth(Context context)
|
||||
{
|
||||
return context.getResources().getDisplayMetrics().widthPixels;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardsListStyle">
|
||||
style="@style/CardList">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
@@ -57,120 +57,120 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/links"
|
||||
android:textColor="@color/blue_700"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRate"
|
||||
style="@style/aboutClickableItemStyle"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_rate_this_app"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFeedback"
|
||||
style="@style/aboutClickableItemStyle"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_send_feedback"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSource"
|
||||
style="@style/aboutClickableItemStyle"
|
||||
style="@style/About.Item.Clickable"
|
||||
android:text="@string/pref_view_source_code"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/developers"
|
||||
android:textColor="@color/blue_700"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Álinson Xavier"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/translators"
|
||||
android:textColor="@color/blue_700"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Limin Lu (中文)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="François Mahé (Français)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Naofumi F (日本語)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Matthias Meisser (Deutsch)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Al Alloush (العَرَبِية)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Thibaut Girka (Français)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Can Altas (Deutsch)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Marco Cavazza (Italiano)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Adam Jurkiewicz (Polski)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Dmitriy Bogdanov (Русский)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Dalecarlian (Svenska)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Robin (Svenska)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Josh (한국어 )"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Ander Raso Vazquez (Español)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="XuToTo (中文)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Tomáš Borovec (Čeština)"/>
|
||||
|
||||
<TextView
|
||||
style="@style/aboutItemStyle"
|
||||
style="@style/About.Item"
|
||||
android:text="Álinson Xavier (Português)"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -26,12 +26,16 @@
|
||||
|
||||
<com.mobeta.android.dslv.DragSortListView
|
||||
android:id="@+id/listView"
|
||||
style="@style/habitsListStyle"
|
||||
dslv:drag_enabled="true"
|
||||
dslv:drag_start_mode="onLongPress"
|
||||
dslv:sort_enabled="true"
|
||||
dslv:track_drag_sort="false"
|
||||
/>
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/windowBackground"
|
||||
android:paddingTop="@dimen/checkmarkHeight"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@color/windowBackground"
|
||||
android:dividerHeight="1dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llEmpty"
|
||||
@@ -42,30 +46,32 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStarEmpty"
|
||||
style="@style/habitsListEmptyStyle"
|
||||
style="@style/ListHabits.EmptyState"
|
||||
android:text="@string/fa_star_half_o"
|
||||
android:textSize="80sp"/>
|
||||
|
||||
<TextView
|
||||
style="@style/habitsListEmptyStyle"
|
||||
style="@style/ListHabits.EmptyState"
|
||||
android:text="@string/no_habits_found"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/habitsListHeaderStyle">
|
||||
<LinearLayout
|
||||
android:id="@+id/header"
|
||||
style="@style/ListHabits.Header">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStarHeader"
|
||||
style="@style/habitsListStarStyle"/>
|
||||
style="@style/ListHabits.Star"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNameHeader"
|
||||
style="@style/habitsListNameStyle"
|
||||
style="@style/ListHabits.Label"
|
||||
android:text=""/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtonsHeader"
|
||||
style="@style/habitsListButtonsPanelStyle"/>
|
||||
style="@style/ListHabits.CheckmarkPanel"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
@@ -73,7 +79,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_marginTop="37dp"
|
||||
android:layout_below="@id/header"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
@@ -85,7 +91,7 @@
|
||||
android:orientation="vertical"
|
||||
android:animateLayoutChanges="true"
|
||||
android:visibility="invisible"
|
||||
style="@style/cardStyle">
|
||||
style="@style/Card">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -18,6 +18,14 @@
|
||||
~ with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvCheck"
|
||||
style="@style/habitsListHeaderCheckStyle" />
|
||||
style="@style/ListHabits.Checkmark"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:background="@color/transparent"
|
||||
android:textColor="@color/fadedTextColor"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
android:textSize="10sp"/>
|
||||
|
||||
@@ -20,23 +20,23 @@
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/llOuter"
|
||||
style="@style/habitsListItemStyle">
|
||||
style="@style/ListHabits.Item">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llInner"
|
||||
style="@style/habitsListItemInnerPanelStyle">
|
||||
style="@style/ListHabits.HabitCard">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStar"
|
||||
style="@style/habitsListStarStyle" />
|
||||
style="@style/ListHabits.Star" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
style="@style/habitsListNameStyle" />
|
||||
style="@style/ListHabits.Label" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtons"
|
||||
style="@style/habitsListButtonsPanelStyle" />
|
||||
style="@style/ListHabits.CheckmarkPanel" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -20,4 +20,4 @@
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvCheck"
|
||||
style="@style/habitsListCheckStyle" />
|
||||
style="@style/ListHabits.Checkmark" />
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardsListStyle"
|
||||
style="@style/CardList"
|
||||
tools:context="org.isoron.uhabits.ShowHabitActivity">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="start">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOverview"
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/overview"/>
|
||||
|
||||
<LinearLayout
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<org.isoron.uhabits.views.RingView
|
||||
android:id="@+id/scoreRing"
|
||||
style="@style/smallDataViewStyle"
|
||||
style="@style/SmallDataView"
|
||||
android:layout_width="100dp"
|
||||
app:label="@string/strength"
|
||||
app:maxDiameter="80"
|
||||
@@ -58,7 +58,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:gravity="center">
|
||||
|
||||
<Spinner
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStrength"
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/habit_strength"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
@@ -89,14 +89,14 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvHistory"
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/history"/>
|
||||
|
||||
<org.isoron.uhabits.views.HabitHistoryView
|
||||
@@ -118,12 +118,12 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStreaks"
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/best_streaks"/>
|
||||
|
||||
<org.isoron.uhabits.views.HabitStreakView
|
||||
@@ -133,12 +133,12 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/cardStyle"
|
||||
style="@style/Card"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWeekdayFreq"
|
||||
style="@style/cardHeaderStyle"
|
||||
style="@style/CardHeader"
|
||||
android:text="@string/frequency"/>
|
||||
|
||||
<org.isoron.uhabits.views.HabitFrequencyView
|
||||
|
||||
@@ -36,12 +36,11 @@
|
||||
<item name="android:spinnerDropDownItemStyle">@style/dialogFormSpinnerDropDown</item>
|
||||
</style>
|
||||
|
||||
<style name="cardStyle" parent="cardBasicStyle">
|
||||
<item name="android:background">@color/white</item>
|
||||
<style name="Card" parent="CardCommon">
|
||||
<item name="android:elevation">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="aboutClickableItemStyle" parent="aboutItemStyle">
|
||||
<style name="About.Item.Clickable" parent="About.Item">
|
||||
<item name="android:paddingBottom">12dp</item>
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
<item name="android:background">@drawable/ripple_transparent</item>
|
||||
|
||||
@@ -20,19 +20,16 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="habitsListHeaderStyle" parent="habitsListHeaderBasicStyle">
|
||||
<style name="ListHabits.Header">
|
||||
<item name="android:background">#f0f0f0</item>
|
||||
<item name="android:elevation">2dp</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_alignParentTop">true</item>
|
||||
<item name="android:paddingRight">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
|
||||
<style name="ListHabits.Checkmark" parent="ListHabits.CheckmarkCommon">
|
||||
<item name="android:background">@drawable/ripple_transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListItemInnerPanelStyle" parent="cardStyle">
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:padding">3dp</item>
|
||||
<item name="android:background">@drawable/ripple_white</item>
|
||||
<item name="android:elevation">1dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -19,13 +19,15 @@
|
||||
|
||||
<resources>
|
||||
<dimen name="baseSize">20dp</dimen>
|
||||
<dimen name="check_square_size">42dp</dimen>
|
||||
<dimen name="checkmarkWidth">42dp</dimen>
|
||||
<dimen name="checkmarkHeight">48dp</dimen>
|
||||
<dimen name="history_editor_max_height">450dp</dimen>
|
||||
<dimen name="history_editor_padding">8dp</dimen>
|
||||
<dimen name="history_max_font_size">@dimen/regularTextSize</dimen>
|
||||
<dimen name="regularTextSize">16sp</dimen>
|
||||
<dimen name="smallTextSize">14sp</dimen>
|
||||
<dimen name="tinyTextSize">10sp</dimen>
|
||||
<dimen name="tinyTextSize">12sp</dimen>
|
||||
<dimen name="habitNameWidth">160dp</dimen>
|
||||
|
||||
<string-array name="snooze_interval_names">
|
||||
<item>@string/interval_15_minutes</item>
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
|
||||
<style name="day_of_week_label_condensed"/>
|
||||
|
||||
<style name="cardsListStyle">
|
||||
<style name="CardList">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:background">@color/windowBackground</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="cardBasicStyle">
|
||||
<style name="CardCommon">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
@@ -56,33 +56,35 @@
|
||||
<item name="android:layout_marginBottom">3dp</item>
|
||||
<item name="android:layout_marginLeft">3dp</item>
|
||||
<item name="android:layout_marginRight">3dp</item>
|
||||
<item name="android:background">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="cardStyle" parent="cardBasicStyle">
|
||||
<item name="android:background">@drawable/card_background</item>
|
||||
<style name="Card" parent="CardCommon">
|
||||
<item name="android:layout_marginBottom">1dp</item>
|
||||
</style>
|
||||
|
||||
<style name="cardHeaderStyle">
|
||||
<style name="CardHeader">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginBottom">12dp</item>
|
||||
<item name="android:textSize">@dimen/regularTextSize</item>
|
||||
</style>
|
||||
|
||||
<style name="cardRowStyle">
|
||||
<style name="CardRow">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginBottom">4dp</item>
|
||||
<item name="android:layout_marginTop">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="cardLabelStyle">
|
||||
<style name="CardLabel">
|
||||
<item name="android:layout_width">120dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
</style>
|
||||
|
||||
<style name="aboutItemStyle">
|
||||
<style name="About" />
|
||||
|
||||
<style name="About.Item">
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
@@ -90,12 +92,12 @@
|
||||
<item name="android:paddingBottom">6dp</item>
|
||||
</style>
|
||||
|
||||
<style name="aboutClickableItemStyle" parent="aboutItemStyle">
|
||||
<style name="About.Item.Clickable">
|
||||
<item name="android:paddingBottom">12dp</item>
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="smallDataViewStyle">
|
||||
<style name="SmallDataView">
|
||||
<item name="android:layout_width">100dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_marginLeft">8dp</item>
|
||||
|
||||
@@ -20,88 +20,65 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="habitsListStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:divider">@color/windowBackground</item>
|
||||
<item name="android:dividerHeight">1dp</item>
|
||||
<item name="android:paddingTop">42dp</item>
|
||||
<item name="android:background">@color/windowBackground</item>
|
||||
<style name="ListHabits">
|
||||
<item name="android:background">@color/transparent</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="habitsListHeaderBasicStyle">
|
||||
<style name="ListHabits.Header">
|
||||
<item name="android:background">@drawable/habits_list_header_background</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_alignParentTop">true</item>
|
||||
<item name="android:paddingRight">4dp</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListHeaderStyle" parent="habitsListHeaderBasicStyle">
|
||||
<item name="android:background">@drawable/habits_list_header_background</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListStarStyle">
|
||||
<style name="ListHabits.Star">
|
||||
<item name="android:paddingTop">2dp</item>
|
||||
<item name="android:layout_width">30dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_marginTop">0dp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:paddingTop">1dp</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListNameStyle">
|
||||
<style name="ListHabits.Label">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:paddingBottom">6dp</item>
|
||||
<item name="android:paddingLeft">0dp</item>
|
||||
<item name="android:paddingRight">6dp</item>
|
||||
<item name="android:paddingTop">10dp</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListButtonsPanelStyle">
|
||||
<style name="ListHabits.CheckmarkPanel">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">42dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListItemStyle">
|
||||
<style name="ListHabits.Item">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:background">@color/windowBackground</item>
|
||||
<item name="android:background">@color/transparent</item>
|
||||
<item name="android:clipToPadding">false</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListItemInnerPanelStyle" parent="cardStyle">
|
||||
<style name="ListHabits.HabitCard" parent="Card">
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:padding">3dp</item>
|
||||
<item name="android:padding">0dp</item>
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListCheckBasicStyle">
|
||||
<style name="ListHabits.CheckmarkCommon">
|
||||
<item name="android:focusable">false</item>
|
||||
<item name="android:minHeight">@dimen/check_square_size</item>
|
||||
<item name="android:minWidth">@dimen/check_square_size</item>
|
||||
<item name="android:minHeight">@dimen/checkmarkHeight</item>
|
||||
<item name="android:width">@dimen/checkmarkWidth</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
|
||||
</style>
|
||||
|
||||
<style name="habitsListHeaderCheckStyle" parent="habitsListCheckStyle">
|
||||
<item name="android:layout_width">42dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:background">@color/transparent</item>
|
||||
<item name="android:focusable">false</item>
|
||||
<item name="android:textSize">10sp</item>
|
||||
<item name="android:textColor">#606060</item>
|
||||
<style name="ListHabits.Checkmark" parent="ListHabits.CheckmarkCommon">
|
||||
</style>
|
||||
|
||||
|
||||
<style name="habitsListEmptyStyle">
|
||||
<style name="ListHabits.EmptyState">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">center</item>
|
||||
|
||||
Reference in New Issue
Block a user