团队冲刺07

团队冲刺07

今天继续完成昨天的页面

成果展示:

package fragment;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.animator.knowledge_circle.QuestionActivity;
import com.example.animator.knowledge_circle.R;

/**
 * Created by animator on 2020/4/5.
 */
public class NewQFragment extends Fragment {
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_new_question,null);
        LinearLayout l = (LinearLayout) view.findViewById(R.id.new_question_l1);
        l.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), QuestionActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}
package fragment;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.example.animator.knowledge_circle.AttentionActivity;
import com.example.animator.knowledge_circle.CollectActivity;
import com.example.animator.knowledge_circle.FansActivity;
import com.example.animator.knowledge_circle.HelpActivity;
import com.example.animator.knowledge_circle.LookActivity;
import com.example.animator.knowledge_circle.MoneyActivity;
import com.example.animator.knowledge_circle.R;
import com.example.animator.knowledge_circle.SelfInfoActivity;
import com.example.animator.knowledge_circle.SetActivity;
import com.example.animator.knowledge_circle.ZanActivity;

/**
 * Created by animator on 2020/4/5.
 */
public class MineFragment extends Fragment {
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_mine,null);
        LinearLayout money = (LinearLayout) view.findViewById(R.id.mine_money_l);
        money.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), MoneyActivity.class);
                startActivity(intent);
            }
        });
        LinearLayout info = (LinearLayout) view.findViewById(R.id.info_enter);
        info.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), SelfInfoActivity.class);
                startActivity(intent);
            }
        });

        LinearLayout attention = (LinearLayout) view.findViewById(R.id.attention_enter);
        LinearLayout fans = (LinearLayout) view.findViewById(R.id.fans_enter);
        attention.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), AttentionActivity.class);
                startActivity(intent);
            }
        });
        fans.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), FansActivity.class);
                startActivity(intent);
            }
        });
        LinearLayout zan = (LinearLayout) view.findViewById(R.id.zan_enter);
        LinearLayout collect = (LinearLayout) view.findViewById(R.id.collect_enter);
        LinearLayout look = (LinearLayout) view.findViewById(R.id.look_enter);
        zan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), ZanActivity.class);
                startActivity(intent);
            }
        });
        collect.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), CollectActivity.class);
                startActivity(intent);
            }
        });
        look.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), LookActivity.class);
                startActivity(intent);
            }
        });
        LinearLayout help = (LinearLayout) view.findViewById(R.id.help_enter);
        help.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), HelpActivity.class);
                startActivity(intent);
            }
        });
        LinearLayout set = (LinearLayout) view.findViewById(R.id.set_enter);
        set.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(getActivity(), SetActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}
posted @ 2020-04-23 21:10  城南漠北  阅读(107)  评论(0编辑  收藏  举报