removing and updating a couple resources
This commit is contained in:
parent
d46f479c18
commit
841f084c8b
|
@ -1,19 +0,0 @@
|
|||
package com.simplemobiletools.calendar.extensions
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.EditText
|
||||
|
||||
fun Activity.hideKeyboard() {
|
||||
val inputMethodManager = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
inputMethodManager.hideSoftInputFromWindow((currentFocus ?: View(this)).windowToken, 0)
|
||||
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||
}
|
||||
|
||||
fun Activity.showKeyboard(et: EditText) {
|
||||
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.showSoftInput(et, InputMethodManager.SHOW_IMPLICIT)
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package com.simplemobiletools.calendar.extensions
|
||||
|
||||
import android.database.Cursor
|
||||
|
||||
fun Cursor.getStringValue(key: String) = getString(getColumnIndex(key))
|
||||
|
||||
fun Cursor.getIntValue(key: String) = getInt(getColumnIndex(key))
|
|
@ -1,5 +0,0 @@
|
|||
package com.simplemobiletools.calendar.extensions
|
||||
|
||||
import android.widget.EditText
|
||||
|
||||
val EditText.value: String get() = text.toString().trim()
|
|
@ -1,11 +0,0 @@
|
|||
package com.simplemobiletools.calendar.extensions
|
||||
|
||||
import android.graphics.Color
|
||||
|
||||
fun Int.adjustAlpha(factor: Float): Int {
|
||||
val alpha = Math.round(Color.alpha(this) * factor)
|
||||
val red = Color.red(this)
|
||||
val green = Color.green(this)
|
||||
val blue = Color.blue(this)
|
||||
return Color.argb(alpha, red, green, blue)
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid
|
||||
android:color="@color/mediumGrey"/>
|
||||
android:color="@color/pressed_item_foreground"/>
|
||||
</shape>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/activity_margin"
|
||||
android:src="@mipmap/plus"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
app:rippleColor="@color/mediumGrey"/>
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:rippleColor="@color/pressed_item_foreground"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/activity_margin"
|
||||
android:src="@mipmap/plus"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
app:rippleColor="@color/mediumGrey"/>
|
||||
app:backgroundTint="@color/color_primary"
|
||||
app:rippleColor="@color/pressed_item_foreground"/>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
|
@ -146,8 +146,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginEnd="@dimen/tiny_margin"
|
||||
android:layout_marginRight="@dimen/tiny_margin"
|
||||
android:layout_marginEnd="@dimen/small_margin"
|
||||
android:layout_marginRight="@dimen/small_margin"
|
||||
android:background="@null"
|
||||
android:clickable="false"/>
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
android:id="@+id/event_item_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="@dimen/event_padding"
|
||||
android:paddingTop="@dimen/event_padding">
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:paddingTop="@dimen/medium_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_item_start"
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/event_item_background"
|
||||
android:paddingBottom="@dimen/event_padding"
|
||||
android:paddingBottom="@dimen/medium_margin"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/tiny_margin">
|
||||
android:paddingTop="@dimen/small_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/event_item_start"
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="1dp"
|
||||
android:drawableTop="@drawable/divider"
|
||||
android:paddingTop="@dimen/tiny_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
android:textStyle="bold"/>
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="1dp"
|
||||
android:drawableTop="@drawable/divider"
|
||||
android:paddingTop="@dimen/tiny_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
android:textStyle="bold"/>
|
||||
|
|
|
@ -57,5 +57,5 @@
|
|||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="@android:string/ok"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/config_text_size"/>
|
||||
android:textSize="@dimen/big_text_size"/>
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -54,5 +54,5 @@
|
|||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="@android:string/ok"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/config_text_size" />
|
||||
android:textSize="@dimen/big_text_size" />
|
||||
</RelativeLayout>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<resources>
|
||||
<dimen name="social_padding">12dp</dimen>
|
||||
<dimen name="social_logo">50dp</dimen>
|
||||
|
||||
<dimen name="min_widget_width">320dp</dimen>
|
||||
<dimen name="min_widget_height">320dp</dimen>
|
||||
|
||||
|
@ -9,5 +6,5 @@
|
|||
<dimen name="day_text_size">24sp</dimen>
|
||||
<dimen name="today_text_size">34sp</dimen>
|
||||
<dimen name="month_text_size">30sp</dimen>
|
||||
<dimen name="config_text_size">22sp</dimen>
|
||||
<dimen name="big_text_size">22sp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#fff68630</color>
|
||||
<color name="colorPrimaryDark">#ffe27725</color>
|
||||
<color name="colorAccent">@color/colorPrimary</color>
|
||||
|
||||
<color name="pressed_item_foreground">#08000000</color>
|
||||
<color name="activated_item_foreground">#44888888</color>
|
||||
<color name="mediumGrey">#18000000</color>
|
||||
<color name="divider_grey">#44cccccc</color>
|
||||
<color name="dark_theme_dialog_background">#ff333333</color>
|
||||
</resources>
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
<resources>
|
||||
<dimen name="activity_margin">16dp</dimen>
|
||||
<dimen name="big_margin">24dp</dimen>
|
||||
<dimen name="tiny_margin">4dp</dimen>
|
||||
<dimen name="medium_padding">8dp</dimen>
|
||||
<dimen name="social_padding">8dp</dimen>
|
||||
<dimen name="social_logo">40dp</dimen>
|
||||
<dimen name="event_padding">8dp</dimen>
|
||||
<dimen name="top_padding">8dp</dimen>
|
||||
<dimen name="settings_padding">8dp</dimen>
|
||||
<dimen name="yearly_padding_side">10dp</dimen>
|
||||
<dimen name="yearly_padding_half">3dp</dimen>
|
||||
<dimen name="yearly_padding_full">6dp</dimen>
|
||||
|
@ -15,10 +6,7 @@
|
|||
<dimen name="min_widget_width">250dp</dimen>
|
||||
<dimen name="min_widget_height">250dp</dimen>
|
||||
|
||||
<dimen name="tiny_text_size">9sp</dimen>
|
||||
<dimen name="normal_text_size">14sp</dimen>
|
||||
<dimen name="day_text_size">16sp</dimen>
|
||||
<dimen name="today_text_size">26sp</dimen>
|
||||
<dimen name="month_text_size">22sp</dimen>
|
||||
<dimen name="config_text_size">18sp</dimen>
|
||||
<dimen name="today_text_size">26sp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorPrimary">@color/color_primary</item>
|
||||
<item name="colorPrimaryDark">@color/color_primary_dark</item>
|
||||
<item name="colorAccent">@color/color_primary</item>
|
||||
<item name="buttonStyle">@style/MyButton</item>
|
||||
<item name="android:buttonStyle">@style/MyButton</item>
|
||||
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
||||
|
@ -13,20 +13,6 @@
|
|||
<item name="android:spinnerDropDownItemStyle">@style/SpinnerItem.DropDownItem</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Dark" parent="Theme.AppCompat">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="buttonStyle">@style/MyButton</item>
|
||||
<item name="android:buttonStyle">@style/MyButton</item>
|
||||
<item name="actionBarStyle">@style/AppTheme.ActionBarStyle</item>
|
||||
<item name="android:textSize">@dimen/normal_text_size</item>
|
||||
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
|
||||
<item name="spinnerDropDownItemStyle">@style/SpinnerItem.DropDownItem</item>
|
||||
<item name="android:spinnerDropDownItemStyle">@style/SpinnerItem.DropDownItem</item>
|
||||
<item name="android:windowBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="DayView">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">@dimen/day_text_size</item>
|
||||
|
@ -54,19 +40,8 @@
|
|||
|
||||
<style name="MyAlertDialog" parent="Base.Theme.AppCompat.Light.Dialog.Alert"/>
|
||||
|
||||
<style name="MyAlertDialog.Dark" parent="Base.Theme.AppCompat.Dialog.Alert"/>
|
||||
|
||||
<style name="DialogTheme" parent="Theme.AppCompat.Light.Dialog">
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogTheme.Dark" parent="Theme.AppCompat.Dialog">
|
||||
<item name="android:windowBackground">@color/dark_theme_dialog_background</item>
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.ActionBarStyle" parent="@style/Base.Widget.AppCompat.ActionBar">
|
||||
<item name="background">@color/colorPrimary</item>
|
||||
<item name="background">@color/color_primary</item>
|
||||
<item name="titleTextStyle">@style/AppTheme.ActionBar.TitleTextStyle</item>
|
||||
</style>
|
||||
|
||||
|
@ -75,8 +50,6 @@
|
|||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
<style name="EditTextStyle" parent="@android:style/Widget.TextView"/>
|
||||
|
||||
<style name="SpinnerItem" parent="@android:style/Widget.TextView">
|
||||
<item name="android:paddingRight">@dimen/activity_margin</item>
|
||||
<item name="android:gravity">center</item>
|
||||
|
|
Loading…
Reference in New Issue