Commit db741a34 authored by aniket's avatar aniket

fixes minor issues

parent fdc71a42
...@@ -73,18 +73,20 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView { ...@@ -73,18 +73,20 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView {
override fun showChannelCreatedSuccessfullyMessage() { override fun showChannelCreatedSuccessfullyMessage() {
showToast(getString(R.string.msg_channel_created_successfully)) showToast(getString(R.string.msg_channel_created_successfully))
finish() finish()
//TODO check why the activity is not finishing
} }
override fun showMessage(resId: Int) { override fun showMessage(resId: Int) {
channel_name_edit_text.setText("")
showToast(getString(resId)) showToast(getString(resId))
} }
override fun showMessage(message: String) { override fun showMessage(message: String) {
channel_name_edit_text.setText("")
showToast(message) showToast(message)
} }
override fun showGenericErrorMessage() { override fun showGenericErrorMessage() {
channel_name_edit_text.setText("")
showMessage(getString(R.string.msg_generic_error)) showMessage(getString(R.string.msg_generic_error))
} }
...@@ -123,20 +125,20 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView { ...@@ -123,20 +125,20 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView {
channel_type.text = getString(R.string.public_channel_type) channel_type.text = getString(R.string.public_channel_type)
channel_description.text = getString(R.string.public_channel_description) channel_description.text = getString(R.string.public_channel_description)
placeholder.setImageDrawable(getDrawable(R.drawable.ic_hashtag_black)) placeholder.setImageDrawable(getDrawable(R.drawable.ic_hashtag_black_12dp))
(getDrawable(R.drawable.button_border) as GradientDrawable).setColor( (getDrawable(R.drawable.button_border) as GradientDrawable).setColor(
resources.getColor( resources.getColor(
R.color.colorLightTheme R.color.default_background
) )
) )
(getDrawable(R.drawable.button_solid) as GradientDrawable).setColor(resources.getColor(R.color.red)) (getDrawable(R.drawable.button_solid) as GradientDrawable).setColor(resources.getColor(R.color.colorRed))
private_channel.background = getDrawable(R.drawable.button_border) private_channel.background = getDrawable(R.drawable.button_border)
public_channel.background = getDrawable(R.drawable.button_solid) public_channel.background = getDrawable(R.drawable.button_solid)
private_channel.setTextColor(resources.getColor(R.color.red)) private_channel.setTextColor(resources.getColor(R.color.colorRed))
public_channel.setTextColor(resources.getColor(R.color.colorLightTheme)) public_channel.setTextColor(resources.getColor(R.color.default_background))
} }
private_channel.setOnClickListener { private_channel.setOnClickListener {
...@@ -145,24 +147,24 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView { ...@@ -145,24 +147,24 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView {
channel_type.text = getString(R.string.private_channel_type) channel_type.text = getString(R.string.private_channel_type)
channel_description.text = getString(R.string.private_channel_type_description) channel_description.text = getString(R.string.private_channel_type_description)
placeholder.setImageDrawable(getDrawable(R.drawable.ic_room_lock)) placeholder.setImageDrawable(getDrawable(R.drawable.ic_lock_black_12_dp))
(getDrawable(R.drawable.button_border) as GradientDrawable).setColor( (getDrawable(R.drawable.button_border) as GradientDrawable).setColor(
resources.getColor( resources.getColor(
R.color.red R.color.colorRed
) )
) )
(getDrawable(R.drawable.button_solid) as GradientDrawable).setColor(resources.getColor(R.color.colorLightTheme)) (getDrawable(R.drawable.button_solid) as GradientDrawable).setColor(resources.getColor(R.color.default_background))
(getDrawable(R.drawable.button_solid) as GradientDrawable).setStroke( (getDrawable(R.drawable.button_solid) as GradientDrawable).setStroke(
1, 1,
resources.getColor(R.color.red) resources.getColor(R.color.colorRed)
) )
private_channel.background = getDrawable(R.drawable.button_border) private_channel.background = getDrawable(R.drawable.button_border)
public_channel.background = getDrawable(R.drawable.button_solid) public_channel.background = getDrawable(R.drawable.button_solid)
private_channel.setTextColor(resources.getColor(R.color.colorLightTheme)) private_channel.setTextColor(resources.getColor(R.color.default_background))
public_channel.setTextColor(resources.getColor(R.color.red)) public_channel.setTextColor(resources.getColor(R.color.colorRed))
} }
toolbar_action_text.setOnClickListener { toolbar_action_text.setOnClickListener {
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<gradient <gradient
android:endColor="@color/colorLightTheme" android:endColor="@color/default_background"
android:startColor="@color/colorLightTheme" /> android:startColor="@color/default_background" />
<stroke <stroke
android:width="1dp" android:width="1dp"
android:color="@color/red" /> android:color="@color/colorRed" />
<corners <corners
android:bottomRightRadius="5dp" android:bottomRightRadius="5dp"
android:topRightRadius="5dp" /> android:topRightRadius="5dp" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/red" /> <solid android:color="@color/colorRed" />
<corners <corners
android:bottomLeftRadius="5dp" android:bottomLeftRadius="5dp"
android:topLeftRadius="5dp" /> android:topLeftRadius="5dp" />
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path
android:fillColor="@color/white" android:fillColor="@color/colorWhite"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector> </vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="13dp"
android:height="16dp"
android:viewportWidth="13.0"
android:viewportHeight="16.0">
<path
android:pathData="M6.626,11.495L4.505,11.495L3.714,16L1.703,16L2.495,11.495L0,11.495L0,9.604L2.824,9.604L3.374,6.484L0.824,6.484L0.824,4.571L3.714,4.571L4.516,0L6.516,0L5.714,4.571L7.846,4.571L8.648,0L10.659,0L9.857,4.571L12.264,4.571L12.264,6.484L9.516,6.484L8.967,9.604L11.429,9.604L11.429,11.495L8.637,11.495L7.846,16L5.835,16L6.626,11.495ZM4.835,9.604L6.956,9.604L7.505,6.484L5.374,6.484L4.835,9.604Z"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillColor="@color/colorSecondaryText"
android:strokeWidth="1"/>
</vector>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" android:visibility="gone"
app:indicatorColor="@color/black" app:indicatorColor="@color/colorBlack"
app:indicatorName="BallPulseIndicator" app:indicatorName="BallPulseIndicator"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/button_solid" android:background="@drawable/button_solid"
android:text="@string/public_channel_type" android:text="@string/public_channel_type"
android:textColor="@color/white" android:textColor="@color/default_background"
app:layout_constraintBottom_toBottomOf="@id/button_bottom_guideline" app:layout_constraintBottom_toBottomOf="@id/button_bottom_guideline"
app:layout_constraintEnd_toStartOf="@+id/private_channel" app:layout_constraintEnd_toStartOf="@+id/private_channel"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:background="@drawable/button_border" android:background="@drawable/button_border"
android:text="@string/private_channel_type" android:text="@string/private_channel_type"
android:textColor="@color/red" android:textColor="@color/colorRed"
app:layout_constraintBottom_toBottomOf="@id/button_bottom_guideline" app:layout_constraintBottom_toBottomOf="@id/button_bottom_guideline"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/public_channel" app:layout_constraintStart_toEndOf="@id/public_channel"
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:src="@drawable/ic_hashtag_black" android:src="@drawable/ic_hashtag_black_12dp"
app:layout_constraintBottom_toBottomOf="@id/channel_name_text_input_layout" app:layout_constraintBottom_toBottomOf="@id/channel_name_text_input_layout"
app:layout_constraintEnd_toStartOf="@id/channel_name_text_input_layout" app:layout_constraintEnd_toStartOf="@id/channel_name_text_input_layout"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
......
...@@ -65,6 +65,6 @@ ...@@ -65,6 +65,6 @@
app:useCompatPadding="true" app:useCompatPadding="true"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:src="@drawable/ic_add_white_24dp" android:src="@drawable/ic_add_white_24dp"
app:backgroundTint="@color/black" app:backgroundTint="@color/colorBlack"
/> />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:alpha="0.7" android:alpha="0.7"
android:background="?selectableItemBackground"
android:enabled="false" android:enabled="false"
android:gravity="end" android:gravity="end"
android:textSize="16sp" /> android:textSize="16sp" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment