Complete Solution for every problem | Mobile Technology | Web Technology | Software | Mobile Apps | Scripts | Tricks | Latest Technology | Wordpress Plugins


Line Post
Showing posts with label smartphone. Show all posts
Showing posts with label smartphone. Show all posts

10 October, 2015

Recycler view and Card View in Andorid Development



Recyclerview is more advanced and flexible version of Listview added in Lollipop. It also Support in lower API of Android. This widget is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views. Use the RecyclerView widget when you have data collections whose elements change at runtime based on user action or network events.

Application Development
Recycler view

The RecyclerView class simplifies the display and handling of large data sets by providing:
·         Layout managers for positioning items
·         Default animations for common item operations, such as removal or addition of items

To  add RecyclerView in your Project. you have to add Library of Recyclerview.

If you are using Android Studio and you are Supporting lower APIs,  You just need to add Gradle URL into your Module's Gradle file.

dependencies {

compile 'com.android.support:recyclerview-v7:23.0.1'

}

Once you sync  gradle lib from google will be downloaded into your project and you can use it.

Add RecyclerView into your activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
   
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
       
android:id="@+id/recycler_view"
       
android:layout_width="match_parent"
       
android:layout_height="match_parent"
       
android:scrollbars="vertical" />
</LinearLayout>

Now you have added RecyclerView widget into your layout file, Obtain a handle to the object and connect it to layout manager and attach an adapter to show data.

public class MainActivity extends AppCompatActivity {



    ArrayList<String> arrayList = new ArrayList<>();



    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);



        for (int i = 0; i < 15; i++) {

            arrayList.add(String.valueOf(i));

        }



        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);



        /**

         *To Show RecyclerView as a List of data, LayoutManager is important to set.

         *  For ListView : LinearLayoutManager is used.

         *  For GridView : GridLayoutManager is used.

         *  For Staggered GridView: StaggeredGridLayoutManager is used

         */

        LinearLayoutManager manager = new LinearLayoutManager(MainActivity.this);

        recyclerView.setLayoutManager(manager);



        MyRecyclerViewAdapter myRecyclerViewAdapter = new MyRecyclerViewAdapter(MainActivity.this, arrayList);

        recyclerView.setAdapter(myRecyclerViewAdapter);

    }



    @Override

    public boolean onCreateOptionsMenu(Menu menu) {

        // Inflate the menu; this adds items to the action bar if it is present.

        getMenuInflater().inflate(R.menu.menu_main, menu);

        return true;

    }



    @Override

    public boolean onOptionsItemSelected(MenuItem item) {

        // Handle action bar item clicks here. The action bar will

        // automatically handle clicks on the Home/Up button, so long

        // as you specify a parent activity in AndroidManifest.xml.

        int id = item.getItemId();



        //noinspection SimplifiableIfStatement

        if (id == R.id.action_settings) {

            return true;

        }



        return super.onOptionsItemSelected(item);

    }

}

RecyclerView Adpter :

public class MyRecyclerViewAdapter extends RecyclerView.Adapter<MyRecyclerViewAdapter.ViewHolder> {



    Context context;

    ArrayList<String> strings;



    /**

     * public Constructor

     */

    public MyRecyclerViewAdapter(Context context, ArrayList<String> arrayList) {



        this.context = context;

        this.strings = arrayList;

    }



    @Override

    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.card_layout, parent, false);

        return new ViewHolder(view);

    }



    @Override

    public void onBindViewHolder(ViewHolder holder, int position) {



        holder.textView.setTag(position);

        holder.cardView.setTag(position);



        holder.textView.setText(strings.get(position));



        if (position % 2 == 0) {

            holder.cardView.setBackgroundColor(context.getResources().getColor(R.color.colorzero, null));

        } else {

            holder.cardView.setBackgroundColor(context.getResources().getColor(R.color.colorone, null));

        }



    }



    @Override

    public int getItemCount() {

        return strings.size();

    }



    public class ViewHolder extends RecyclerView.ViewHolder {



        TextView textView;

        CardView cardView;



        public ViewHolder(View itemView) {

            super(itemView);

            textView = (TextView) itemView.findViewById(R.id.textview);

            cardView = (CardView) itemView.findViewById(R.id.card_view);

        }

    }

}

