move a couple files to subfolders, no code change

This commit is contained in:
tibbi 2016-11-17 19:11:13 +01:00
parent 80bd5bbadf
commit 7ecf1da2d9
28 changed files with 60 additions and 28 deletions

View File

@ -22,6 +22,8 @@ import android.widget.RemoteViews;
import com.simplemobiletools.calendar.activities.DayActivity;
import com.simplemobiletools.calendar.activities.MainActivity;
import com.simplemobiletools.calendar.helpers.Config;
import com.simplemobiletools.calendar.interfaces.MonthlyCalendar;
import com.simplemobiletools.calendar.models.Day;
import org.joda.time.DateTime;

View File

@ -8,6 +8,7 @@ import android.graphics.Color;
import android.os.SystemClock;
import android.widget.Toast;
import com.simplemobiletools.calendar.helpers.Formatter;
import com.simplemobiletools.calendar.models.Event;
import com.simplemobiletools.calendar.receivers.NotificationReceiver;

View File

@ -15,9 +15,9 @@ import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import com.simplemobiletools.calendar.Config;
import com.simplemobiletools.calendar.helpers.Config;
import com.simplemobiletools.calendar.Constants;
import com.simplemobiletools.calendar.MonthlyCalendar;
import com.simplemobiletools.calendar.interfaces.MonthlyCalendar;
import com.simplemobiletools.calendar.MonthlyCalendarImpl;
import com.simplemobiletools.calendar.MyWidgetProvider;
import com.simplemobiletools.calendar.R;

View File

@ -1,6 +1,10 @@
package com.simplemobiletools.calendar
import android.content.Context
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.interfaces.MonthlyCalendar
import com.simplemobiletools.calendar.models.Day
import com.simplemobiletools.calendar.models.Event
import org.joda.time.DateTime

View File

@ -2,6 +2,9 @@ package com.simplemobiletools.calendar
import android.content.Context
import android.util.SparseArray
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.interfaces.YearlyCalendar
import com.simplemobiletools.calendar.models.Event
import org.joda.time.DateTime
import java.util.*

View File

@ -7,7 +7,7 @@ import android.support.design.widget.Snackbar
import android.support.v4.view.ViewPager
import android.view.View
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.adapters.MyDayPagerAdapter
import com.simplemobiletools.calendar.fragments.DayFragment

View File

@ -12,6 +12,8 @@ import android.widget.AdapterView
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.extensions.*
import com.simplemobiletools.calendar.fragments.DayFragment
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.models.Event
import kotlinx.android.synthetic.main.activity_event.*
import org.joda.time.DateTime

View File

@ -9,7 +9,7 @@ import android.view.Menu
import android.view.MenuItem
import android.view.View
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.adapters.MyMonthPagerAdapter
import com.simplemobiletools.calendar.adapters.MyYearPagerAdapter

View File

@ -3,7 +3,7 @@ package com.simplemobiletools.calendar.activities
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.MenuItem
import com.simplemobiletools.calendar.Config
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.R
open class SimpleActivity : AppCompatActivity() {

View File

@ -5,7 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.models.Event
import kotlinx.android.synthetic.main.event_item.view.*

View File

@ -7,7 +7,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.TextView
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.models.ListEvent
import com.simplemobiletools.calendar.models.ListItem

View File

@ -6,7 +6,7 @@ import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentStatePagerAdapter
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.NavigationListener
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.fragments.MonthFragment
class MyMonthPagerAdapter(fm: FragmentManager, private val mCodes: List<String>, private val mListener: NavigationListener) : FragmentStatePagerAdapter(fm) {

View File

@ -5,7 +5,7 @@ import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentStatePagerAdapter
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.NavigationListener
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.fragments.YearFragment
class MyYearPagerAdapter(fm: FragmentManager, private val mYears: List<Int>, private val mListener: NavigationListener) : FragmentStatePagerAdapter(fm) {

View File

@ -14,10 +14,13 @@ import android.widget.AdapterView
import android.widget.DatePicker
import android.widget.RelativeLayout
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.activities.EventActivity
import com.simplemobiletools.calendar.adapters.EventsAdapter
import com.simplemobiletools.calendar.extensions.updateWidget
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.models.Event
import kotlinx.android.synthetic.main.day_fragment.view.*
import kotlinx.android.synthetic.main.top_navigation.view.*

View File

@ -9,13 +9,15 @@ import android.view.*
import android.widget.AbsListView
import android.widget.AdapterView
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.activities.EventActivity
import com.simplemobiletools.calendar.activities.MainActivity
import com.simplemobiletools.calendar.adapters.EventsListAdapter
import com.simplemobiletools.calendar.extensions.beGoneIf
import com.simplemobiletools.calendar.extensions.beVisibleIf
import com.simplemobiletools.calendar.extensions.updateWidget
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.models.Event
import com.simplemobiletools.calendar.models.ListEvent
import com.simplemobiletools.calendar.models.ListItem

View File

@ -14,6 +14,10 @@ import android.widget.*
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.activities.DayActivity
import com.simplemobiletools.calendar.extensions.beVisibleIf
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.interfaces.MonthlyCalendar
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.models.Day
import kotlinx.android.synthetic.main.first_row.*
import kotlinx.android.synthetic.main.month_fragment.view.*

View File

@ -9,6 +9,9 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.interfaces.NavigationListener
import com.simplemobiletools.calendar.interfaces.YearlyCalendar
import com.simplemobiletools.calendar.views.SmallMonthView
import kotlinx.android.synthetic.main.year_fragment.view.*
import org.joda.time.DateTime

View File

@ -1,7 +1,8 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.helpers
import android.content.Context
import android.content.SharedPreferences
import com.simplemobiletools.calendar.Constants
import java.util.*
class Config(context: Context) {
@ -25,7 +26,7 @@ class Config(context: Context) {
var isSundayFirst: Boolean
get() {
val isSundayFirst = java.util.Calendar.getInstance(Locale.getDefault()).firstDayOfWeek == java.util.Calendar.SUNDAY
val isSundayFirst = Calendar.getInstance(Locale.getDefault()).firstDayOfWeek == Calendar.SUNDAY
return mPrefs.getBoolean(Constants.SUNDAY_FIRST, isSundayFirst)
}
set(sundayFirst) = mPrefs.edit().putBoolean(Constants.SUNDAY_FIRST, sundayFirst).apply()

View File

@ -1,4 +1,4 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.helpers
import android.content.ContentValues
import android.content.Context
@ -7,13 +7,15 @@ import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.database.sqlite.SQLiteQueryBuilder
import android.text.TextUtils
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.extensions.getIntValue
import com.simplemobiletools.calendar.extensions.getStringValue
import com.simplemobiletools.calendar.models.Event
import org.joda.time.DateTime
import java.util.*
class DBHelper(context: Context) : SQLiteOpenHelper(context, DBHelper.DB_NAME, null, DBHelper.DB_VERSION) {
class DBHelper(context: Context) : SQLiteOpenHelper(context, DB_NAME, null, DB_VERSION) {
private val MAIN_TABLE_NAME = "events"
private val COL_ID = "id"
private val COL_START_TS = "start_ts"
@ -202,11 +204,11 @@ class DBHelper(context: Context) : SQLiteOpenHelper(context, DBHelper.DB_NAME, n
val builder = SQLiteQueryBuilder()
builder.tables = "$MAIN_TABLE_NAME LEFT OUTER JOIN $META_TABLE_NAME ON $COL_EVENT_ID = $MAIN_TABLE_NAME.$COL_ID"
val projection = allColumns
return builder.query(mDb, projection, selection, selectionArgs, MAIN_TABLE_NAME + "." + COL_ID, null, COL_START_TS)
return builder.query(mDb, projection, selection, selectionArgs, MAIN_TABLE_NAME + "build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/res" + COL_ID, null, COL_START_TS)
}
private val allColumns: Array<String>
get() = arrayOf(MAIN_TABLE_NAME + "." + COL_ID, COL_START_TS, COL_END_TS, COL_TITLE, COL_DESCRIPTION, COL_REMINDER_MINUTES, COL_REPEAT_INTERVAL, COL_REPEAT_MONTH, COL_REPEAT_DAY)
get() = arrayOf(MAIN_TABLE_NAME + "build/intermediates/exploded-aar/com.android.support/support-v4/23.4.0/res" + COL_ID, COL_START_TS, COL_END_TS, COL_TITLE, COL_DESCRIPTION, COL_REMINDER_MINUTES, COL_REPEAT_INTERVAL, COL_REPEAT_MONTH, COL_REPEAT_DAY)
private fun fillEvents(cursor: Cursor?): List<Event> {
val events = ArrayList<Event>()

View File

@ -1,6 +1,7 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.helpers
import android.content.Context
import com.simplemobiletools.calendar.R
import org.joda.time.DateTime
import org.joda.time.DateTimeZone
import org.joda.time.format.DateTimeFormat
@ -45,9 +46,9 @@ object Formatter {
fun getDayEndTS(dayCode: String) = (getLocalDateTimeFromCode(dayCode).plusDays(1).minusMinutes(1).millis / 1000).toInt()
fun getDayCodeFromTS(ts: Int) = getDateTimeFromTS(ts).toString(Formatter.DAYCODE_PATTERN)
fun getDayCodeFromTS(ts: Int) = getDateTimeFromTS(ts).toString(DAYCODE_PATTERN)
fun getDayCodeFromDateTime(dateTime: DateTime) = dateTime.toString(Formatter.DAYCODE_PATTERN)
fun getDayCodeFromDateTime(dateTime: DateTime) = dateTime.toString(DAYCODE_PATTERN)
fun getDateTimeFromTS(ts: Int) = DateTime(ts * 1000L, DateTimeZone.getDefault())

View File

@ -1,4 +1,4 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.interfaces
import com.simplemobiletools.calendar.models.Day

View File

@ -1,4 +1,4 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.interfaces
import org.joda.time.DateTime

View File

@ -1,4 +1,4 @@
package com.simplemobiletools.calendar
package com.simplemobiletools.calendar.interfaces
import android.util.SparseArray
import java.util.*

View File

@ -1,7 +1,7 @@
package com.simplemobiletools.calendar.models
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.helpers.Formatter
import org.joda.time.DateTime
import java.io.Serializable

View File

@ -3,7 +3,7 @@ package com.simplemobiletools.calendar.receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.simplemobiletools.calendar.DBHelper
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.Utils
class BootCompletedReceiver : BroadcastReceiver() {

View File

@ -7,8 +7,12 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.media.RingtoneManager
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.Utils
import com.simplemobiletools.calendar.activities.EventActivity
import com.simplemobiletools.calendar.helpers.DBHelper
import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.calendar.models.Event
class NotificationReceiver : BroadcastReceiver() {

View File

@ -6,7 +6,7 @@ import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View
import com.simplemobiletools.calendar.Config
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.Utils

View File

@ -3,7 +3,7 @@ package com.simplemobiletools.calendar.views.dialogs
import android.app.Activity
import android.app.AlertDialog
import android.widget.RadioGroup
import com.simplemobiletools.calendar.Config
import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.R
import kotlinx.android.synthetic.main.dialog_change_views.view.*