mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Create android-pickers module
This commit is contained in:
1
android-pickers/.gitignore
vendored
Normal file
1
android-pickers/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
27
android-pickers/build.gradle
Normal file
27
android-pickers/build.gradle
Normal file
@@ -0,0 +1,27 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.3"
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 25
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:appcompat-v7:25.3.1'
|
||||
}
|
||||
25
android-pickers/proguard-rules.pro
vendored
Normal file
25
android-pickers/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /gemini-b/opt/android-sdk/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# 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
|
||||
2
android-pickers/src/main/AndroidManifest.xml
Normal file
2
android-pickers/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,2 @@
|
||||
<manifest package="com.android"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"/>
|
||||
@@ -16,18 +16,15 @@
|
||||
|
||||
package com.android.colorpicker;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.app.*;
|
||||
import android.os.*;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AppCompatDialogFragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.support.v7.app.*;
|
||||
import android.view.*;
|
||||
import android.widget.*;
|
||||
|
||||
import com.android.colorpicker.ColorPickerSwatch.OnColorSelectedListener;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import com.android.*;
|
||||
import com.android.colorpicker.ColorPickerSwatch.*;
|
||||
|
||||
/**
|
||||
* A dialog which takes in as input an array of palette and creates a palette allowing the user to
|
||||
@@ -16,18 +16,14 @@
|
||||
|
||||
package com.android.colorpicker;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
import android.widget.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TableRow;
|
||||
|
||||
import com.android.colorpicker.ColorPickerSwatch.OnColorSelectedListener;
|
||||
import com.android.*;
|
||||
import com.android.colorpicker.ColorPickerSwatch.*;
|
||||
|
||||
/**
|
||||
* A color picker custom view which creates an grid of color squares. The number of squares per
|
||||
@@ -16,14 +16,12 @@
|
||||
|
||||
package com.android.colorpicker;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.content.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.view.*;
|
||||
import android.widget.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import com.android.*;
|
||||
|
||||
/**
|
||||
* Creates a circular swatch of a specified color. Adds a checkmark if marked as checked.
|
||||
@@ -16,36 +16,23 @@
|
||||
|
||||
package com.android.datetimepicker.date;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import android.animation.*;
|
||||
import android.app.*;
|
||||
import android.content.res.*;
|
||||
import android.os.*;
|
||||
import android.text.format.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
import android.view.View.*;
|
||||
import android.view.animation.*;
|
||||
import android.widget.*;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
import com.android.datetimepicker.date.MonthAdapter.*;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.app.Activity;
|
||||
import android.app.DialogFragment;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.AlphaAnimation;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.datetimepicker.HapticFeedbackController;
|
||||
import com.android.datetimepicker.Utils;
|
||||
import com.android.datetimepicker.date.MonthAdapter.CalendarDay;
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Dialog allowing users to select a date.
|
||||
@@ -16,37 +16,25 @@
|
||||
|
||||
package com.android.datetimepicker.date;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.Calendar;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.graphics.Paint.*;
|
||||
import android.os.*;
|
||||
import android.support.v4.view.*;
|
||||
import android.support.v4.view.accessibility.*;
|
||||
import android.support.v4.widget.*;
|
||||
import android.text.format.*;
|
||||
import android.view.*;
|
||||
import android.view.accessibility.*;
|
||||
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
import com.android.datetimepicker.date.MonthAdapter.*;
|
||||
|
||||
import java.security.*;
|
||||
import java.util.*;
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Align;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.ViewCompat;
|
||||
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
|
||||
import android.support.v4.widget.ExploreByTouchHelper;
|
||||
import android.text.format.DateFormat;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.format.Time;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
|
||||
import com.android.datetimepicker.Utils;
|
||||
import com.android.datetimepicker.date.MonthAdapter.CalendarDay;
|
||||
|
||||
/**
|
||||
* A calendar-like view displaying a specified month and the appropriate selectable day numbers
|
||||
@@ -16,16 +16,14 @@
|
||||
|
||||
package com.android.datetimepicker.date;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.graphics.Paint.*;
|
||||
import android.util.*;
|
||||
import android.widget.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Align;
|
||||
import android.graphics.Paint.Style;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
import com.android.*;
|
||||
|
||||
/**
|
||||
* A text view which, when pressed or activated, displays a blue circle around the text.
|
||||
@@ -16,24 +16,18 @@
|
||||
|
||||
package com.android.datetimepicker.date;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.view.*;
|
||||
import android.view.accessibility.*;
|
||||
import android.widget.*;
|
||||
import android.widget.AdapterView.*;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.date.DatePickerDialog.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.StateListDrawable;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.datetimepicker.date.DatePickerDialog.OnDateChangedListener;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Displays a selectable list of years.
|
||||
@@ -16,20 +16,17 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import java.text.DateFormatSymbols;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.graphics.Paint.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Align;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.datetimepicker.Utils;
|
||||
import java.text.*;
|
||||
|
||||
/**
|
||||
* Draw the two smaller AM and PM circles next to where the larger circle will be.
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
|
||||
import com.android.*;
|
||||
|
||||
/**
|
||||
* Draws a simple white circle on which the numbers will be drawn.
|
||||
@@ -16,30 +16,20 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.animation.*;
|
||||
import android.annotation.*;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.os.*;
|
||||
import android.text.format.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
import android.view.View.*;
|
||||
import android.view.accessibility.*;
|
||||
import android.widget.*;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.format.Time;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnTouchListener;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.android.datetimepicker.HapticFeedbackController;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
|
||||
/**
|
||||
* The primary layout to hold the circular picker, and the am/pm buttons. This view well measure
|
||||
@@ -16,21 +16,16 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.animation.*;
|
||||
import android.animation.ValueAnimator.*;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
|
||||
import android.animation.Keyframe;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.datetimepicker.Utils;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
|
||||
/**
|
||||
* View to show what number is selected. This will draw a blue circle over the number, with a blue
|
||||
@@ -16,21 +16,16 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
import android.animation.*;
|
||||
import android.animation.ValueAnimator.*;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.graphics.*;
|
||||
import android.graphics.Paint.*;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
|
||||
import android.animation.Keyframe;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.PropertyValuesHolder;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Paint.Align;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import com.android.*;
|
||||
|
||||
/**
|
||||
* A view to show a series of numbers in a circular pattern.
|
||||
@@ -16,37 +16,25 @@
|
||||
|
||||
package com.android.datetimepicker.time;
|
||||
|
||||
import java.text.DateFormatSymbols;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.isoron.uhabits.R;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.animation.*;
|
||||
import android.annotation.*;
|
||||
import android.app.ActionBar.*;
|
||||
import android.app.*;
|
||||
import android.app.ActionBar;
|
||||
import android.app.ActionBar.LayoutParams;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.content.*;
|
||||
import android.content.res.*;
|
||||
import android.os.*;
|
||||
import android.support.v7.app.*;
|
||||
import android.util.Log;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnKeyListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.util.*;
|
||||
import android.view.*;
|
||||
import android.view.View.*;
|
||||
import android.widget.*;
|
||||
|
||||
import com.android.datetimepicker.HapticFeedbackController;
|
||||
import com.android.datetimepicker.Utils;
|
||||
import com.android.datetimepicker.time.RadialPickerLayout.OnValueSelectedListener;
|
||||
import com.android.*;
|
||||
import com.android.datetimepicker.*;
|
||||
import com.android.datetimepicker.time.RadialPickerLayout.*;
|
||||
|
||||
import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Dialog to set a time.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
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="oval" />
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true"
|
||||
android:state_pressed="false"
|
||||
android:drawable="@color/blue_focused" />
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@color/blue" />
|
||||
|
||||
<item android:drawable="@color/circle_background" />
|
||||
</selector>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_focused="true"
|
||||
android:state_pressed="false"
|
||||
android:drawable="@color/red_focused" />
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@color/red" />
|
||||
|
||||
<item android:drawable="@color/light_gray" />
|
||||
</selector>
|
||||
@@ -24,16 +24,36 @@
|
||||
<dimen name="color_swatch_margins_large">8dip</dimen>
|
||||
<dimen name="color_swatch_margins_small">4dip</dimen>
|
||||
|
||||
<item name="circle_radius_multiplier" format="float" type="string" translatable="false">0.82</item>
|
||||
<item name="circle_radius_multiplier_24HourMode" format="float" type="string" translatable="false">0.85</item>
|
||||
<item name="selection_radius_multiplier" format="float" type="string" translatable="false">0.16</item>
|
||||
<item name="ampm_circle_radius_multiplier" format="float" type="string" translatable="false">0.19</item>
|
||||
<item name="numbers_radius_multiplier_normal" format="float" type="string" translatable="false">0.81</item>
|
||||
<item name="numbers_radius_multiplier_inner" format="float" type="string" translatable="false">0.60</item>
|
||||
<item name="numbers_radius_multiplier_outer" format="float" type="string" translatable="false">0.83</item>
|
||||
<item name="text_size_multiplier_normal" format="float" type="string" translatable="false">0.17</item>
|
||||
<item name="text_size_multiplier_inner" format="float" type="string" translatable="false">0.14</item>
|
||||
<item name="text_size_multiplier_outer" format="float" type="string" translatable="false">0.11</item>
|
||||
<item name="circle_radius_multiplier" format="float" translatable="false" type="string">
|
||||
0.82
|
||||
</item>
|
||||
<item name="circle_radius_multiplier_24HourMode" format="float" translatable="false" type="string">
|
||||
0.85
|
||||
</item>
|
||||
<item name="selection_radius_multiplier" format="float" translatable="false" type="string">
|
||||
0.16
|
||||
</item>
|
||||
<item name="ampm_circle_radius_multiplier" format="float" translatable="false" type="string">
|
||||
0.19
|
||||
</item>
|
||||
<item name="numbers_radius_multiplier_normal" format="float" translatable="false" type="string">
|
||||
0.81
|
||||
</item>
|
||||
<item name="numbers_radius_multiplier_inner" format="float" translatable="false" type="string">
|
||||
0.60
|
||||
</item>
|
||||
<item name="numbers_radius_multiplier_outer" format="float" translatable="false" type="string">
|
||||
0.83
|
||||
</item>
|
||||
<item name="text_size_multiplier_normal" format="float" translatable="false" type="string">
|
||||
0.17
|
||||
</item>
|
||||
<item name="text_size_multiplier_inner" format="float" translatable="false" type="string">
|
||||
0.14
|
||||
</item>
|
||||
<item name="text_size_multiplier_outer" format="float" translatable="false" type="string">
|
||||
0.11
|
||||
</item>
|
||||
|
||||
<dimen name="time_label_size">60sp</dimen>
|
||||
<dimen name="extra_time_label_margin">-30dp</dimen>
|
||||
@@ -64,8 +84,8 @@
|
||||
<dimen name="year_label_height">64dp</dimen>
|
||||
<dimen name="year_label_text_size">22dp</dimen>
|
||||
|
||||
<string name="color_swatch_description" translatable="false">Color <xliff:g id="color_index" example="14">%1$d</xliff:g></string>
|
||||
<string name="color_swatch_description_selected" translatable="false">Color <xliff:g id="color_index" example="14">%1$d</xliff:g> selected</string>
|
||||
<string name="color_swatch_description" translatable="false">Color <xliff:g example="14" id="color_index">%1$d</xliff:g></string>
|
||||
<string name="color_swatch_description_selected" translatable="false">Color <xliff:g example="14" id="color_index">%1$d</xliff:g> selected</string>
|
||||
|
||||
<!-- Date and time picker -->
|
||||
<string name="hour_picker_description" translatable="false">Hours circular slider</string>
|
||||
@@ -74,11 +94,56 @@
|
||||
<string name="year_picker_description" translatable="false">Year list</string>
|
||||
<string name="select_day" translatable="false">Select month and day</string>
|
||||
<string name="select_year" translatable="false">Select year</string>
|
||||
<string name="item_is_selected" translatable="false"><xliff:g id="item" example="2013">%1$s</xliff:g> selected</string>
|
||||
<string name="deleted_key" translatable="false"><xliff:g id="key" example="4">%1$s</xliff:g> deleted</string>
|
||||
<string name="item_is_selected" translatable="false"><xliff:g example="2013" id="item">%1$s</xliff:g> selected</string>
|
||||
<string name="deleted_key" translatable="false"><xliff:g example="4" id="key">%1$s</xliff:g> deleted</string>
|
||||
<string name="time_placeholder" translatable="false">--</string>
|
||||
<string name="time_separator" translatable="false">:</string>
|
||||
<string name="radial_numbers_typeface" translatable="false">sans-serif</string>
|
||||
<string name="sans_serif" translatable="false">sans-serif</string>
|
||||
<string name="day_of_week_label_typeface" translatable="false">sans-serif</string>
|
||||
|
||||
<!-- Time and Date picker -->
|
||||
<color name="circle_background">#f2f2f2</color>
|
||||
<color name="line_background">#cccccc</color>
|
||||
<color name="ampm_text_color">#8c8c8c</color>
|
||||
<color name="done_text_color_normal">#000000</color>
|
||||
<color name="done_text_color_disabled">#cccccc</color>
|
||||
<color name="numbers_text_color">#8c8c8c</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="transparent_black">#7f000000</color>
|
||||
<color name="blue">#33b5e5</color>
|
||||
<color name="blue_focused">#c1e8f7</color>
|
||||
<color name="neutral_pressed">#33999999</color>
|
||||
<color name="darker_blue">#0099cc</color>
|
||||
<color name="date_picker_text_normal">#ff999999</color>
|
||||
<color name="calendar_header">#999999</color>
|
||||
<color name="date_picker_view_animator">#f2f2f2</color>
|
||||
<color name="calendar_selected_date_text">#ffd1d2d4</color>
|
||||
<color name="done_text_color">#888888</color>
|
||||
<color name="done_text_color_dark">#888888</color>
|
||||
<color name="white">#ffffff</color>
|
||||
<color name="black">#000000</color>
|
||||
|
||||
<!-- Colors for red theme -->
|
||||
<color name="red">#ff3333</color>
|
||||
<color name="red_focused">#853333</color>
|
||||
<color name="light_gray">#404040</color>
|
||||
<color name="dark_gray">#363636</color>
|
||||
<color name="line_dark">#808080</color>
|
||||
|
||||
<style name="time_label">
|
||||
<item name="android:textSize">@dimen/time_label_size</item>
|
||||
<item name="android:textColor">@color/numbers_text_color</item>
|
||||
</style>
|
||||
|
||||
<style name="ampm_label">
|
||||
<item name="android:textSize">@dimen/ampm_label_size</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textColor">@color/ampm_text_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TimePickerDialog" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
9
android-pickers/src/main/res/values/strings.xml
Normal file
9
android-pickers/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="select_hours"/>
|
||||
<string name="select_minutes"/>
|
||||
<string name="color_picker_default_title"/>
|
||||
<string name="clear"/>
|
||||
<string name="clear_label"/>
|
||||
<string name="done_label"/>
|
||||
</resources>
|
||||
@@ -1 +1 @@
|
||||
include ':uhabits-android', ':uhabits-core', ':android-base'
|
||||
include ':uhabits-android', ':uhabits-core', ':android-base', ':android-pickers'
|
||||
|
||||
@@ -54,6 +54,7 @@ android {
|
||||
dependencies {
|
||||
implementation project(":uhabits-core")
|
||||
implementation project(":android-base")
|
||||
implementation project(":android-pickers")
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:25.3.1'
|
||||
implementation 'com.android.support:design:25.3.1'
|
||||
|
||||
@@ -1,21 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2013 The Android Open Source Project
|
||||
|
||||
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>
|
||||
|
||||
<array name="lightPalette">
|
||||
<item>@color/red_700</item>
|
||||
<item>@color/deep_orange_700</item>
|
||||
@@ -84,31 +68,4 @@
|
||||
<item>@color/black_aa</item>
|
||||
<item>@color/black_aa</item>
|
||||
</array>
|
||||
|
||||
<!-- Time and Date picker -->
|
||||
<color name="circle_background">#f2f2f2</color>
|
||||
<color name="line_background">#cccccc</color>
|
||||
<color name="ampm_text_color">#8c8c8c</color>
|
||||
<color name="done_text_color_normal">#000000</color>
|
||||
<color name="done_text_color_disabled">#cccccc</color>
|
||||
<color name="numbers_text_color">#8c8c8c</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="transparent_black">#7f000000</color>
|
||||
<color name="blue">#33b5e5</color>
|
||||
<color name="blue_focused">#c1e8f7</color>
|
||||
<color name="neutral_pressed">#33999999</color>
|
||||
<color name="darker_blue">#0099cc</color>
|
||||
<color name="date_picker_text_normal">#ff999999</color>
|
||||
<color name="calendar_header">#999999</color>
|
||||
<color name="date_picker_view_animator">#f2f2f2</color>
|
||||
<color name="calendar_selected_date_text">#ffd1d2d4</color>
|
||||
<color name="done_text_color">#888888</color>
|
||||
<color name="done_text_color_dark">#888888</color>
|
||||
|
||||
<!-- Colors for red theme -->
|
||||
<color name="red">#ff3333</color>
|
||||
<color name="red_focused">#853333</color>
|
||||
<color name="light_gray">#404040</color>
|
||||
<color name="dark_gray">#363636</color>
|
||||
<color name="line_dark">#808080</color>
|
||||
</resources>
|
||||
@@ -154,18 +154,6 @@
|
||||
<item name="widgetBackgroundAlpha">0.25</item>
|
||||
</style>
|
||||
|
||||
<style name="time_label">
|
||||
<item name="android:textSize">@dimen/time_label_size</item>
|
||||
<item name="android:textColor">@color/numbers_text_color</item>
|
||||
</style>
|
||||
|
||||
<style name="ampm_label">
|
||||
<item name="android:textSize">@dimen/ampm_label_size</item>
|
||||
<item name="android:textAllCaps">true</item>
|
||||
<item name="android:textColor">@color/ampm_text_color</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="day_of_week_label_condensed"/>
|
||||
|
||||
<style name="CardList">
|
||||
@@ -253,10 +241,6 @@
|
||||
<item name="android:alpha">0.2</item>
|
||||
</style>
|
||||
|
||||
<style name="TimePickerDialog" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogWithTitle" parent="@style/Theme.AppCompat.Light.Dialog">
|
||||
<item name="windowNoTitle">false</item>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user