taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sagar15795 <...@git.apache.org>
Subject [GitHub] incubator-taverna-mobile pull request #78: Feat: User details in nav header ...
Date Sat, 26 May 2018 17:27:02 GMT
Github user sagar15795 commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/78#discussion_r191054643
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/UserProfileActivity.java ---
    @@ -0,0 +1,171 @@
    +package org.apache.taverna.mobile.ui;
    +
    +import android.support.v7.app.ActionBar;
    +import android.support.v7.app.AppCompatActivity;
    +import android.os.Bundle;
    +
    +import android.support.v7.widget.Toolbar;
    +import android.view.MenuItem;
    +import android.view.View;
    +import android.widget.LinearLayout;
    +import android.widget.TextView;
    +
    +import com.bumptech.glide.Glide;
    +import com.bumptech.glide.load.engine.DiskCacheStrategy;
    +import com.bumptech.glide.load.resource.drawable.GlideDrawable;
    +import com.bumptech.glide.request.animation.GlideAnimation;
    +import com.bumptech.glide.request.target.SimpleTarget;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.data.DataManager;
    +import org.apache.taverna.mobile.data.local.PreferencesHelper;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +import de.hdodenhof.circleimageview.CircleImageView;
    +
    +import static org.apache.taverna.mobile.TavernaApplication.getContext;
    +
    +
    +public class UserProfileActivity extends AppCompatActivity{
    +
    +    @BindView(R.id.toolbar)
    +    Toolbar mToolbar;
    +
    +    @BindView(R.id.user_name)
    +    TextView user_name;
    +
    +    @BindView(R.id.user_avatar)
    +    CircleImageView user_avatar;
    +
    +    @BindView(R.id.user_email)
    +    TextView user_email;
    +
    +    @BindView(R.id.user_website)
    +    TextView user_website;
    +
    +    @BindView(R.id.user_description)
    +    TextView user_description;
    +
    +    @BindView(R.id.user_city)
    +    TextView user_city;
    +
    +    @BindView(R.id.user_country)
    +    TextView user_country;
    +
    +    @BindView(R.id.my_workflow_layout)
    +    LinearLayout my_workflow_layout;
    +
    +    @BindView(R.id.my_favorite_workflow)
    +    LinearLayout my_favorite_workflow;
    +
    +    private DataManager dataManager;
    +
    +    @Override
    +    protected void onCreate(Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +        setContentView(R.layout.activity_user_profile);
    +        ButterKnife.bind(this);
    +
    +        setSupportActionBar(mToolbar);
    +        ActionBar actionbar = getSupportActionBar();
    +
    +        if (actionbar != null) {
    +            actionbar.setHomeButtonEnabled(true);
    +            actionbar.setDisplayHomeAsUpEnabled(true);
    +            actionbar.setTitle(R.string.title_user_profile);
    +
    +            setUserDetail();
    +
    +            my_workflow_layout.setOnClickListener(new View.OnClickListener() {
    +                @Override
    +                public void onClick(View v) {
    +                    //In this onClick listener we have to go from this UserProfileActivity
to myWorkflows fragment.
    +                    //Suggest the method to perform this action.
    --- End diff --
    
    `UserProfile` -> `myWorkflow` and `myWorkflow` -> `UserProfile`. So make a separate
activity for myworkflow and just show the myworkflow fragment in it.


---

Mime
View raw message