CardView :

CardView is a extension of FrameLayout which lets you show data into card. It can have Shadows and Corners.

To show shadow use "cardElevation" attribute. In lollipop devices cardview uses real elevation and dynamic shadows.

Use these properties to customize the appearance of the CardView widget:

·         To set the corner radius in your layouts, use the card_view:cardCornerRadius attribute.
·         To set the corner radius in your code, use the CardView.setRadius method.
·         To set the background color of a card, use the card_view:cardBackgroundColor attribute.  

If you are using Android Studio and you are Supporting lower APIs,  You just need to add Gradle URL into your Module's Gradle file.

dependencies { compile 'com.android.support:cardview-v7:23.0.1'}





<?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:gravity="center"

    android:orientation="vertical">



    <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"

        android:id="@+id/card_view"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_gravity="center_vertical"

        android:layout_margin="10dp"

        android:foregroundGravity="center"

        android:minHeight="50dp"

        card_view:cardCornerRadius="4dp"

        card_view:cardElevation="3dp">



        <TextView

            android:id="@+id/textview"

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:layout_gravity="center_vertical"

            android:text="TextView"

            android:textColor="#000"

            android:textSize="25sp" />

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

</LinearLayout>


To Check Full code please Go to Below Link.
Read more ...

12 December, 2014

Xiaomi phone banned in india

Recently shocking news for MI smartphone lovers
Actually Erection filed complaint against xiaomi and delhi high court banned till February 2015

Mr. Hugo barra founder of Xiaomi shared letter to indian fans

** A Letter to Indian Mi Fans **
Dear Mi fans,
We have been committed to continue our sales of Redmi Note and Redmi 1S devices in India. In the last 2 days alone, we received about 150,000 registrations for Redmi Note on Flipkart and the momentum has been terrific.
However, we have been forced to suspend sales in India until further notice due to an order passed by the Delhi High Court. As a law abiding company, we are investigating the matter carefully and assessing our legal options.
Our sincere apologies to all Indian Mi fans! Please rest assured that we’re doing all we can to revert the situation. We have greatly enjoyed our journey with you in India over the last 5 months and we firmly intend to continue it!
Stay tuned for more information.
Hugo
(on behalf of the Mi India team)

Read more ...

25 November, 2014

Xiaomi has revealed its first 4G smartphone in India


Cheapest 4G Smartphone in india

Chinese smartphone maker Xiaomi on Monday launched the much-anticipated Redmi Note 3G and 4G models, at Rs. 8,999 and Rs. 9,999 respectively. Pre-orders for the 3G Note is set to begin on November 25 at 6 p.m. through e-commerce retailer Flipkart while the 4G Note will be available across Airtel stores in six cities from the second half of next month.

Redmi Note 4G


Xiaomi Redmi Note will be available starting December 2 on Flipkart. Registration opens Nov 25 at 6pm.

Redmi note comes to India in 3G and 4G variants

The Xiaomi Redmi Note is powered by an octa-core Mediatek SoC clocked at 1.7GHz, mated to 2GB of RAM. 8GB storage .

5.5-inch 720p IPS screen on the Xiaomi Redmi Note, with Corning Gorilla Glass 3

Xiaomi’s Redmi Note sports a 13MP rear camera and a 5MP front facing camera.

The Xiaomi Redmi Note 4G is powered by a Snapdragon chip and is a single SIM device, unlike the 3G version. Comes with Swiftkey & Fleksy.

Cheapest 4G phone
Xiaomi Redmi Note 4G will also be sold by Airtel through its 100 flagship stores

Get your Redmi note register on flipkart.com
Read more ...

10 September, 2014

Apple launched iphone 6 and iphone 6 plus

Apple announces iphone 6 and 6plus after long waiting and rumors.

Here i have written complete features and new thing about iphone 6 and iphone 6 plus 



Apple's senior vice president of marketing Phil Schiller explained at the much anticipated event yesterday that the glass front curves around the side of the phones, meeting the anodized aluminum backing.
The iPhone 6 Plus is 5.5 inches diagonally and the iPhone 6 is 4.7 inches, compared to the iPhone 5S size of 4 inches. The phones are thinner than ever: 6.9 mm for the iPhone 6 and 7.1 mm for the larger iPhone 6 Plus.

