urls of buttons in the instagram app
- By sddfds
- Smartphones
- 2 Replies
hello i would like to ask how to copy and paste the url of the watch more button in the instagram app. thanks very much.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
class FabTransformationActivity : AppCompatActivity() {
private val viewModel: FabTransformationViewModel by viewModels()
private lateinit var fab: FloatingActionButton
private var mWindowManager:/*@@psggbk@@*/WindowManager? = null
private class ItemHolder(val parent: LinearLayout, listener: View.OnClickListener) {
val image: ImageView = parent.findViewById(R.id.image)
val name: TextView = parent.findViewById(R.id.name)
init {
parent.setOnClickListener(listener)
}
}
private val menuOnClick = View.OnClickListener { v ->
val name = v.getTag(R.id.tag_name) as String
fab.isExpanded = false
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
var params: WindowManager.LayoutParams
setContentView(R.layout.fab_transformation_activity)
val root: CoordinatorLayout = findViewById(R.id.root)
val sheet: CircularRevealCardView = findViewById(R.id.sheet)
val menuHolders: List<ItemHolder> = listOf(
ItemHolder(findViewById(R.id.menu_1), menuOnClick),
ItemHolder(findViewById(R.id.menu_2), menuOnClick),
ItemHolder(findViewById(R.id.menu_3), menuOnClick),
ItemHolder(findViewById(R.id.menu_4), menuOnClick)
)
fab = findViewById(R.id.fab)
WindowCompat.setDecorFitsSystemWindows(window, false)
val fabMargin = 16
ViewCompat.setOnApplyWindowInsetsListener(root) { _, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
fab.updateLayoutParams<CoordinatorLayout.LayoutParams> {
leftMargin = fabMargin + systemBars.left
rightMargin = fabMargin + systemBars.right
bottomMargin = fabMargin + systemBars.bottom
}
sheet.updateLayoutParams<CoordinatorLayout.LayoutParams> {
leftMargin = fabMargin + systemBars.left
rightMargin = fabMargin + systemBars.right
bottomMargin = fabMargin + systemBars.bottom
}
insets
}
viewModel.items.observe(this) { items ->
menuHolders.forEachIndexed { i, holder ->
if (items.size > i) {
val _item = items[i]
holder.parent.isVisible = true
holder.parent.setTag(R.id.tag_name, _item.name)
holder.name.text = _item.name
Glide.with(holder.image)
.load(_item.image)
.transform(CircleCrop())
.into(holder.image)
} else {
holder.parent.isVisible = false
}
}
}
fab.setOnClickListener {
fab.isExpanded = true
}
}
override fun onBackPressed() {
if (fab.isExpanded) {
fab.isExpanded = false
} else {
super.onBackPressed()
}
}
}
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- A FAB that expands into a sheet. -->
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
app:elevation="8dp"
android:contentDescription=""
app:srcCompat="@drawable/ic_add" />
<!--
A sheet that the FAB expands into.
Use CircularRevealCardView to apply circular reveal effect.
-->
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
android:id="@+id/sheet"
android:layout_width="256dp"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:background="?attr/colorSurface"
android:visibility="invisible"
app:elevation="8dp"
app:layout_behavior="@string/fab_transformation_sheet_behavior"
tools:visibility="visible">
<LinearLayout
android:id="@+id/sheet_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<include
android:id="@+id/menu_1"
layout="@layout/menuitems" />
<include
android:id="@+id/menu_2"
layout="@layout/menuitems" />
<include
android:id="@+id/menu_3"
layout="@layout/menuitems" />
<include
android:id="@+id/menu_4"
layout="@layout/menuitems" />
</LinearLayout>
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>