The document discusses how to create an Android project using a navigation drawer to display a class schedule. It provides step-by-step instructions to set up the navigation drawer menu, fragments to display the schedule for each day, and classes to store and display the schedule data. Key aspects covered include creating layouts for the drawer menu, fragments and schedule items, adding sample schedule data, and using fragments and bundles to display the appropriate schedule based on the selected drawer menu item.
Minicurso sobre desenvolvimento de aplicações com android. Passo a passo do desenvolvimento de uma App de TODO. Utilizando Android Studio. CRUD + Banco de dados (SQLite)
Minicurso sobre desenvolvimento de aplicações com android. Passo a passo do desenvolvimento de uma App de TODO. Utilizando Android Studio. CRUD + Banco de dados (SQLite)
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
We provide some examples on how to integrate social media on Android apps, from the simple “Share” button to more complex integrations like using Twitter, LinkedIn or Facebook APIs, including logging-in with social media.
As an example we developed a open source “Social Media Demo” application with all the examples in this presentation.
Nessa apresentação demonstro como aplicar alguns dos Architecture Components disponíveis no Jetpack em uma arquitetura que segue o padrão Clean com MVVM.
React.js workshop slides. In this workshop we did a deep dive to see how React components are essentially Javascript and how they work. A hands on workshop covering React elements, functional components, props, class components and state.
Saindo da zona de conforto… resolvi aprender androidDaniel Baccin
Palestra sobre Android realizada na Secomp - UECE. A ideia dessa palestra é motivar estudantes, profissionais e “devs”, em geral, a conhecer um pouco mais sobre o desenvolvimento de aplicativos na plataforma Android. Além disso, será discutido sobre os desafios enfrentados durante o aprendizado, oportunidades existentes no mercado, perspectivas futuras sobre a plataforma e experiências já adquiridas na área. Também, será abordando conceitos básicos e intermediários através de exemplos práticos, ferramentas utilizadas e dicas de boas práticas para o desenvolvimento.
Bel ajar android kali ini akan membahas tentang pembuatan katalog produk pada aplicais android yang ditampilkan dalam bentuk Grid yang didalamnya ada gambar, nama dan harga
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
We provide some examples on how to integrate social media on Android apps, from the simple “Share” button to more complex integrations like using Twitter, LinkedIn or Facebook APIs, including logging-in with social media.
As an example we developed a open source “Social Media Demo” application with all the examples in this presentation.
Nessa apresentação demonstro como aplicar alguns dos Architecture Components disponíveis no Jetpack em uma arquitetura que segue o padrão Clean com MVVM.
React.js workshop slides. In this workshop we did a deep dive to see how React components are essentially Javascript and how they work. A hands on workshop covering React elements, functional components, props, class components and state.
Saindo da zona de conforto… resolvi aprender androidDaniel Baccin
Palestra sobre Android realizada na Secomp - UECE. A ideia dessa palestra é motivar estudantes, profissionais e “devs”, em geral, a conhecer um pouco mais sobre o desenvolvimento de aplicativos na plataforma Android. Além disso, será discutido sobre os desafios enfrentados durante o aprendizado, oportunidades existentes no mercado, perspectivas futuras sobre a plataforma e experiências já adquiridas na área. Também, será abordando conceitos básicos e intermediários através de exemplos práticos, ferramentas utilizadas e dicas de boas práticas para o desenvolvimento.
Bel ajar android kali ini akan membahas tentang pembuatan katalog produk pada aplicais android yang ditampilkan dalam bentuk Grid yang didalamnya ada gambar, nama dan harga
Belajar Android Studio CRUD Data MahasiswaAgus Haryanto
Belajar Android Studio yang berfokus pada operasi CRUD Insert, Select, Update dan Delete pada database SQLite Android dengan mengambil contoh data mahasiswa
Belajar Android PHP MySQL Login dengan VolleyAgus Haryanto
Materi yang berisikan tutorial login ke server degna menggunakan library volley dimana untuk server sidenya ditangani oleh PHP dan databasenya menggunakan MySQL
Tutorial Lengkap Cara Membuat Aplikasi Android Sederhanacreatorb dev
Simple Tutorial About How to Create Simple Android App.
Included Many App tutorial:
- How to Create Android App Calculator.
- How to Create Android App Learn Vegetables.
- How to Create Android App Background Coloring.
- How to Create Android App Puzzle.
- How to Create Android App Notes - Database SQLite.
- How to Create Android App RSS feed,
- How to Create Android App Catalog Company Profile.
Tutorial Lengkap Cara Membuat Aplikasi Android dengan penjabaran yang mudah dan dilengkapi dengan tutorial membuat beberapa aplikasi:
- Cara Membuat Android App Kalkulator.
- Cara Membuat Android App Pelajari Sayuran.
- Cara Membuat Android App Mewarnai Latar Belakang.
- Cara Membuat Android App Puzzle.
- Cara Membuat Android App Catatan - database SQLite.
- Cara Membuat Android App RSS feed,
- Cara Membuat Android App Profil Katalog Perusahaan.
Cara Membuat Aplikasi Android Resep Masakan Sederhana Android-SQLitecreatorb dev
Full Source Visit : http://creatorb-lab.blogspot.com/2014/12/cara-membuat-aplikasi-android-resep.html
How to Create Android Recipe App | Cara Membuat Aplikasi Android Resep Masakan | Tutorial Membuat Aplikasi Android
creatorb
Musni Umar: Ketahanan Ideologi dan Agama Benteng UntukMenyelamatkan Indonesia...musniumar
Globalisasi yang menghadirikan keterbukaan informasi melalui media sosial telah memberi manfaat bagi perkembangan dan kemajuan. Akan tetapi sebaliknya membawa mudarat bagi rumah tangga, masyarakat, bangsa dan negara, jika
Android Support Library: Using ActionBarCompatcbeyls
A complete practical guide on how to implement an ActionBar for Android 2.1+ using the Android Support Library.
It also explains how to migrate to ActionBarCompat if you are already familiar with ActionBarSherlock.
Note: this presentation is suitable for AppCompat up to version 20. Instructions have changed a bit in the more recent versions.
Answer1)Responsive design is the idea where all the developed pag.pdfankitcomputer11
Answer:
1)Responsive design is the idea where all the developed pages are embedded with model,view
and controller in the same page of the design so that it is easy for the user to transfer the data
from model to view and view to model.This also reduces the burden on the server when the user
makes any request all the form elements will not reach the server in responsive design but makes
the specific action element to reach the server and gives the output to the user.
2)Application templates in android involves both the layouts and UI components which are used
to build the design pages of the front end of the page.The common layouts which are used are
Gird Layout,Flow Layout,Relative Layout and UI components such as
listview,gridview,spinner,togglebuttons,radiobuttons,progressbar etc are used in any of the front
end design of the android for application to develop.We use XML for the design of the front end
in design in the application.
Android Application :
Note : Deploy the below files in Eclipse Id or Android Studio and run
MainActivity.java
package com.example.listviewcustom;
import java.io.File;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
/*
String path=\"/storage/sdcard0/sample_images/\";
File f=new File(path);
if(f.exists()){
String[] files=f.list();
ArrayAdapter adapter=new ArrayAdapter(getApplicationContext(),
android.R.layout.simple_spinner_dropdown_item,files );
*/
ListView lView=(ListView)findViewById(R.id.listView1);
lView.setAdapter(new MyAdapter(this));
/*
}else{
Toast.makeText(getApplicationContext(), \"Path is not available ....\",2000).show();
}
*/
}
public void reload(){
ListView lView=(ListView)findViewById(R.id.listView1);
lView.setAdapter(new MyAdapter(this));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
MyAdapter.java
package com.example.listviewcustom;
import java.io.File;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView.FindListener;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class MyAdapter extends BaseAdapter{
//String path=\"/storage/sdcard0/sample_images/\";
String path=\"/mnt/sdcard/sample_images/\";
File f=new File(path);
String[] files=f.list();
MainActivity activity;
public MyAdapter(MainActivity mActivity){
this.activity=mActivity;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return files.length;
}
@Override
public Object getItem(int position) {
// TODO Auto-.
Android Classes In Mumbai
best android classes in mumbai with job assistance.
our features are:
expert guidance by it industry professionals
lowest fees of 5000
practical exposure to handle projects
well equiped lab
after course resume writing guidance
Android Lab Test : Using the camera preview (english)Bruno Delb
Android Lab Test : Using the camera preview (english)
Video of tutorial on : https://www.youtube.com/playlist?list=PLL2Z3bzdO25yHwIV3XdMzKs61At0Ldh6L
Visit http://www.AndroidLabTest.com
La conférence « ProTips » de Mathias Seguy (Android2EE).
Cette conférence a eu lieu lors du BarCamp de la DroidCon Paris, Lundi 17 Juin 2013.
Si vous êtes un JUG ou un AUG et que cette conférence vous interesse, n'hésitez pas à me contacter.
Si vous souhaitez apprendre la technologie Android, contacter moi: mathias.seguy@android2ee.com, je suis formateur Android et les formations Android que je dispense sont exceptionnelles.
Speaker:Mathias est le fondateur de la société Android2ee spécialisée dans la technologie Android.
Il est :
• formateur Android,
• expert logiciel Android,
• speaker Android sur de grandes conférences Java : AndroidCon, Devoxx France, Eclipse Day Toulouse, JCertif Africa, Toulouse JUG, CocoAhead,…
• Rédacteur Android sur Developpez.com ;
• Programmateur Android : MyLight, MyTorch, MySensors, JCertifMobile disponibles sur GooglePlay ;
• Docteur en Mathématiques Fondamentales et Ingénieur de l’ENSEEIHT ;
• Expert technique de l’agence nationale de la recherche française ;
Il présentera au cours de cette conférence sa vision sur la mise en place d’une architecture d’une application Android pertinente et partagera les meilleurs pro-tips (astuces de pro) de sa connaissance. A ne pas manquez.
Mathias Séguy
mathias.seguy@android2ee.com
Fondateur Android2EE
Formation – Expertise – Consulting Android.
Ebooks pour apprendre la programmation sous Android.
How to become an Android dev starting from iOS (and vice versa)Giuseppe Filograno
Starting from my working experience I want to describe the similarities between Android and iOS platforms, demonstrating that these worlds are not so far!
This slides was presented for the first time at the Google DevFest Milano 2018
Similar to Android Sliding Menu dengan Navigation Drawer (20)
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Android Sliding Menu dengan Navigation Drawer
1. Belajar Android Sliding Menu dengan Navigation Drawer
Penulis : Agus Haryanto
http://agusharyanto.net
agus.superwriter@gmail.com
Pembicara Seminar IT, Android Workshop Trainer, Freelance Android Developer
Kalau beberapa waktu lalu para developer menggunakan Dashboard untuk Tampilan Awalnya,
sekarang mereka lebih memilih menggunakan Sliding Menu. Facebook, GMAIL menggunakan
sliding menu kalau istilah didunia development android dikenal dengan nama Navigation Drawer,
disebut Navigation Drawer karena cara kerjanya yang mirip Drawer (Laci). Navigation Drawer
mempunyai kelebihan yaitu menunya hanya muncul jika kita inginkan, sehingga tidak memakan
tempat di layar HP. Penasaran dengan Navigation Drawer, Mari kita buat project Jadwal Pelajaran
yang Navigsinya menggunakan Navigation Drawer
1. Buat Project dengan nama NDJadwalPelajaran
2. Pada directory drawable Tambahkan icon ic_drawable.png
3. android:layout_gravity="start"
android:background="#111"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
5. Buat Layout baru dengan nama drawer_list_item.xml
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/activatedBackgroundIndicator"
android:gravity="center_vertical"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:textColor="#fff" />
6. Buat Layout baru dengan nama jadwalfragment_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ListView
android:id="@+id/listViewJadwal"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
7. Buat Layout baru dengan nama row_jadwal.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/textViewRowJam"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="TextView" />
<TextView
android:id="@+id/textViewRowPelajaran"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
4. android:paddingLeft="10dp"
android:layout_toRightOf="@+id/textViewRowJam"
android:text="TextView" />
</RelativeLayout>
8. Buat Layout baru dengan nama fragment_tambah_jadwal.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Tambah Jadwal Disini" />
</RelativeLayout>
9. Buat Class baru dengan nama Jadwal.java
package net.agusharyanto.ndjadwalpelajaran;
public class Jadwal {
public String hari="";
public String jam="";
public String pelajaran="";
public Jadwal (String pday, String ptime, String plesson){
this.hari = pday;
this.jam = ptime;
this.pelajaran = plesson;
}
}
10. Buat Class Baru dengan nama AdapterJadwal.java lalu ketikkan kode berikut
package net.agusharyanto.ndjadwalpelajaran;
import java.util.ArrayList;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
public class AdapterJadwal extends ArrayAdapter<Jadwal> {
private Activity activity;
private ArrayList<Jadwal> lJadwal;
5. private static LayoutInflater inflater = null;
public AdapterJadwal (Activity activity, int textViewResourceId,ArrayList<Jadwal>
al_Jadwal) {
super(activity, textViewResourceId, al_Jadwal);
try {
this.activity = activity;
this.lJadwal = al_Jadwal;
inflater = (LayoutInflater)
activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
} catch (Exception e) {
}
}
public int getCount() {
return lJadwal.size();
}
public long getItemId(int position) {
return position;
}
public static class ViewHolder {
public TextView jam;
public TextView pelajaran;
}
public View getView(int position, View convertView, ViewGroup parent) {
View vi = convertView;
final ViewHolder holder;
try {
if (convertView == null) {
vi = inflater.inflate(R.layout.row_jadwal, null);
holder = new ViewHolder();
holder.jam = (TextView) vi.findViewById(R.id.textViewRowJam);
holder.pelajaran = (TextView)
vi.findViewById(R.id.textViewRowPelajaran);
vi.setTag(holder);
} else {
holder = (ViewHolder) vi.getTag();
}
holder.jam.setText(lJadwal.get(position).jam);
holder.pelajaran.setText(lJadwal.get(position).pelajaran);
} catch (Exception e) {
}
return vi;
6. }
}
11. Buat Class baru dengan FragmentTambahJadwal.java lalu ketikkan kode berikut
package net.agusharyanto.ndjadwalpelajaran;
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class FragmentTambahJadwal extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle
savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_tambah_jadwal, container, false);
return v;
}
}
12. Buat class ListFragment.java lalu ketikkan kode berikut
package net.agusharyanto.ndjadwalpelajaran;
import java.util.ArrayList;
import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;
public class ListFragment extends Fragment {
ArrayList <Jadwal> list_jadwal = new ArrayList<Jadwal>();
TextView tvhari;
ListView listviewJadwal ;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Retrieving the currently selected item number
int position = getArguments().getInt("position");
String[] menus = getResources().getStringArray(R.array.menus);
// Creating view corresponding to the fragment
View v = inflater.inflate(R.layout.jadwalfragment_layout, container,
false);
7. listviewJadwal = (ListView) v.findViewById(R.id.listViewJadwal);
// Updating the action bar title
getActivity().getActionBar().setTitle(menus[position]);
initData();
showJadwal(menus[position]);
return v;
}
public void showJadwal(String hari) {
Log.d("TAGS","hari:"+hari);
// tvhari.setText("Hari " + hari);
ArrayList<Jadwal> jadwal_terpilih = new ArrayList<Jadwal>();
for (int i = 0; i < list_jadwal.size(); i++) {
Jadwal jadwal = list_jadwal.get(i);
if (jadwal.hari.equals(hari)) {
jadwal_terpilih.add(jadwal);
}
}
AdapterJadwal adapterjadwal = new AdapterJadwal(getActivity(), 0,
jadwal_terpilih);
listviewJadwal.setAdapter(adapterjadwal);
}
public void initData() {
list_jadwal.add(new Jadwal("Senin","08:00-10:00","Matematika"));
list_jadwal.add(new Jadwal("Senin","10:00-12:00","Agama Islam"));
list_jadwal.add(new Jadwal("Senin","12:00-13:00","Istirahat"));
list_jadwal.add(new Jadwal("Senin","13:00-15:00","Fisika"));
list_jadwal.add(new Jadwal("Selasa","08:00-10:00","Bahasa Indonesia"));
list_jadwal.add(new Jadwal("Selasa","10:00-12:00","Kimia"));
list_jadwal.add(new Jadwal("Selasa","12:00-13:00","Istirahat"));
list_jadwal.add(new Jadwal("Selasa","13:00-15:00","Biologi"));
list_jadwal.add(new Jadwal("Rabu","08:00-10:00","Matematika"));
list_jadwal.add(new Jadwal("Rabu","10:00-12:00","Seni Rupa"));
list_jadwal.add(new Jadwal("Rabu","12:00-13:00","Istirahat"));
list_jadwal.add(new Jadwal("Rabu","13:00-15:00","Bahasa Inggris"));
list_jadwal.add(new Jadwal("Kamis","08:00-10:00","Fisika"));
list_jadwal.add(new Jadwal("Kamis","10:00-12:00","Penjaskes"));
list_jadwal.add(new Jadwal("Kamis","12:00-13:00","Istirahat"));
list_jadwal.add(new Jadwal("Kamis","13:00-15:00","Geografi"));
list_jadwal.add(new Jadwal("Jumat","08:00-10:00","Pemrograman Java"));
list_jadwal.add(new Jadwal("Jumat","10:00-12:00","Pemrograman Android"));
list_jadwal.add(new Jadwal("Jumat","12:00-13:00","Istirahat"));
list_jadwal.add(new Jadwal("Jumat","13:00-15:00","Logika Algoritma"));
}
}
13. Edit class MainActivity.java lalu ketikkan kode berikut
package net.agusharyanto.ndjadwalpelajaran;
import android.annotation.SuppressLint;
8. import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.DrawerLayout;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class MainActivity extends Activity {
// Within which the entire activity is enclosed
private DrawerLayout mDrawerLayout;
// ListView represents Navigation Drawer
private ListView mDrawerList;
// ActionBarDrawerToggle indicates the presence of Navigation Drawer in the
action bar
private ActionBarDrawerToggle mDrawerToggle;
// Title of the action bar
private String mTitle = "";
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mTitle = "Jadwal Pelajaran";
getActionBar().setTitle(mTitle);
// Getting reference to the DrawerLayout
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mDrawerList = (ListView) findViewById(R.id.drawer_list);
// Getting reference to the ActionBarDrawerToggle
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.drawable.ic_drawer, R.string.drawer_open,
R.string.drawer_close) {
/** Called when drawer is closed */
public void onDrawerClosed(View view) {
getActionBar().setTitle(mTitle);
invalidateOptionsMenu();
}
/** Called when a drawer is opened */
public void onDrawerOpened(View drawerView) {
getActionBar().setTitle("Jadwal Pelajaran");
invalidateOptionsMenu();
}
9. };
// Setting DrawerToggle on DrawerLayout
mDrawerLayout.setDrawerListener(mDrawerToggle);
// Creating an ArrayAdapter to add items to the listview mDrawerList
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getBaseContext(),
R.layout.drawer_list_item,
getResources().getStringArray(R.array.menus));
// Setting the adapter on mDrawerList
mDrawerList.setAdapter(adapter);
// Enabling Home button
getActionBar().setHomeButtonEnabled(true);
// Enabling Up navigation
getActionBar().setDisplayHomeAsUpEnabled(true);
// Setting item click listener for the listview mDrawerList
mDrawerList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// Getting an array of rivers
String[] menuItems =
getResources().getStringArray(R.array.menus);
// Currently selected river
mTitle = menuItems[position];
if (mTitle.equals("Tambah Jadwal")){
FragmentTambahJadwal fragmentone = new
FragmentTambahJadwal();
FragmentManager fragmentManager =
getFragmentManager();
// Creating a fragment transaction
FragmentTransaction ft =
fragmentManager.beginTransaction();
// Adding a fragment to the fragment transaction
ft.replace(R.id.content_frame, fragmentone);
// Committing the transaction
ft.commit();
}else{
// Creating a fragment object
ListFragment rFragment = new ListFragment();
// Passing selected item information to fragment
Bundle data = new Bundle();
data.putInt("position", position);
//data.putString("url", getUrl(position));
rFragment.setArguments(data);
// Getting reference to the FragmentManager
10. FragmentManager fragmentManager = getFragmentManager();
// Creating a fragment transaction
FragmentTransaction ft = fragmentManager.beginTransaction();
// Adding a fragment to the fragment transaction
ft.replace(R.id.content_frame, rFragment);
// Committing the transaction
ft.commit();
}
// Closing the drawer
mDrawerLayout.closeDrawer(mDrawerList);
}
});
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
mDrawerToggle.syncState();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
}
return super.onOptionsItemSelected(item);
}
/** Called whenever we call invalidateOptionsMenu() */
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
// If the drawer is open, hide action items related to the content view
boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);
menu.findItem(R.id.action_settings).setVisible(!drawerOpen);
return super.onPrepareOptionsMenu(menu);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
14. Mari Kita Run Projectnya, Sentuh Icon Drawer, maka akan keluar menu pilih salah satu hari,
akan menampilkan jadwal dihari tersebut.