Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from nodes-projects/feature/uimessage
Browse files Browse the repository at this point in the history
ui messages
  • Loading branch information
biscon committed Feb 16, 2018
2 parents 9729431 + a68f04e commit 8cd340b
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package dk.eboks.app.presentation.ui.components.message.locked

import dk.nodes.arch.presentation.base.BasePresenter
import dk.nodes.arch.presentation.base.BaseView

/**
* Created by bison on 07-11-2017.
*/
interface LockedMessageComponentContract {
interface View : BaseView {

}

interface Presenter : BasePresenter<View> {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package dk.eboks.app.presentation.ui.components.message.locked

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import dk.eboks.app.R
import dk.eboks.app.pasta.fragment.PastaComponentContract
import dk.eboks.app.presentation.base.BaseFragment
import javax.inject.Inject

/**
* Created by bison on 09-02-2018.
*/
class LockedMessageComponentFragment : BaseFragment(), LockedMessageComponentContract.View {

@Inject
lateinit var presenter : LockedMessageComponentContract.Presenter

override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
val rootView = inflater?.inflate(R.layout.fragment_locked_message_component, container, false)
return rootView
}

override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
//component.inject(this)
presenter.onViewCreated(this, lifecycle)
}

override fun setupTranslations() {

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package dk.eboks.app.presentation.ui.components.message.locked

import dk.eboks.app.domain.managers.AppStateManager
import dk.eboks.app.pasta.fragment.PastaComponentContract
import dk.nodes.arch.presentation.base.BasePresenterImpl
import javax.inject.Inject

/**
* Created by bison on 20-05-2017.
*/
class LockedMessageComponentPresenter @Inject constructor(val appState: AppStateManager) : LockedMessageComponentContract.Presenter, BasePresenterImpl<LockedMessageComponentContract.View>() {

init {
}

}
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/circle_gradiant.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<gradient
android:endColor="#be1c36"
android:startColor="#ac236c"
android:angle="135" />
<size
android:width="120dp"
android:height="120dp"/>
</shape>
107 changes: 107 additions & 0 deletions app/src/main/res/layout/fragment_locked_message_component.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">


<!--Top part-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/backgroundColor"
android:orientation="vertical"
android:weightSum="4">

<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2" />

<ImageView
android:layout_width="240dp"
android:layout_height="240dp"
android:layout_gravity="center"
android:src="@drawable/ic_visual_mail" />

<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2" />
</LinearLayout>

<!--middle image-->

<!--Bottom part-->
<android.support.v7.widget.CardView
android:id="@+id/containerCv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:cardElevation="3dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="52dp"
android:orientation="vertical">

<TextView
style="@style/text.header1"
android:id="@+id/headerTv"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_gravity="center_horizontal"
android:text="Recalled by sender" />

<TextView
style="@style/text.body6.secondary"
android:id="@+id/mainTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingLeft="40dp"
android:paddingRight="40dp"
android:text="Donec euismod a nulla a cursus. Nullam varius magna augue, in tincidunt arcu aliquet lobortis. Quisque ac ipsum tellus. Morbi nibh risus, fermentum a nunc id, cursus vehicula nibh." />


<TextView
style="@style/text.buttonSmall.tertiary"
android:id="@+id/deleteButtonTv"
android:text="Delete message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingBottom="20dp"
/>

</LinearLayout>


</android.support.v7.widget.CardView>
</LinearLayout>

<ImageView
android:id="@+id/BackBtn"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_gravity="center"
android:background="@drawable/circle_gradiant"
app:layout_anchor="@+id/containerCv"
app:layout_anchorGravity="center|top" />

<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:src="@drawable/ic_reply_white"
app:layout_anchor="@+id/containerCv"
app:layout_anchorGravity="center|top" />
</android.support.design.widget.CoordinatorLayout>

0 comments on commit 8cd340b

Please sign in to comment.