Update transitions
@ -63,8 +63,8 @@ class MainFragment : Fragment() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
enterTransition = MaterialSharedAxis(MaterialSharedAxis.X, true)
|
||||
reenterTransition = MaterialSharedAxis(MaterialSharedAxis.X, false)
|
||||
enterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true)
|
||||
reenterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, false)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
@ -103,7 +103,7 @@ class MainFragment : Fragment() {
|
||||
|
||||
binding.actionSettings.setOnClickListener {
|
||||
Navigation.findNavController(it).navigate(R.id.action_appMainFragment_to_appSettingsFragment, null, null, FragmentNavigatorExtras(
|
||||
binding.actionBack to "action_back"
|
||||
// binding.fragmentTitle to "fragment_title"
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -52,9 +52,9 @@ class SettingsFragment : Fragment() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
sharedElementEnterTransition = TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
||||
enterTransition = MaterialSharedAxis(MaterialSharedAxis.X, true)
|
||||
// returnTransition = MaterialSharedAxis(MaterialSharedAxis.X, false)
|
||||
// sharedElementEnterTransition = TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
||||
enterTransition = MaterialSharedAxis(MaterialSharedAxis.Y, true)
|
||||
returnTransition = MaterialSharedAxis(MaterialSharedAxis.Y, false)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
|
@ -6,7 +6,6 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
@ -29,7 +28,6 @@ import com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomFontActivity
|
||||
import com.tommasoberlose.anotherwidget.ui.activities.MainActivity
|
||||
import com.tommasoberlose.anotherwidget.ui.activities.tabs.CustomDateActivity
|
||||
import com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel
|
||||
import com.tommasoberlose.anotherwidget.ui.widgets.MainWidget
|
||||
import com.tommasoberlose.anotherwidget.utils.isDarkTheme
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
|
@ -96,7 +96,6 @@ class MainViewModel(context: Application) : AndroidViewModel(context) {
|
||||
val showWallpaper = Preferences.asLiveData(Preferences::showWallpaper)
|
||||
val showPreview = Preferences.asLiveData(Preferences::showPreview)
|
||||
val installedIntegrations = Preferences.asLiveData(Preferences::installedIntegrations)
|
||||
var colorClipboard: ArrayList<String> = ArrayList()
|
||||
|
||||
// UI
|
||||
val fragmentScrollY = MutableLiveData<Int>()
|
||||
@ -169,19 +168,4 @@ class MainViewModel(context: Application) : AndroidViewModel(context) {
|
||||
|
||||
addSource(Preferences.asLiveData(Preferences::installedIntegrations)) { value = true }
|
||||
}
|
||||
|
||||
init {
|
||||
with(context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager) {
|
||||
if (hasPrimaryClip()) {
|
||||
(0..primaryClip!!.itemCount).forEach {
|
||||
try {
|
||||
val color = primaryClip!!.getItemAt(it).text.toString()
|
||||
if (color.isColor()) {
|
||||
colorClipboard.add(color)
|
||||
}
|
||||
} catch (ex: Exception) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-night-hdpi/round_content_copy_24.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
app/src/main/res/drawable-night-hdpi/round_content_paste_24.png
Normal file
After Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
BIN
app/src/main/res/drawable-night-mdpi/round_content_copy_24.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
app/src/main/res/drawable-night-mdpi/round_content_paste_24.png
Normal file
After Width: | Height: | Size: 253 B |
BIN
app/src/main/res/drawable-night-xhdpi/round_content_copy_24.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
app/src/main/res/drawable-night-xhdpi/round_content_paste_24.png
Normal file
After Width: | Height: | Size: 434 B |
BIN
app/src/main/res/drawable-night-xxhdpi/round_content_copy_24.png
Normal file
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 765 B |
10
app/src/main/res/drawable/round_content_copy_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15,1L4,1c-1.1,0 -2,0.9 -2,2v13c0,0.55 0.45,1 1,1s1,-0.45 1,-1L4,4c0,-0.55 0.45,-1 1,-1h10c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM18,21L9,21c-0.55,0 -1,-0.45 -1,-1L8,8c0,-0.55 0.45,-1 1,-1h9c0.55,0 1,0.45 1,1v12c0,0.55 -0.45,1 -1,1z"/>
|
||||
</vector>
|
10
app/src/main/res/drawable/round_content_paste_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,2h-4.18C14.4,0.84 13.3,0 12,0S9.6,0.84 9.18,2L5,2c-1.1,0 -2,0.9 -2,2v16c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2L21,4c0,-1.1 -0.9,-2 -2,-2zM12,2c0.55,0 1,0.45 1,1s-0.45,1 -1,1 -1,-0.45 -1,-1 0.45,-1 1,-1zM18,20L6,20c-0.55,0 -1,-0.45 -1,-1L5,5c0,-0.55 0.45,-1 1,-1h1v1c0,1.1 0.9,2 2,2h6c1.1,0 2,-0.9 2,-2L17,4h1c0.55,0 1,0.45 1,1v14c0,0.55 -0.45,1 -1,1z"/>
|
||||
</vector>
|
@ -38,7 +38,7 @@
|
||||
android:id="@+id/message"
|
||||
android:gravity="start"
|
||||
android:textAlignment="viewStart"
|
||||
android:text="Messaggio molto lungo di cui voirre akjcbasaskdask flasdas fashbdfjah fahsbd ajsbd "
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimaryText"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
|
@ -24,6 +24,7 @@
|
||||
android:paddingRight="32dp"
|
||||
android:id="@+id/header_text"
|
||||
android:text=""
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/colorPrimaryText"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:textAppearance="@style/AnotherWidget.Settings.Subtitle"
|
||||
|
@ -16,23 +16,32 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/header"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||
app:textAllCaps="false"
|
||||
android:letterSpacing="0"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="32dp"
|
||||
android:paddingRight="32dp"
|
||||
android:gravity="start"
|
||||
android:textAlignment="viewStart"
|
||||
android:id="@+id/header_text"
|
||||
android:text=""
|
||||
android:textColor="@color/colorPrimaryText"/>
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="center_vertical">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:textAppearance="@style/AnotherWidget.Settings.Title"
|
||||
app:textAllCaps="false"
|
||||
android:letterSpacing="0"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:gravity="start"
|
||||
android:textSize="20sp"
|
||||
android:textAlignment="viewStart"
|
||||
android:id="@+id/header_text"
|
||||
android:text="@string/settings_font_color_title"
|
||||
android:textColor="@color/colorPrimaryText"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
@ -31,7 +31,6 @@
|
||||
android:src="@drawable/round_arrow_back_24"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:transitionName="action_back"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
app:tint="@color/colorPrimaryText"
|
||||
android:layout_centerVertical="true"
|
||||
@ -65,6 +64,7 @@
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:transitionName="action_back"
|
||||
android:padding="8dp"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/round_short_text_24"
|
||||
|