tag:blogger.com,1999:blog-68278447912724105512024-03-14T03:15:43.596+05:30Android WarehouseWe are extremely happy to present to you one of the best, resourceful and richly materialed blog where you could find all the knowledge and resources concerned to Android development along with some rich custom UI Controls, Custom Libraries and extensions.Anonymoushttp://www.blogger.com/profile/12966401963987023759noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6827844791272410551.post-69119988234391258182013-09-21T18:54:00.001+05:302013-12-11T13:48:49.242+05:30Date and Timepicker for Android<img style="max-width: 100%;" alt="Screenshot" src="https://raw.github.com/luminousman/DatePicker/master/screenshot.png" /><br/><pre><code><br/>@Override<br/> public void onCreate(Bundle savedInstanceState) {<br/> super.onCreate(savedInstanceState);<br/> setContentView(R.layout.main);<br/><br/> DatePicker d = (DatePicker) findViewById(R.id.datePicker1);<br/> d.setDateChangedListener(this);<br/><br/> try {<br/> d.setStartYear(2000);<br/> d.setEndYear(2009);<br/> } catch (Exception e) {<br/> Log.e("", e.toString());<br/> }<br/><br/> TimePicker t = (TimePicker) findViewById(R.id.timePicker2);<br/> t.setTimeChangedListener(this);<br/> t.setCurrentTimeFormate(TimePicker.HOUR_12);<br/> t.setAMPMVisible(true);<br/> }<br/><br/> @Override<br/> public void onDateChanged(Calendar c) {<br/> Log.e("",<br/> "" + c.get(Calendar.MONTH) + " " + c.get(Calendar.DAY_OF_MONTH)<br/> + " " + c.get(Calendar.YEAR));<br/> }<br/><br/> @Override<br/> public void onTimeChanged(int h, int m, int am_pm) {<br/> Log.e("", "" + h + " " + m + " " + am_pm);<br/> }<br/></code></pre><br/><br/><a href="https://github.com/luminousman/DatePicker">Fork me on Github</a>Anonymoushttp://www.blogger.com/profile/12966401963987023759noreply@blogger.com0tag:blogger.com,1999:blog-6827844791272410551.post-77795334066029834012013-09-21T18:41:00.001+05:302013-12-11T13:48:49.221+05:30Smart Gallery with Single and Multiple image pick Action<h2><a class="anchor" href="#features" name="features"></a>Features</h2><br/><ul><br/> <li>luminous.ACTION_PICK for choosing single image.</li><br/> <li>luminous.ACTION_MULTIPLE_PICK for choosing multiple image.</li><br/> <li>Also custom Theme.</li><br/></ul><br/><a href="https://raw.github.com/luminousman/MultipleImagePick/master/1.png" target="_blank"><img style="max-width: 100%;" alt="Screenshot" src="https://raw.github.com/luminousman/MultipleImagePick/master/1.png" /></a><a href="https://raw.github.com/luminousman/MultipleImagePick/master/2.png" target="_blank"><img style="max-width: 100%;" alt="Screenshot" src="https://raw.github.com/luminousman/MultipleImagePick/master/2.png" /></a><a href="https://raw.github.com/luminousman/MultipleImagePick/master/3.png" target="_blank"><img style="max-width: 100%;" alt="Screenshot" src="https://raw.github.com/luminousman/MultipleImagePick/master/3.png" /></a><br/><h2><a class="anchor" href="#usage" name="usage"></a>Usage</h2><br/><pre><code>// For single image<br/>Intent i = new Intent(Action.ACTION_PICK);<br/>startActivityForResult(i, 100);<br/><br/>// For multiple images<br/>Intent i = new Intent(Action.ACTION_MULTIPLE_PICK);<br/>startActivityForResult(i, 200);<br/><br/>@Override<br/> protected void onActivityResult(int requestCode, int resultCode, Intent data) {<br/> super.onActivityResult(requestCode, resultCode, data);<br/><br/> if (requestCode == 100 && resultCode == Activity.RESULT_OK) {<br/> adapter.clear();<br/><br/> viewSwitcher.setDisplayedChild(1);<br/> String single_path = data.getStringExtra("single_path");<br/> imageLoader.displayImage("file://" + single_path, imgSinglePick);<br/><br/> } else if (requestCode == 200 && resultCode == Activity.RESULT_OK) {<br/> String[] all_path = data.getStringArrayExtra("all_path");<br/><br/> ArrayList dataT = new ArrayList();<br/><br/> for (String string : all_path) {<br/> CustomGallery item = new CustomGallery();<br/> item.sdcardPath = string;<br/><br/> dataT.add(item);<br/> }<br/><br/> viewSwitcher.setDisplayedChild(0);<br/> adapter.addAll(dataT);<br/> }<br/> }</code></pre><br/><span>In AndroidManifest.xml</span><br/><pre><code> <br/><activity android:name="CustomGalleryActivity" ><br/> <intent-filter><br/> <action android:name="luminous.ACTION_PICK" /><br/> <action android:name="luminous.ACTION_MULTIPLE_PICK" /><br/> <category android:name="android.intent.category.DEFAULT" /><br/> </intent-filter><br/> </activity><br/> </code></pre><br/><br/><a href="https://github.com/luminousman/MultipleImagePick">Fork me on Github</a>Anonymoushttp://www.blogger.com/profile/12966401963987023759noreply@blogger.com0