Features

A brand new design: The new design is rounder, larger, and easier to hold. The iPhone 6 lands in a 6.9mm thick shell, and 7.1 mm for the iPhone 6 Plus. Both devices are thinner and lighter than the iPhone 5.

Larger 4.7-inch and 5.5-inch display: The iPhone 6 has a Retina HD display , about two times the resolution of the iPhone 5 display. At 1,334 x 750 resolution (or 326 pixels-per-inch) for the iPhone 6, and 1,920 x 1080 resolution for the iPhone 6 Plus, the new smartphones have more than 2 million and 3 million pixels, respectively.

64-bit A8 chip: The two new smartphones contain the next-generation A8 chip, which has 2 billion transistors, double that of the first-generation A7 chip.

M8 co-processor: This new co-processor works alongside the main chip to continuously measure motion data without draining battery life. The M8 co-processor is designed for fitness and activities, it was announced. It can now figure out elevation, such as with a flight of stairs. It also comes with a new sensor called the Barometer, which measures elevation from air pressure.

Improved 8-megapixel camera: The camera is improved from the iPhone 5s, with a few new additions, like a new and improved sensor. The True Tone flash changes color depending on surrounding lighting, and images should come with greater noise reduction technology. The auto-focus is twice as fast as before, executives said. Panoramic photos now go up to 43 megapixels in size. The iPhone 6 Plus, however, comes with optical image stabilization. 

Near-field communications (NFC) for mobile payments: Apple's latest smartphones will come with a mobile payment feature, made possible with a near-range wireless chip that will allow users to pay for low-priced products from their device.

Better battery: At least, proportionally. Apple's Phil Schiller said the new devices will be as good as, if not better than, the iPhone 5s. Expect about 11 hours of video watching and Wi-Fi browsing, and about 14 hours of video and browsing on the iPhone 6 Plus.

Faster networking, LTE: Next-generation speeds are now up to 150 Mpbs, compared to 100 Mbps in previous models. The iPhone 6 and 6 Plus also come with 802.11ac networking for faster home and office speeds.


Apple Pay: A new mobile payment system, using the iPhone 6's new NFC chip, will allow users to pay for low-priced products from their device. Integrating with Touch ID and Passbook, users can add a new card from iTunes or by scanning their card with the camera.

HealthKit: Health, a dedicated app, and slated to work with third-party apps and services, it integrates with leading institutions so it can link with doctors and hospitals. It works seamlessly with Apple Watch, the company's new wearable.

Wi-Fi Calling: You can now (carrier supported) make calls over home or work Wi-Fi networks. It is supported on T-Mobile in the US, and EE in the UK for now.

Handoff: If you're working on your Mac and you need to switch between devices, you can "handoff" to your iPhone or iPad, running iOS 8, so long as you are within a close proximity. Many existing apps, like Safari, Mail, and Messages, will work from the start, as will many third-party apps offering support.

iCloud Drive: iPhones and iPads running the latest iOS 8 software will have its own dedicated app for browsing through your iCloud, similar to a cloud-based file manager.

QuickType and third-party keyboards: New predictive typing suggestions for words, allowing users to type out text messages and emails faster. By using context suggestions, different patterns and styles of writing are predicted based on who you are contacting. Additional and third-party keyboard support will also come with iOS 8, paving the entrance for major alternatives, such as SwiftKey.

Interactive notifications: Users can now pull down from a notification and reply there and then, without having to leave the app you're in.

Text messages support in iMessage: Traditional SMS messages will now synchronize across iMessage to other devices, including Macs.


Apple' Official Note:  Pricing & Availability


