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
class MainActivity : BaseMvpActivity(), MainView { | |
companion object { | |
const val ACTION_FRAGMENT = "FRAGMENT_CHANGE" | |
const val DELETE_THERAPY = "DELETE_THERAPY" | |
const val CHANGE_PROFILE = "CHANGE_PROFILE" | |
const val UPDATE_DATA = "UPDATE_DATA" | |
} | |
private var presenter = MainPresenter(this) | |
private var navigator: Navigator? = null |
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
class MainActivity : BaseMvpActivity(), MainView { | |
companion object { | |
const val ACTION_FRAGMENT = "FRAGMENT_CHANGE" | |
const val DELETE_THERAPY = "DELETE_THERAPY" | |
const val CHANGE_PROFILE = "CHANGE_PROFILE" | |
const val UPDATE_DATA = "UPDATE_DATA" | |
} | |
private var presenter = MainPresenter(this) | |
private var navigator: Navigator? = null |
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
public class MainActivity extends AppCompatActivity { | |
private DrawerLayout mDrawer; | |
private Toolbar toolbar; | |
private NavigationView nvDrawer; | |
private ActionBarDrawerToggle drawerToggle; | |
Context mContext; | |
// Default active navigation menu | |
int mActiveMenu; |
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
package ru.skillbranch.devintensive.ui.custom | |
import android.content.Context | |
import android.content.res.Resources | |
import android.graphics.* | |
import android.graphics.Bitmap.Config |
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
public class WorkspaceAdapter extends RecyclerView.Adapter<WorkspaceAdapter.AbstractViewHolder> { | |
private Context mContext; | |
private static WorkspaceItemClickListener mListener; | |
; | |
private List<WorkspaceResponse.Workspace> mWorkspaceList; | |
public WorkspaceAdapter(Context mContext) { | |
this.mContext = mContext; |
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
@Suppress("MemberVisibilityCanBePrivate") | |
class ApiResponse<T> { | |
val code: Int | |
val body: T? | |
val message: ApiError? | |
val isSuccessful: Boolean | |
get() = code in 200..300 | |
val isFailure: Boolean |
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
class TopHeadlinesFragment : Fragment() { | |
var topHeadlinesAdapter: TopHeadlinesAdapter? = null | |
//3 | |
override fun onCreateView( | |
inflater: LayoutInflater, | |
container: ViewGroup?, | |
savedInstanceState: Bundle? |
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
class CustomAdapter(internal var context: Context, private val items: List<Group>) : BaseAdapter() { | |
internal var TAG = CustomAdapter::class.java.simpleName | |
internal var inflater: LayoutInflater | |
init { | |
inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater | |
} |
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
@Entity(tableName = "news_table") | |
data class Article(@ColumnInfo(name = "author")val author: String, | |
val content: String, | |
val description: String, | |
val publishedAt: String, | |
val source: Source, | |
val title: String, | |
val url: String, | |
val urlToImage: String | |
) |