|
|
|
@ -1,19 +1,16 @@
|
|
|
|
|
package com.example.leudaemialikeme.Fragment;
|
|
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
|
|
|
|
|
|
import com.example.leudaemialikeme.Activity.InfoActivity;
|
|
|
|
|
import com.example.leudaemialikeme.Activity.MdctRmdActivity;
|
|
|
|
|
import com.example.leudaemialikeme.Activity.SearchActivity;
|
|
|
|
|
import com.example.leudaemialikeme.R;
|
|
|
|
|
import com.example.leudaemialikeme.Recnews;
|
|
|
|
|
import com.example.leudaemialikeme.adapter.RecnewsAdapter;
|
|
|
|
@ -28,7 +25,7 @@ import java.util.List;
|
|
|
|
|
*/
|
|
|
|
|
public class IndexFragment extends Fragment {
|
|
|
|
|
|
|
|
|
|
private List<Recnews> recNews=new ArrayList<>();
|
|
|
|
|
private List<Recnews> recNews=new ArrayList<>();;
|
|
|
|
|
|
|
|
|
|
// TODO: Rename parameter arguments, choose names that match
|
|
|
|
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
|
|
|
@ -94,84 +91,35 @@ public class IndexFragment extends Fragment {
|
|
|
|
|
LinearLayout recLinear=view.findViewById(R.id.rec_linear);
|
|
|
|
|
LinearLayout kepuLinear=view.findViewById(R.id.kepu_linear);
|
|
|
|
|
LinearLayout clockLinear=view.findViewById(R.id.clock_linear);
|
|
|
|
|
LinearLayout companyLinear=view.findViewById(R.id.company);
|
|
|
|
|
LinearLayout tenLinear=view.findViewById(R.id.ten);
|
|
|
|
|
LinearLayout governmentLinear=view.findViewById(R.id.government);
|
|
|
|
|
LinearLayout charity=view.findViewById(R.id.charity);
|
|
|
|
|
LinearLayout all=view.findViewById(R.id.all);
|
|
|
|
|
|
|
|
|
|
searchLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), SearchActivity.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
recLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
kepuLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
clockLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), MdctRmdActivity.class);
|
|
|
|
|
startActivity(intent); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
companyLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), InfoActivity.class);
|
|
|
|
|
startActivity(intent); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
tenLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), InfoActivity.class);
|
|
|
|
|
startActivity(intent); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
governmentLinear.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), InfoActivity.class);
|
|
|
|
|
startActivity(intent); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
charity.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), InfoActivity.class);
|
|
|
|
|
startActivity(intent); }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
all.setOnClickListener(new View.OnClickListener(){
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View view) {
|
|
|
|
|
Intent intent=new Intent(getContext(), InfoActivity.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
// Toast.makeText(view.getContext(),"x1233",Toast.LENGTH_SHORT).show();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|