iPhone 6 comes in gold, silver or space gray, and will be available in the US for a suggested retail price of $199 (US) for the 16GB model, $299 (US) for the 64GB model and, for the first time, a new 128GB model for $399 (US) with a two-year contract.⁴ iPhone 6 Plus comes in gold, silver or space gray, and will be available in the US for a suggested retail price of $299 (US) for the 16GB model, $399 (US) for the 64GB model and $499 (US) for the new 128GB model with a two-year contract.⁴ Both models will be available from the Apple Online Store (www.apple.com), Apple’s retail stores, and through AT&T, Sprint, T-Mobile, Verizon Wireless, additional carriers and select Apple Authorized Resellers. iPhone 6 and iPhone 6 Plus will be available in the US, Australia, Canada, France, Germany, Hong Kong, Japan, Puerto Rico, Singapore and the UK beginning on Friday, September 19, and customers can pre-order both models beginning on Friday, September 12.

Apple-designed leather cases will be available in black, soft pink, olive brown, midnight blue and (RED) for $45 (US) for iPhone 6 and $49 (US) for iPhone 6 Plus and silicone cases in black, blue, pink, green, white and (RED) for a suggested retail price of $35 (US) for iPhone 6 and $39 (US) for iPhone 6 Plus through the Apple Online Store  (www.apple.com), Apple’s retail stores and select Apple Authorized Resellers.

iPhone 5s will be available in the US for a suggested retail price of $99 (US) for the 16GB model and $149 (US) for the 32GB model, and an iPhone 5c 8GB model will be available for free.⁴ iOS 8 will be available as a free software update starting on Wednesday, September 17. Some features may not be available on all products. Apple Pay will be available to US customers as a free software update to iOS 8 this October.

Read more ...

16 July, 2014

Xiaomi launches Mi 3, Redmi 1S and Redmi Note in India

Xiaomi has launched three new smart phone in indian market Mi 3, Redmi 1S and Redmi Note at Rs 13,999, Rs 6,999 and Rs 9,999.


                                 Mi3 launched with its unbelievable features in under 14K INR


Mi3- xiaomi smart phone with best features

Faster than ever.

Krait 400 architecture delivers 36 percent more processing power than its predecessor and 40 percent more processing power than the Snapdragon 600.

The will available in leading ecommerce site flipkart.com they started pre-booking and sale from 21st july. Mi3 also have unbelievable features in lesser price.


Features :

  • A dragon in your pocket.


Mi3-phone processor
Qualcomm Snapdragon 800 8274AB 2.3GHz processor, Adreno 330 450MHz GPU, 2GB LPDDR3 RAM, and eMMC 4.5 flash memory.


Experience your favourite games and apps at blazing speeds with the latest and most powerful processor from Qualcomm - 8274AB.


  • Stunningly beautiful.


IPS-full-hd-display
5-inch IPS display. Full HD at 16:9.

See crisp details in 1080p HD video or rich textures in 3D game environments. Your photos look more vibrant in your hands now. Our full-screen, anti-glare coating gives you high screen readability wherever you go.





  • 13MP camera with dual-LED flash.

Take amazing photos in low light with a super-large Exmor sensor and an ƒ/2.2 aperture. 

The built-in Phillips dual-LED flash quickly adds the perfect lighting to make your subjects beautiful. Never miss another photo opportunity again.


  • Power through your day.


500 hours of standby time
50 hours of music playback
25 hours of talk time
21 hours of 3G Internet use

  • Lose the wires.

Dual-band Wi-Fi (2.4Ghz/5Ghz) gives you the room to go wireless and still enjoy high speed Internet access. NFC (Near Field Communication) gives you the contactless freedom to augment your digital lifestyle.




  • Amazing from the inside out.
    new-metalic-body



Mi 3 is 8.1mm thin, 145 grams light, and houses an aluminum-magnesium alloy frame, coated with 3 layers of thermal graphite.





  • Make Android yours.

home-android-mi3-smartphone
We listen. The features in MIUI are based on the feedback we get from our 35 million users. We are constantly looking for new ways to make MIUI more useful, more secure, and more fun. We work around the clock (and drink much coffee) to fix bugs, and deliver new updates to your phone as quickly as possible.





  • Mi Cloud.

Manage everything. Anywhere, anytime.

Access your phone's contacts, photos, and notes from any browser. You can instantly see photos taken with your camera and can even send and reply to SMS messages, all from the web.


So what you waiting for ?? 
Register on flipkart.com 
Read more ...

Comments

Designed By