Saturday, 10 December 2022

RecyclerView implementation using Java in Android

To use a RecyclerView in an Android app, you will need to do the following:


Add the RecyclerView library to your app's build.gradle file:


dependencies {

    implementation 'com.android.support:recyclerview-v7:28.0.0'

}


In your app's layout XML file, add a RecyclerView element with a unique id attribute:


<android.support.v7.widget.RecyclerView

    android:id="@+id/my_recycler_view"

    android:layout_width="match_parent"

    android:layout_height="match_parent" />


In the activity or fragment that will display the RecyclerView, define a member variable for the RecyclerView and initialize it in the onCreate method:


public class MyActivity extends AppCompatActivity {


    private RecyclerView mRecyclerView;


    @Override

    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_my);


        mRecyclerView = findViewById(R.id.my_recycler_view);

    }

}

Create a RecyclerView.Adapter that will be responsible for binding your data to the RecyclerView:


public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> {


    private List<MyData> mDataList;


    public MyAdapter(List<MyData> dataList) {

        mDataList = dataList;

    }


    @Override

    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        // Inflate a new view and return a new MyViewHolder instance

    }


    @Override

    public void onBindViewHolder(MyViewHolder holder, int position) {

        // Bind the data from the specified position in the data list to the

        // MyViewHolder

    }


    @Override

    public int getItemCount() {

        return mDataList.size();

    }

}


Create a RecyclerView.ViewHolder that will hold the views that you want to display for each item in the list:


public class MyViewHolder extends RecyclerView.ViewHolder {


    public TextView mTextView1;

    public TextView mTextView2;

    public ImageView mImageView;


    public MyViewHolder(View itemView) {

        super(itemView);

        mTextView1 = itemView.findViewById(R.id.text_view1);

        mTextView2 = itemView.findViewById(R.id.text_view2);

        mImageView = itemView.findViewById(R.id.image_view);

    }

}

Set the LayoutManager for the RecyclerView and attach the MyAdapter instance to the RecyclerView:


public class MyActivity extends App 

How to get a remote software developer job

Here are a few tips that may help you land a remote software developer job:


Make sure your resume and LinkedIn profile accurately reflect your skills and experience. Include any relevant projects you have worked on, technologies you are familiar with, and any achievements or awards you have received.


Network with other software developers and professionals in the industry. Attend meetups, conferences, and online events to meet potential employers and learn about job opportunities.


Be proactive and reach out to companies you are interested in working for. Many companies are open to hiring remote workers, but they may not advertise all of their job openings.


Build a strong online presence. A professional website or blog showcasing your skills and experience can make you stand out from other candidates.


Stay up to date with the latest technologies and best practices in the industry. This will not only make you a more attractive candidate, but it will also help you stay competitive and in demand as a software developer.


Good luck with your job search! 

Monday, 27 April 2020

my Questions on Android App Development Learning

While learning to code or any thing :) it is always good to start from the beginning and learn step by step.

First learn the basics, than apply these into learning more advance concepts.

Learn the each concept coming in your way, so when needed, it can be used in further studies, it help you making advancement.

Following are some of my questions, that are being arising through my mind and while started to learn to code the Android mobile apps development.

1- How to program core features and Classes in Java Programming language that are used in Android App Development.

2- What are the Key Java Programming language feature that are used in flow of  Android Mobile App Development.


  • Java Looping Constructs
  • How to use Structured Data, Array 
  • Common classes in Java Collection Frame Work 
    • Array List
    • Hash maps
  • Group related Operations
  • Data into classes and interfaces
    • Java Primitive and user defined types
    • Fields
    • Methods
    • Generic parameters
    • Exception
3- How to customize the behavior of existing classes through the inheritance and polymorphism.
  • sub classes
  • Overriding virtual methods
4- what are the core android components
  • UI Elements
  • Activities  

5- What is Android Studio and How it is used as a tool to develop mobile Apps for android.




Sunday, 23 June 2019

Use exclamation mark to remove quotions from optional variables in swift

optional has an optional ("") wrapped around the String. The ("") means that, in order for us to access the value, we must unwrap the optional. One way we could do this is by force-unwrapping the optional using an (!).