-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #426 from lapism/dev
Dev
- Loading branch information
Showing
13 changed files
with
129 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/kotlin/com/lapism/search/widget/MaterialTransparentToolbar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.lapism.search.widget | ||
|
||
import android.content.Context | ||
import android.os.Build | ||
import android.util.AttributeSet | ||
import androidx.core.content.ContextCompat | ||
import com.google.android.material.appbar.MaterialToolbar | ||
|
||
|
||
open class MaterialTransparentToolbar : MaterialToolbar { | ||
|
||
// ********************************************************************************************* | ||
constructor(context: Context) : super(context) | ||
|
||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) | ||
|
||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super( | ||
context, | ||
attrs, | ||
defStyleAttr | ||
) | ||
|
||
// ********************************************************************************************* | ||
init { | ||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { | ||
outlineAmbientShadowColor = ContextCompat.getColor(context, android.R.color.transparent) | ||
outlineSpotShadowColor = ContextCompat.getColor(context, android.R.color.transparent) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TextView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/search_toolbar_text_view" | ||
style="@style/MaterialSearchTextAppearance" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="end" | ||
android:importantForAccessibility="no" | ||
android:maxLines="1" | ||
android:textSize="@dimen/search_sp_16" /> | ||
android:maxLines="1" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.