Skip to content

Instantly share code, notes, and snippets.

View bangiqi's full-sized avatar
🏠
Working from home

Rizki Ramdani bangiqi

🏠
Working from home
  • Female Daily Network
  • Bogor, Indonesia
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_nama_blnhijriah"
android:layout_width="match_parent"
class BulanHijriyahAdapter(val items: ArrayList<String>, val context: Context) : RecyclerView.Adapter<ViewHolder>() {
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder?.tvNamaBulanHijriyah?.text = items.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(LayoutInflater.from(context).inflate(R.layout.bulan_hijriyah_list_item, parent, false))
}
package tutorial.sample.ramdanix.kotlinrecyclerviewexample
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
class ViewHolder (view: View) : RecyclerView.ViewHolder(view){
val tvNamaBulanHijriyah = view.tv_nama_blnhijriah
}
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<android.support.v7.widget.RecyclerView
class BulanHijriyahAdapter(val items: ArrayList<String>, val context: Context) : RecyclerView.Adapter<ViewHolder>() {
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder?.tvNamaBulanHijriyah?.text = items.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(LayoutInflater.from(context).inflate(R.layout.bulan_hijriyah_list_item, parent, false))
}
void initNavigationView()
{
navigationView = (NavigationView) findViewById(R.id.nav_view);
//view header layout xml
View headerLayout = navigationView.inflateHeaderView(R.layout.nav_header_main);
final ImageView navPhoto = (ImageView) headerLayout.findViewById(R.id.nav_head_photo);
TextView navHeadUsername = (TextView) headerLayout.findViewById(R.id.nav_head_username);
TextView navHeadEmail = (TextView) headerLayout.findViewById(R.id.nav_head_email);
package com.labs.ramdani.klubpompibpom.activity.klubpompi.view;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
<?php
$data = [];
$data = [
[
"title"=>"PKS",
"total"=>100
],
[
//
// ViewedViewController.swift
// Pasar Selon
//
// Created by Rizki Ramdani on 1/14/18.
// Copyright © 2018 Rizki Ramdani. All rights reserved.
//
import UIKit
import XLPagerTabStrip